OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 define(['dart_sdk', 'async_helper', 'expect', 'unittest', 'require'], | 5 define(['dart_sdk', 'async_helper', 'expect', 'unittest', 'require'], |
6 function(dart_sdk, async_helper, expect, unittest, require) { | 6 function(dart_sdk, async_helper, expect, unittest, require) { |
7 'use strict'; | 7 'use strict'; |
8 | 8 |
9 async_helper = async_helper.async_helper; | 9 async_helper = async_helper.async_helper; |
10 let minitest = expect.minitest; | 10 let minitest = expect.minitest; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
403 'latin1_test': skip_timeout, | 403 'latin1_test': skip_timeout, |
404 | 404 |
405 'streamed_conversion_json_encode1_test': skip_timeout, | 405 'streamed_conversion_json_encode1_test': skip_timeout, |
406 'streamed_conversion_json_utf8_decode_test': skip_timeout, | 406 'streamed_conversion_json_utf8_decode_test': skip_timeout, |
407 'streamed_conversion_json_utf8_encode_test': skip_timeout, | 407 'streamed_conversion_json_utf8_encode_test': skip_timeout, |
408 'streamed_conversion_utf8_decode_test': skip_timeout, | 408 'streamed_conversion_utf8_decode_test': skip_timeout, |
409 'streamed_conversion_utf8_encode_test': skip_timeout, | 409 'streamed_conversion_utf8_encode_test': skip_timeout, |
410 'utf85_test': skip_timeout, | 410 'utf85_test': skip_timeout, |
411 }, | 411 }, |
412 | 412 |
413 // TODO(jacobr): enable more of the html tests in unittest once they have | |
414 // more hope of passing. Triage tests that can never run in this test | |
415 // runner and track them separately. | |
416 'lib/html': { | 413 'lib/html': { |
417 'async_spawnuri_test': async_unittest, | 414 'async_spawnuri_test': async_unittest, |
418 'async_test': async_unittest, | 415 'async_test': async_unittest, |
419 'audiobuffersourcenode_test': 'fail', // sdk#27578. | 416 'audiobuffersourcenode_test': 'fail', // sdk#27578. |
420 'audiocontext_test': 'fail', // sdk#27578. | 417 'audiocontext_test': 'fail', // sdk#27578. |
421 'blob_constructor_test': 'fail', // sdk#27578. | 418 'blob_constructor_test': 'fail', // sdk#27578. |
422 'cache_test': 'fail', // sdk#27578. | 419 'cache_test': 'fail', // sdk#27578. |
423 'canvas_test': ['unittest'], | 420 'canvas_test': ['unittest'], |
424 'canvasrenderingcontext2d_test': ['unittest'], | 421 'canvasrenderingcontext2d_test': ['unittest'], |
425 'cross_domain_iframe_test': async_unittest, | 422 'cross_domain_iframe_test': async_unittest, |
426 'crypto_test': 'fail', // sdk#27578. | 423 'crypto_test': 'fail', // sdk#27578. |
427 'cssstyledeclaration_test': async_unittest, | 424 'cssstyledeclaration_test': async_unittest, |
428 'css_test': async_unittest, | 425 'css_test': async_unittest, |
429 | 426 |
430 // This is failing with a range error, I'm guessing because it's looking | 427 // This is failing with a range error, I'm guessing because it's looking |
431 // for a stylesheet and the page has none. | 428 // for a stylesheet and the page has none. |
432 'css_rule_list_test': 'fail', | 429 'css_rule_list_test': 'fail', |
433 'custom_element_method_clash_test': async_unittest, | 430 'custom_element_method_clash_test': async_unittest, |
434 'custom_element_name_clash_test': async_unittest, | 431 'custom_element_name_clash_test': async_unittest, |
435 'custom_elements_23127_test': async_unittest, | 432 'custom_elements_23127_test': async_unittest, |
436 'custom_elements_test': async_unittest, | 433 'custom_elements_test': async_unittest, |
437 'datalistelement_test': 'fail', // sdk#27578. | 434 'datalistelement_test': 'fail', // sdk#27578. |
438 'dom_constructors_test': 'fail', // sdk#27578. | 435 'dom_constructors_test': 'fail', // sdk#27578. |
439 'element_animate_test': async_unittest, | 436 'element_animate_test': async_unittest, |
440 'element_classes_test': 'fail', // sdk#27579. | 437 'element_classes_test': 'fail', // sdk#27579. |
441 'element_classes_svg_test': 'fail', // sdk#27579. | 438 'element_classes_svg_test': 'fail', // sdk#27579. |
442 | 439 |
443 // This fails because we get 150 instead of 10 on line 45. | 440 // Failure: 'Expected 56 to be in the inclusive range [111, 160].'. |
444 'element_dimensions_test': 'fail', | |
445 | |
446 // Failure: 'Expected 364 to be in the inclusive range [111, 160].'. | |
447 'element_offset_test': 'fail', | 441 'element_offset_test': 'fail', |
448 'element_test': async_unittest, | 442 'element_test': async_unittest, |
449 'element_types_test': 'fail', // sdk#27578. | 443 'element_types_test': 'fail', // sdk#27578. |
450 'event_customevent_test': async_unittest, | 444 'event_customevent_test': async_unittest, |
451 'events_test': async_unittest, | 445 'events_test': async_unittest, |
452 | 446 |
453 // Failure: "Failed to execute 'dispatchEvent' on 'EventTarget': parameter | 447 // Failure: "Failed to execute 'dispatchEvent' on 'EventTarget': parameter |
454 // 1 is not of type 'Event'." | 448 // 1 is not of type 'Event'." |
455 'event_test': 'fail', | 449 'event_test': 'fail', |
456 'fileapi_test': async_unittest, | 450 'fileapi_test': async_unittest, |
457 'filereader_test': async_unittest, | 451 'filereader_test': async_unittest, |
458 'fontface_loaded_test': async_unittest, | 452 'fontface_loaded_test': async_unittest, |
459 | 453 |
460 // Failed because it's expecting "Ahem" but getting null. Maybe sdk#27579? | 454 // Failed because it's expecting "Ahem" but getting null. Maybe sdk#27579? |
461 'fontface_test': 'fail', | 455 'fontface_test': 'fail', |
462 'form_data_test': async_unittest, | 456 'form_data_test': async_unittest, |
463 'history_test': async_unittest, | 457 'history_test': async_unittest, |
464 | |
465 // Failing because innerHtml should be 'Hello World' but was ''. | |
466 'htmlelement_test': 'fail', | |
467 'indexeddb_1_test': async_unittest, | 458 'indexeddb_1_test': async_unittest, |
468 'indexeddb_2_test': async_unittest, | 459 'indexeddb_2_test': async_unittest, |
469 'indexeddb_3_test': async_unittest, | 460 'indexeddb_3_test': async_unittest, |
470 'indexeddb_4_test': async_unittest, | 461 'indexeddb_4_test': async_unittest, |
471 'indexeddb_5_test': async_unittest, | 462 'indexeddb_5_test': async_unittest, |
472 'input_element_test': 'fail', // sdk#27578. | 463 'input_element_test': 'fail', // sdk#27578. |
473 'interactive_test': async_unittest, | 464 'interactive_test': async_unittest, |
474 'isolates_test': async_unittest, | 465 'isolates_test': async_unittest, |
475 | 466 |
476 // Failing on "identical JS objects should have identical proxies". | 467 // Failing on "identical JS objects should have identical proxies". |
477 'js_test': 'fail', | 468 'js_test': 'fail', |
478 'js_interop_1_test': async_unittest, | 469 'js_interop_1_test': async_unittest, |
479 | 470 |
480 // Failing because accessing "zSomeInvalidName" does not throw. | 471 // Failing because accessing "zSomeInvalidName" does not throw. |
481 'js_typed_interop_test': 'fail', | 472 'js_typed_interop_test': 'fail', |
482 | 473 |
483 // The "typed literal" test fails because the object does not have "_c". | 474 // The "typed literal" test fails because the object does not have "_c". |
484 'js_util_test': 'fail', | 475 'js_util_test': 'fail', |
485 'keyboard_event_test': ['unittest', 'skip', 'fail'], | 476 'keyboard_event_test': async_unittest, |
486 'localstorage_test': ['unittest', 'skip', 'fail'], | |
487 'location_test': ['unittest', 'skip', 'fail'], | |
488 'mediasource_test': ['unittest', 'skip', 'fail'], | |
489 'media_stream_test': ['unittest', 'skip', 'fail'], | |
490 'messageevent_test': ['unittest', 'skip', 'fail'], | |
491 'mirrors_js_typed_interop_test': ['unittest', 'skip', 'fail'], | |
492 'mouse_event_test': ['unittest', 'skip', 'fail'], | |
493 'mutationobserver_test': ['unittest', 'skip', 'fail'], | |
494 'native_gc_test': ['unittest', 'skip', 'fail'], | |
495 'navigator_test': ['unittest', 'skip', 'fail'], | |
496 'node_test': ['unittest', 'skip', 'fail'], | |
497 'node_validator_important_if_you_suppress_make_the_bug_critical_test': ['u nittest', 'skip', 'fail'], | |
498 'non_instantiated_is_test': ['unittest', 'skip', 'fail'], | |
499 'notification_test': ['unittest', 'skip', 'fail'], | |
500 'performance_api_test': ['unittest', 'skip', 'fail'], | |
501 'postmessage_structured_test': ['unittest', 'skip', 'fail'], | |
502 'private_extension_member_test': ['unittest', 'skip', 'fail'], | |
503 'queryall_test': ['unittest', 'skip', 'fail'], | |
504 'query_test': ['unittest', 'skip', 'fail'], | |
505 'range_test': ['unittest', 'skip', 'fail'], | |
506 'request_animation_frame_test': ['unittest', 'skip', 'fail'], | |
507 'resource_http_test': ['unittest', 'skip', 'fail'], | |
508 'rtc_test': ['unittest', 'skip', 'fail'], | |
509 'selectelement_test': ['unittest', 'skip', 'fail'], | |
510 'serialized_script_value_test': ['unittest', 'skip', 'fail'], | |
511 'shadow_dom_test': ['unittest', 'skip', 'fail'], | |
512 'shadowroot_test': ['unittest', 'skip', 'fail'], | |
513 'speechrecognition_test': ['unittest', 'skip', 'fail'], | |
514 'storage_test': ['unittest', 'skip', 'fail'], | |
515 'streams_test': ['unittest', 'skip', 'fail'], | |
516 'svgelement_test': ['unittest', 'skip', 'fail'], | |
517 'svg_test': ['unittest', 'skip', 'fail'], | |
518 'table_test': ['unittest', 'skip', 'fail'], | |
519 'touchevent_test': ['unittest', 'skip', 'fail'], | |
520 'track_element_constructor_test': ['unittest', 'skip', 'fail'], | |
521 'transferables_test': ['unittest', 'skip', 'fail'], | |
522 'transition_event_test': ['unittest', 'skip', 'fail'], | |
523 'trusted_html_tree_sanitizer_test': ['unittest', 'skip', 'fail'], | |
524 'typed_arrays_1_test': ['unittest', 'skip', 'fail'], | |
525 'typed_arrays_2_test': ['unittest', 'skip', 'fail'], | |
526 'typed_arrays_3_test': ['unittest', 'skip', 'fail'], | |
527 'typed_arrays_4_test': ['unittest', 'skip', 'fail'], | |
528 'typed_arrays_5_test': ['unittest', 'skip', 'fail'], | |
529 'typed_arrays_arraybuffer_test': ['unittest', 'skip', 'fail'], | |
530 'typed_arrays_dataview_test': ['unittest', 'skip', 'fail'], | |
531 'typed_arrays_range_checks_test': ['unittest', 'skip', 'fail'], | |
532 'typed_arrays_simd_test': ['unittest', 'skip', 'fail'], | |
533 'typing_test': ['unittest', 'skip', 'fail'], | |
534 'unknownelement_test': ['unittest', 'skip', 'fail'], | |
535 'uri_test': ['unittest', 'skip', 'fail'], | |
536 'url_test': ['unittest', 'skip', 'fail'], | |
537 'webgl_1_test': ['unittest', 'skip', 'fail'], | |
538 'websocket_test': ['unittest', 'skip', 'fail'], | |
539 'websql_test': ['unittest', 'skip', 'fail'], | |
540 'wheelevent_test': ['unittest', 'skip', 'fail'], | |
541 'window_eq_test': ['unittest', 'skip', 'fail'], | |
542 'window_mangling_test': ['unittest', 'skip', 'fail'], | |
543 'window_nosuchmethod_test': ['unittest', 'skip', 'fail'], | |
544 'window_test': ['unittest', 'skip', 'fail'], | |
545 'worker_api_test': ['unittest', 'skip', 'fail'], | |
546 'worker_test': ['unittest', 'skip', 'fail'], | |
547 'wrapping_collections_test': ['unittest', 'skip', 'fail'], | |
548 'xhr_cross_origin_test': ['unittest', 'skip', 'fail'], | |
549 'xhr_test': ['unittest', 'skip', 'fail'], | |
550 'xsltprocessor_test': ['unittest', 'skip', 'fail'], | |
551 | 477 |
552 'js_typed_interop_default_arg_test_none_multi': ['unittest', 'skip', 'fail '], | 478 'mediasource_test': 'fail', // sdk#27578. |
553 'js_typed_interop_default_arg_test_explicit_argument_multi': ['unittest', 'skip', 'fail'], | 479 'media_stream_test': 'fail', // sdk#27578. |
480 'messageevent_test': 'fail', // sdk#27578. | |
481 | |
482 // Should throw but does not. | |
483 'mirrors_js_typed_interop_test': 'fail', | |
484 | |
485 'mutationobserver_test': async_unittest, | |
486 'native_gc_test': async_unittest, | |
487 'node_validator_important_if_you_suppress_make_the_bug_critical_test': 'fa il', // sdk#27578. | |
488 'notification_test': 'fail', // sdk#27578. | |
489 'performance_api_test': 'fail', // sdk#27578. | |
490 'postmessage_structured_test': async_unittest, | |
491 'range_test': 'fail', // sdk#27578. | |
492 'request_animation_frame_test': async_unittest, | |
493 'resource_http_test': async_unittest, | |
494 'rtc_test': 'fail', // sdk#27578. | |
495 | |
496 // Expected 1, got null. | |
497 'serialized_script_value_test': 'fail', | |
498 'shadow_dom_test': 'fail', // sdk#27578. | |
499 'shadowroot_test': 'fail', // sdk#27578. | |
500 'speechrecognition_test': 'fail', // sdk#27578. | |
501 'svgelement_test': 'fail', // sdk#27578. | |
502 'touchevent_test': 'fail', // sdk#27578. | |
503 'track_element_constructor_test': 'fail', // sdk#27578. | |
504 'transferables_test': async_unittest, | |
505 'transition_event_test': async_unittest, | |
506 'url_test': async_unittest, | |
507 'websocket_test': async_unittest, | |
508 'websql_test': async_unittest, | |
509 'wheelevent_test': async_unittest, | |
510 'worker_api_test': async_unittest, | |
511 'worker_test': async_unittest, | |
512 | |
513 'xhr_cross_origin_test': async_unittest, | |
514 'xhr_test': async_unittest, | |
515 'xsltprocessor_test': 'fail', // sdk#27578. | |
554 | 516 |
555 // Failing when it gets 3 instead of 42. | 517 // Failing when it gets 3 instead of 42. |
556 'js_typed_interop_default_arg_test_default_value_multi': 'fail', | 518 'js_typed_interop_default_arg_test_default_value_multi': 'fail', |
557 }, | 519 }, |
558 | 520 |
559 'lib/html/custom': { | 521 'lib/html/custom': { |
560 'attribute_changed_callback_test': ['unittest', 'skip', 'fail'], | 522 'attribute_changed_callback_test': async_unittest, |
561 'constructor_calls_created_synchronously_test': | 523 'constructor_calls_created_synchronously_test': async_unittest, |
562 ['unittest', 'skip', 'fail'], | 524 'created_callback_test': async_unittest, |
563 'created_callback_test': ['unittest', 'skip', 'fail'], | 525 'entered_left_view_test': async_unittest, |
564 'document_register_basic_test': ['unittest', 'skip', 'fail'], | 526 'js_custom_test': async_unittest, |
565 'document_register_type_extensions_test': ['unittest', 'skip', 'fail'], | 527 'mirrors_test': async_unittest, |
566 'element_upgrade_test': ['unittest', 'skip', 'fail'], | 528 'regress_194523002_test': async_unittest, |
567 'entered_left_view_test': ['unittest', 'skip', 'fail'], | |
568 'js_custom_test': ['unittest', 'skip', 'fail'], | |
569 'mirrors_test': ['unittest', 'skip', 'fail'], | |
570 'regress_194523002_test': ['unittest', 'skip', 'fail'], | |
571 }, | 529 }, |
572 | 530 |
573 'lib/math': { | 531 'lib/math': { |
574 // TODO(het): triage | 532 // TODO(het): triage |
575 'double_pow_test': skip_fail, | 533 'double_pow_test': skip_fail, |
576 'low_test': skip_fail, | 534 'low_test': skip_fail, |
577 'math_test': skip_fail, | 535 'math_test': skip_fail, |
578 'math2_test': skip_fail, | 536 'math2_test': skip_fail, |
579 'pi_test': skip_timeout, | 537 'pi_test': skip_timeout, |
580 'random_big_test': skip_fail, | 538 'random_big_test': skip_fail, |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
813 if (negative) { | 771 if (negative) { |
814 assert.throws(mainLibrary.main); | 772 assert.throws(mainLibrary.main); |
815 } else { | 773 } else { |
816 mainLibrary.main(); | 774 mainLibrary.main(); |
817 } | 775 } |
818 } finally { | 776 } finally { |
819 minitest.finishTests(); | 777 minitest.finishTests(); |
820 } | 778 } |
821 } | 779 } |
822 | 780 |
781 // If the test left any lingering detritus in the DOM, blow it away | |
782 // so it doesn't interfere with later tests. | |
783 document.body.innerHTML = ''; | |
784 console.log("cleared"); | |
Jacob
2016/10/14 16:44:38
remove console.log message
| |
785 | |
823 if (!async_helper.asyncTestStarted) done(); | 786 if (!async_helper.asyncTestStarted) done(); |
824 }); | 787 }); |
825 } | 788 } |
826 } | 789 } |
827 | 790 |
828 let mochaOnError; | 791 let mochaOnError; |
829 // We run these tests in a mocha test wrapper to avoid the confusing failure | 792 // We run these tests in a mocha test wrapper to avoid the confusing failure |
830 // case of dart unittests being interleaved with mocha tests. | 793 // case of dart unittests being interleaved with mocha tests. |
831 // In practice we are really just suppressing all mocha test behavior while | 794 // In practice we are really just suppressing all mocha test behavior while |
832 // Dart unittests run and then re-enabling it when the dart tests complete. | 795 // Dart unittests run and then re-enabling it when the dart tests complete. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
881 | 844 |
882 for (let action of unittest_tests) { | 845 for (let action of unittest_tests) { |
883 try { | 846 try { |
884 action(); | 847 action(); |
885 } catch (e) { | 848 } catch (e) { |
886 console.error("Caught error tying to setup test:", e); | 849 console.error("Caught error tying to setup test:", e); |
887 } | 850 } |
888 } | 851 } |
889 }); | 852 }); |
890 }); | 853 }); |
OLD | NEW |