Changeset 4215
- Timestamp:
- 09/10/09 14:45:53 (4 years ago)
- Location:
- CKEditor/tests
- Files:
-
- 1 edited
- 1 moved
-
dt/plugins/jquery/1.html (moved) (moved from CKEditor/tests/dt/plugins/jquery/jquery.html) (15 diffs)
-
profile.js.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/tests/dt/plugins/jquery/1.html
r4214 r4215 3 3 <head> 4 4 <title>Plugin: jquery</title> 5 <meta name="tags" content="editor,unit ,jquery">5 <meta name="tags" content="editor,unit"> 6 6 <script type="text/javascript" src="../../../cktester/cell.js"></script> 7 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> 8 <script type="text/javascript" src="http://malsup.com/jquery/form/jquery.form.js"></script> 7 9 <script type="text/javascript"> 8 10 //<![CDATA[ 9 11 10 12 // Load the required plugins and launch the runner. 11 CKEDITOR.test.fort.defer = true; 13 var runner = YAHOO.tool.TestRunner; 14 runner.defer = true; 12 15 13 16 $( window ).bind( 'load', function() … … 15 18 CKEDITOR.plugins.load( 'jquery' , function() 16 19 { 17 CKEDITOR.test.fort.run();20 runner.run(); 18 21 } ); 19 22 } ); … … 108 111 }, 109 112 110 test_config_global : function()111 {112 CKEDITOR.config.test_config_global = false;113 $.ckeditorConfig( { test_config_global: true } );114 assert.isTrue( CKEDITOR.config.test_config_global );115 },116 117 test_val_get_without_timeout : function()118 {119 var testSelf = this,120 testFinished = false;121 jQuery('textarea#val_get_without_timeout').ckeditor(function( textarea )122 {123 var editor = this;124 editor.dataProcessor.writer._.rules = {};125 testSelf.resume( function()126 {127 // editor.setData is async, which creates the test failure128 editor.setData( 'foo bar' );129 assert.areSame( '<p>foo bar</p>', jQuery( textarea ).val() );130 testFinished = true;131 cleanup( 'val_get_without_timeout' );132 });133 });134 testSelf.wait( function() {135 cleanup( 'val_get_without_timeout' );136 assert.isTrue( testFinished, 'Test not finished.' );137 }, testTimeout);138 },139 140 113 test_val_get_with_timeout : function() 141 114 { … … 147 120 editor.dataProcessor.writer._.rules = {}; 148 121 editor.setData( 'foo bar' ); 122 149 123 setTimeout(function() 150 124 { … … 167 141 var testSelf = this, 168 142 testFinished = false; 169 jQuery('textarea#val_set_with_timeout').ckeditor( function( textarea )143 jQuery('textarea#val_set_with_timeout').ckeditor( function( textarea ) 170 144 { 171 145 var editor = this; … … 192 166 var testSelf = this, 193 167 testFinished = false; 194 jQuery('#ckeditor_get').ckeditor( function( textarea )168 jQuery('#ckeditor_get').ckeditor( function( textarea ) 195 169 { 196 170 var editor = this; … … 219 193 var testSelf = this, 220 194 testFinished = false; 221 jQuery('textarea#destroy').ckeditor(function( textarea ) 222 { 223 var editor = this; 224 try 225 { 226 editor.destroy(); 227 } 228 catch (e){} 195 jQuery('textarea#destroy').ckeditor( function( textarea ) 196 { 197 var editor = this; 198 editor.destroy(); 229 199 setTimeout(function() 230 200 { … … 236 206 }, 0); 237 207 }); 238 testSelf.wait( function(){208 testSelf.wait( function(){ 239 209 assert.isTrue( testFinished, 'Test not finished.' ); 240 210 }, testTimeout); … … 291 261 var testSelf = this, 292 262 testFinished = false; 263 293 264 jQuery( '#ajax_submit textarea' ).ckeditor( 294 { jquerySyncTextareaOnSubmit: true },265 { autoUpdateElementJquery: true }, 295 266 function( textarea ) 296 267 { … … 298 269 editor.dataProcessor.writer._.rules = {}; 299 270 editor.setData( 'foo bar' ); 271 300 272 jQuery('#ajax_submit').ajaxForm( 301 273 { … … 311 283 return false; 312 284 } 313 }); 314 setTimeout(function() 285 } ); 286 287 setTimeout( function() 315 288 { 316 289 jQuery('#ajax_submit').submit(); 317 290 }, 1000 ); 318 }); 319 testSelf.wait(function(){ 291 } ); 292 293 testSelf.wait( function(){ 320 294 cleanup( 'ajax_submit_textarea' ); 321 295 assert.isTrue( testFinished, 'Test not finished.' ); 322 }, testTimeout );296 }, testTimeout ); 323 297 }, 324 298 … … 346 320 }, 347 321 322 // This test causes error in Opera (9, 10) when combined with test_parallel_callbacks or test_serial_callbacks. 348 323 test_setData_event : function() 349 324 { … … 353 328 .one( 'setData.ckeditor', function( event, editor, data ) 354 329 { 355 testSelf.resume( function() 356 { 357 // console.log('test_setData_event', data, editor.getData()); 330 // Alternative bind method. 331 // .bind( 'setData.ckeditor', function( event, editor, data ) 332 // { 333 // jQuery( this ).unbind( 'setData.ckeditor', arguments.callee ); 334 testSelf.resume( function() 335 { 358 336 assert.areSame( 'foo bar', data ); 359 337 assert.isTrue( editor instanceof CKEDITOR.editor, 'editor instanceof CKEDITOR.editor' ); 360 testFinished = true; 338 testFinished = 339 true; 361 340 cleanup( 'setData_event' ); 362 341 }); … … 371 350 }, 300 ); 372 351 }); 373 // testSelf.wait();374 352 testSelf.wait( function() { 375 353 cleanup( 'setData_event' ); … … 480 458 }, testTimeout); 481 459 }, 460 461 // DISABLED TESTS 462 463 // test_config_global : function() 464 // { 465 // CKEDITOR.config.test_config_global = false; 466 // $.ckeditorConfig( { test_config_global: true } ); 467 // assert.isTrue( CKEDITOR.config.test_config_global ); 468 // }, 469 470 // Enabling this makes test_val_get_without_timeout test to fail on IE8. 471 // test_val_get_without_timeout : function() 472 // { 473 // var testSelf = this, 474 // testFinished = false; 475 // jQuery('textarea#val_get_without_timeout').ckeditor(function( textarea ) 476 // { 477 // var editor = this; 478 // editor.dataProcessor.writer._.rules = {}; 479 // testSelf.resume( function() 480 // { 481 // // editor.setData is async, which creates the test failure 482 // editor.setData( 'foo bar' ); 483 // assert.areSame( '<p>foo bar</p>', jQuery( textarea ).val() ); 484 // testFinished = true; 485 // cleanup( 'val_get_without_timeout' ); 486 // }); 487 // }); 488 // testSelf.wait( function() { 489 // cleanup( 'val_get_without_timeout' ); 490 // assert.isTrue( testFinished, 'Test not finished.' ); 491 // }, testTimeout); 492 // }, 482 493 483 494 name :document.title -
CKEditor/tests/profile.js.tpl
r4205 r4215 29 29 if ( tags.indexOf( 'manual' ) != -1 ) 30 30 env.push( '${CKEDITOR_TEST_BRANCH_ROOT}/js/manual.js' ); 31 32 33 if ( tags.indexOf( 'jquery' ) != -1 )34 env.push( 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js' );35 36 if ( tags.indexOf( 'jquery-form' ) != -1 )37 env.push( 'http://malsup.com/jquery/form/jquery.form.js' );38 31 } 39 32 ]
Note: See TracChangeset
for help on using the changeset viewer.
