Commit Graph

143 Commits

Author SHA1 Message Date
Konstantin Shcheglov 8990c063b7 Issue 41603. await voidExpression is an error.
Bug: https://github.com/dart-lang/sdk/issues/41603
Change-Id: I6cbd8938c62e7f5f60e48e0ee65b80f4924a3a65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144681
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-24 03:42:52 +00:00
Srujan Gaddam 983f882180 [dart:html] Play videos in draw_image_video_element_test
draw_image_video_element_test creates VideoElements, which the current
frame is taken from when drawing to a CanvasElement. The test was
waiting on the onCanPlay event of the VideoElement before drawing,
although this might mean the video won't actually start playing. This
fixes that issue by enabling autoplay and then awaiting the play Event.

Change-Id: I100a552a1eb8e88b6b368d88e499f62f2db8e831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143621
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-04-16 00:23:23 +00:00
Srujan Gaddam 114752421d [dart:html] Remove multitest usage in some js tests
Multitest usage that didn't involve separating out failures is
removed. Static errors are changed to static error tests.

Change-Id: I81d7409ead0005b9788ac80d229ac534279f1658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142543
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-08 20:05:36 +00:00
Srujan Gaddam 0764c70cd9 [dart:html] Remove nullability from CssClassSet funcs
Pre-nnbd, add and toggle were allowed to return null, but with the
change in the Set interface, they must return a non-nullable bool.

Change-Id: I1dfcb43d8c816f46f847d22d6f62507c6a77e4a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141500
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-04-02 19:29:09 +00:00
Kevin Moore 6a5d73dfe7 Address a vulnerability in node validator
Related to DOM clobbering of previousSibling

Change-Id: Ib4ed1cdba4217c351804b0689a999b73713f79ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140622
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-23 20:01:58 +00:00
Srujan Gaddam 1ea7d52d63 Migrate the rest of html tests off unittest
Migrated to minitest where possible and async_minitest elsewhere,
but kept the same import for file suites (e.g. history_*).

Change-Id: Iecd16dfbbcf0691d290fcb82555ff53d715e8500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139827
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-17 22:40:05 +00:00
Srujan Gaddam cf265d0309 Migrate js_util_test to async_minitest
Change-Id: I9b232f7a093107df93b8fd4a62c29a70f206a550
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139826
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-17 22:27:25 +00:00
Srujan Gaddam f295f381b6 Migrate html xhr tests to async_minitest
Tests needed to be restructured in order to maintain asynchronous
behavior.

Change-Id: I4502188e8edada39dfacf9c5f3d59cbccac66133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139825
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-17 21:54:45 +00:00
Srujan Gaddam 4f2e49038b Migrate js_interop_1_test to async_minitest
Semantics needed to change to replace expectAsyncUntil.

Change-Id: I7dd55c9571b405e471c812e966e708e6ef76a134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139822
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-17 19:19:25 +00:00
Srujan Gaddam 3cbf1f65f3 Migrate interactive_geolocation_test to async_minitest
Change-Id: I46ae16ccca91823b68421fd5c067ff68166a7cf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139499
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-16 17:48:48 +00:00
Srujan Gaddam 47e495a89a Migrate indexeddb_* tests to async_minitest
Change-Id: Ie43d3f4610eb01cfc800556f30e93514a7ac1ac5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139498
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-16 17:48:48 +00:00
Srujan Gaddam 5f8df3af03 Migrate file_sample_test to async_minitest
Refactored to use Futures for asynchronous tests.

Change-Id: I95c7b3e0230f9c8d81b32b7323aa58ff339eadea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139493
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-16 17:48:48 +00:00
Srujan Gaddam 739e79e863 Migrate events_test to async_minitest
Change-Id: I994d376d3a6a86be989130104fabdc6d217fc0e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139492
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-16 17:48:48 +00:00
Srujan Gaddam 87779c4225 Migrate element_test to async_minitest
Change-Id: If99d88551b245d28a7898769703758c4747d693a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139360
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-13 23:09:07 +00:00
Srujan Gaddam 5c02523f4f Migrate html element_animate tests to async_minitest
Change-Id: Icfbcbe7aa69e337d923aa678986d0f40ba8a76dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139301
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-13 23:09:07 +00:00
Srujan Gaddam d044aeca59 Migrate html custom_ tests to async_minitest
Change-Id: I8fa192967c5c7083e780433fce0e246cbc846c24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139300
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-13 23:09:07 +00:00
Srujan Gaddam e60e7378b9 Migrate custom/entered_left_view tests to async_minitest
Change-Id: Ida616678a146fa7a6a0c90bba7339758a84e3aa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139261
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-13 23:09:07 +00:00
Srujan Gaddam 799cf665ea Move html custom tests off unittest
Many of the setUps were meant to be one time setUps, so
they're only called once.

anyOf is added to async_minitest using the minitest impl.

Change-Id: Ibb2d4d0c3990d0df025fcaf6c02d49faa9733569
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139147
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-13 23:09:07 +00:00
Srujan Gaddam 871bb5a06e Convert remaining canvasrendering tests to async_minitest
Refactored code to handle lack of setUp and tearDown and async
completion across tests.

Change-Id: I5411e7b7cf3a5687c892c8d0a33f4a6e6a440c32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139028
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-12 02:48:50 +00:00
Srujan Gaddam fcb00812ed Migrate canvasrendering tests off of unittest
Migration to minitest where possible. async tests will
be migrated in a different CL.

Change-Id: I4662300bd841c56b7113adf2182ee2f8e3d7eae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138889
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-10 22:04:21 +00:00
Srujan Gaddam a61e012e93 Migrate html tests using async_minitest and minitest
Move them to async_minitest.

Change-Id: Ibe850b05a838dd64ae62b30c9a979de371b24db6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138741
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-09 20:32:49 +00:00
Srujan Gaddam 3d0432eafc Add returnsNormally to async_minitest
Included change in fileapi_supported_throws_test to sanity test the
change in async_minitest.

Change-Id: I6e6b6b4eb0740ae695a85d4b3c1e2b4f8f63615a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138614
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-07 02:02:24 +00:00
Srujan Gaddam 29d4b611fb Remove html_individual_config from indexeddb_1_test
Change-Id: I1fe053dd575b8bdaeff61d9424af614eef946b7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138242
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-06 21:32:43 +00:00
Srujan Gaddam 7b6adc6083 Remove html_individual_config from remaining html tests
Change-Id: Ic60687e434cb3fef911245982f2f959f82291766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138267
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-06 06:25:51 +00:00
Srujan Gaddam a54a5eebb2 Remove html_individual_config from interactive_geolocation_test
Change-Id: I145450eac12c311c1a8c0d5684fa31bc8609fd37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138268
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-06 00:17:51 +00:00
Srujan Gaddam 6e8efe2a15 Remove html_config from document_register_basic_test
Change-Id: I9df37df1d6f4d0ad90d33e09e6da4b94fb668fa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138387
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-05 23:26:11 +00:00
Srujan Gaddam 90f3dadb2e Remove html_individual_config from js_interop tests
These tests were not being run since they were not in groups before.
These tests were also not split correctly, as the js file they're
associated with was deleted and there's only one html file. An html file
per test is included and the js file is reintroduced.

Change-Id: I058ec68220bc9c96325c460523e600578f25e5f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138264
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-05 01:23:44 +00:00
Srujan Gaddam b60e9ae71f Move js_function_getter_trust_types_test off of unittest
Both html_individual_config.dart and unittest.dart are removed. Lack of
groups before were hiding what are now compile time errors, so static
error testing is introduced to handle them.

Change-Id: I1b87f7438f2ab301207cc401254206bcd77eb072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138244
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-04 23:56:55 +00:00
Srujan Gaddam 2215221a2d Remove html_individual_config from worker_test
Separate out the tests into separate test files due to failures for the
functional group.

Change-Id: Iafbb77e08145f04c56f807ba8f945abd8ec63d53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138243
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-04 21:56:26 +00:00
Srujan Gaddam c0e8126716 Separate out lib_2/html/history_test
Remove html_individual_config and refactor groups out to separate test
files. The 'history' group of tests was never being run due to its name,
so 'popstateevent' introduces a new failure, although it isn't actually
new.

Change-Id: I8569ab7f8a47cd0ea60901da2afa296c9593631f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138241
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-04 21:50:56 +00:00
Srujan Gaddam 95bb6d8d19 Separate entered_left_view tests into separate test files
Note that groups are maintained since group-level setUps are applied to
each test. This removes html_individual_config.

Change-Id: I62e722252202372880d888161e9b7544b1194034
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138045
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-04 00:11:43 +00:00
Srujan Gaddam 18f366cf7e Move element_animate_test into separate test files
Remove html_individual_config and separate groups out into test files.

Change-Id: Icb0b81d97797bf78d19f100c92ce9582120beed6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138044
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-03 22:33:33 +00:00
Srujan Gaddam e797a066dc Separate canvasrenderingcontext2d into multiple tests
Separate each group into its own test file and have them refer to a
shared util file.

Change-Id: I3f3534b22cb6921da19eb9534af8c4ebd8a2d1b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137727
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-29 01:23:30 +00:00
Srujan Gaddam 3de553f7ef Remove html_individual_config from some html tests
Only landing the ones that don't introduce rename failures in this CL.

Change-Id: I052058a0168eaad71c3e10d804bce63d9f52b194
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137647
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-27 21:13:25 +00:00
Srujan Gaddam b3a1299f22 Revert "Remove html_individual_config from lib_2/html tests"
This reverts commit ccd2f7e7d1.

Reason for revert: CL broke other targets outside of try jobs

Original change's description:
> Remove html_individual_config from lib_2/html tests
> 
> Change-Id: I4a9684096f8e6d6a9af95f8a160c532e16f1be93
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137247
> Reviewed-by: Bob Nystrom <rnystrom@google.com>

TBR=rnystrom@google.com,srujzs@google.com

Change-Id: I762f7b7eec167dab3c96a03bd8df07b1c6ad7876
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137431
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-27 04:10:34 +00:00
Srujan Gaddam ccd2f7e7d1 Remove html_individual_config from lib_2/html tests
Change-Id: I4a9684096f8e6d6a9af95f8a160c532e16f1be93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137247
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-27 02:25:56 +00:00
Robert Nystrom fca91e4dfd Migrate css_selector_test off unittest.
This test was actually totally broken. It called
useHtmlIndividualConfiguration(), which tells the test runner to treat
each group() as a separate test. But it had no group() calls at all, so
the test runner didn't enqueue *anything* for it. It was completely
skipped. :-O

Change-Id: Ib7b030c94d286f467601ec490308c32fb500c7a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137291
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-26 02:17:55 +00:00
Srujan Gaddam 5237bcb12d Revert fileapi_entry_test to use unittest.dart
Bug: https://github.com/dart-lang/sdk/issues/40659

This behavior is similar to other tests where removing the dependency on
unittest leads to unhandled rejections.

Change-Id: Iba9eed271b839c764e544cc7200a132f0fb8e92b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136480
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-19 21:00:44 +00:00
Srujan Gaddam 6ae9dedc60 Migrate html tests off of unittest.dart
Changed tests either use expect/minitest or async_helper/async_minitest
as a replacement. There are still a few outstanding tests that need to
be migrated off of unittest.dart.

Change-Id: I9231d453f61507110b5a89360dfb9e5647a5b4c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135420
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-15 05:01:30 +00:00
Ryan Macnak 7295841073 [test] Remove dart2js tests of MirrorsUsed. Remove MirrorsUsed annotations for all tests.
Remove tests using both dart:mirrors and dart:html.

Bug: https://github.com/dart-lang/sdk/issues/40045
Change-Id: Ib0fcaab497fee6c18460199ae2db18451408b015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132740
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-01-22 00:06:24 +00:00
Srujan Gaddam 719b34d701 Add test to enumerate media devices
Bug: https://github.com/dart-lang/sdk/issues/39627

Enumerating media devices gives back a cast error in html_dart2js. This
test should fail and the cast should be fixed such that it passes.

Change-Id: Ie2502f265448d078578113cbea57dd81d20015c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128104
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-12-13 22:13:00 +00:00
Nicholas Shahan 2a13b1fe26 Reland "[dartdevc] Break dart:_debugger dependency on dart:html"
Original change was broken by the fact that DDC expects all types marked as
native have all their superclasses marked as native when the super classes are
compiled.

In this case `MapMixin` from dart:collection was not being marked as native and
the only reason it was working before was that the library dependency enforced
the necessary order.

* Now `MapMixin` is explicitly marked as native.
* Added a test case to use some of the API on `window.localStorage` that is
  inherited from the MapMixin class.

Change-Id: I1584bfb86179016ee12c2acc5cfbbe81d086841e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126906
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-12-04 00:51:18 +00:00
Derek Xu 6d28f59c54 Added promiseToFuture function to js_util.dart
Change-Id: I1bfd3fadb0a212ec0ff150cad02bdf285e2e7edb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122240
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2019-11-04 22:56:45 +00:00
Mark Zhou d012dfc7a6 Removing 'webkit' prefix, as most modern web browsers will accept 'RTCPeerConnection'
Fixes #38325

Change-Id: I08589781c8e8647c1e6d403baf4d6106d5308181
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116941
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Auto-Submit: Mark Zhou <markzipan@google.com>
2019-09-24 00:04:00 +00:00
Mayank Patke f057e2506e [dart2js] Extended structured clone algorithm to JSObject.
Change-Id: I0d8b20184f1b88e4bb24f67c2237b2095370118d
Bug: https://github.com/dart-lang/sdk/issues/37438
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114043
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-09-18 18:44:29 +00:00
Nicholas Shahan 939597863b [dartdevc] Move html/debugger_test.dart to compiler/dartdevc_native
Allows the dart:_debugger import to work as it is white-listed in this
directory.

Reveals that DDK is not passing this test. The status changes from a
compile-time to a run-time error.

Change-Id: I3703496a4ede7d155a4d82286040f1a73be677ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106360
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-06-19 17:48:56 +00:00
Robert Nystrom 99e8a9fba5 Move the test runner (i.e. "test.dart"/"test.py") to pkg/.
This makes it an actual Pub package like most other code inside the SDK
repo. The main goal is to make it easier to write tests for the test
runner itself.

This change:

- Moves all of the code from tools/testing/dart/ over to
  pkg/test_runner. Most of it ends up under test_runner/lib/src.

- Move tools/testing/dart/main.dart to
  pkg/test_runner/bin/test_runner.dart.

- Move standalone_2/io/test_runner_test.dart to
  pkg/test_runner/test/test_runner_test.dart. I don't think it currently
  works, but it wasn't being run in its old location either.

- Add test_runner to the analysis-server bot. This ensures the
  test_runner package is static error clean.

- Remove standalone_2/io/test_runner_analyze_test.dart which used to
  attempt to do the above and is no longer needed.

- Update test.py to look for the test runner at its new location.

- Add test_runner to the repo .packages file and remove the weird
  test_dart pseudo-package. (I think this fixes #35279.)

- Remove status file entries for the removed standalone_2 tests.

There are no code changes to the test runner itself aside from fixing
up import paths.

Change-Id: I3d05d50d222b291848fa5a30de2846e803bc81e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105821
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-06-14 23:35:10 +00:00
Alexander Thomas 182d55dfda [dart2js] Add support for BabelJS to test.py
This adds support for BabelJS to test.py's dart2js compiler
configuration. When --babel is specified directly or through a named
configuration, test.py will run an additional step after dart2js that
post-processes the javascript output by running it through BabelJS with
the specified Babel configuration. BabelJS is added to the DEPS in its
standalone form. d8 is used to run BabelJS standalone to avoid adding
a dependency on NodeJS. d8 can only write to stdout but not to files or
stderr, which makes it necessary to change the test_runner to handle
commands that expect their output to be piped to a file.

Changes:
* Add --babel option to test.py.
* Add babel option to pkg/smith.
* Switch IE11 builder to use babel transformation.
* Fix option list comparison bugs in pkg/smith.
* Change dart2js compiler configuration to generate files using the
  test name rather than just "out.js" (update test that relied on this).
* Remove runtime_configuration dependency on test_suite.
* Remove obsolete blocks adding --preview-dart-2 dart2js arguments.
* Make dart2js' compiler configuration more like DDC's.
* Remove createCommand method that is no longer used.
* Remove support for "OtherResources" which was only used for
  dart:isolate tests on dart2js and DDC.
* Skip co19_2 tests that are slow to transform with babel.
* Simplify the timeout handling in the test runner with Future.timeout.

Change-Id: I32e4917b2a57ecbe684538e40d744f0101c552a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90402
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-29 08:39:44 +00:00
Sigmund Cherem fb29d0e96d Move async_minitest to package:async_helper.
This allows to break a circular dependency between package:expect and

package:async_helper, which will simplify the support for modular tests using
package:modular_test.
Change-Id: Ie48723d3f35d51a8fbe622e0158450e8104fe3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102140
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-10 19:43:58 +00:00
Alan Knight f3bd910e10 Only use MapFormatter for SDK maps (HashMap and LinkedHashMap)
For classes that implement Map, using MapFormatter can result in many,
many custom format operations. Also, the presentation is not that
useful. We get e.g. a list of indices that then have a name and value
beside them, so it just duplicates the Object view, but with extra
non-useful data.

Change-Id: I74ed34521778bddae9cdad975339925d7c181bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100282
Commit-Queue: Alan Knight <alanknight@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-04-24 22:08:45 +00:00