| 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 (function() { | 5 (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 let _isolate_helper = dart_library.import('dart/_isolate_helper'); | 8 let _isolate_helper = dart_library.import('dart/_isolate_helper'); |
| 9 _isolate_helper.startRootIsolate(function() {}, []); | 9 _isolate_helper.startRootIsolate(function() {}, []); |
| 10 let async_helper = dart_library.import('async_helper/async_helper'); | 10 let async_helper = dart_library.import('async_helper/async_helper'); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 'external_test_21_multi', | 310 'external_test_21_multi', |
| 311 'external_test_24_multi', | 311 'external_test_24_multi', |
| 312 'main_not_a_function_test_01_multi', | 312 'main_not_a_function_test_01_multi', |
| 313 'multiline_newline_test_04_multi', | 313 'multiline_newline_test_04_multi', |
| 314 'multiline_newline_test_05_multi', | 314 'multiline_newline_test_05_multi', |
| 315 'multiline_newline_test_06_multi', | 315 'multiline_newline_test_06_multi', |
| 316 'multiline_newline_test_none_multi', | 316 'multiline_newline_test_none_multi', |
| 317 'no_main_test_01_multi', | 317 'no_main_test_01_multi', |
| 318 ]); | 318 ]); |
| 319 | 319 |
| 320 let helpers = new Set([ |
| 321 'library_prefixes_test1', |
| 322 'library_prefixes_test2', |
| 323 'top_level_prefixed_library_test', |
| 324 ]); |
| 320 | 325 |
| 321 suite('language', () => { | 326 suite('language', () => { |
| 322 let languageTestPattern = new RegExp('language/(.*_test.*)\\.js'); | 327 let languageTestPattern = new RegExp('language/(.*_test.*)'); |
| 323 for (let testFile of Object.keys(window.__karma__.files)) { | 328 for (let testFile of dart_library.libraries()) { |
| 324 let match = languageTestPattern.exec(testFile); | 329 let match = languageTestPattern.exec(testFile); |
| 325 if (match != null) { | 330 if (match != null) { |
| 326 let name = match[1]; | 331 let name = match[1]; |
| 327 | 332 |
| 333 if (helpers.has(name)) { |
| 334 // These are not top-level tests. They are used by other tests. |
| 335 continue; |
| 336 } |
| 337 |
| 328 // These two tests are special because they use package:unittest. | 338 // These two tests are special because they use package:unittest. |
| 329 // We run them below. | 339 // We run them below. |
| 330 if (name == 'async_await_test' || name.startsWith('async_star_test')) { | 340 if (name == 'async_await_test' || name.startsWith('async_star_test')) { |
| 331 continue; | 341 continue; |
| 332 } | 342 } |
| 333 | 343 |
| 334 // TODO(jmesserly): figure out why this test is hanging. | 344 // TODO(jmesserly): figure out why this test is hanging. |
| 335 if (name == 'async_star_cancel_and_throw_in_finally_test') { | 345 if (name == 'async_star_cancel_and_throw_in_finally_test') { |
| 336 console.debug('Skipping known timeout: ' + name); | 346 console.debug('Skipping known timeout: ' + name); |
| 337 continue; | 347 continue; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 353 if (!async_helper.asyncTestStarted) done(); | 363 if (!async_helper.asyncTestStarted) done(); |
| 354 }); | 364 }); |
| 355 } | 365 } |
| 356 } | 366 } |
| 357 }); | 367 }); |
| 358 | 368 |
| 359 dart_library.import('language/async_await_test_none_multi').main(); | 369 dart_library.import('language/async_await_test_none_multi').main(); |
| 360 dart_library.import('language/async_star_test_none_multi').main(); | 370 dart_library.import('language/async_star_test_none_multi').main(); |
| 361 | 371 |
| 362 })(); | 372 })(); |
| OLD | NEW |