These tests test to make sure that @JS interop classes can have the
same name as native classes but in a separate namespace. Since there
now exists a static error for @JS classes that have the same name as
a @Native class, the class is defined in a separate namespace. This CL
also refactors some of the code to avoid duplication and removes html
files in favor of `eval`.
Change-Id: I5cbba7e4b49ea726234fc86848638cac6ad8065b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176200
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Changes 'is' checks for JS types such that it no longer does an
instance of check and instead only checks to see if the object
in question is a JS object or appropriate subtype. This means that
any two @JS objects will pass an is check and therefore can be
casted as one another. This makes it consistent with expected
behavior and dart2js.
Also amends the README to reflect the unified behavior.
Change-Id: I11aa105d6cafbbafde482b27dcc1182c0960cce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173140
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
js_mock_test currently tests mocks on native types by defining
the native types using JS interop. This is error-prone, as the
underlying native type has different type semantics than JS
interop types. Also moves these tests to lib/js and adds some
additional checks.
Change-Id: If4bba54d589a38d7f7fbf1c26c6c6f755ec6b9ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173361
Reviewed-by: Nicholas Shahan <nshahan@google.com>
The focus event stream is typed to be non-nullable. Updated the
return of the function passed to reduce in the "_2" version as
well to keep them consistent.
Change-Id: Ic1ae2e027c184d751549c989d60924360139fd5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154140
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Bug: https://github.com/dart-lang/sdk/issues/35253
This API was suppressed initially due to issues with conversions
between promises and futures. Now that that has been resolved, this
should be unsuppressed. Tests have been refactored to use both
navigator.getUserMedia and navigator.mediaDevices.getUserMedia.
Change-Id: Ia131b303192c7eaa3f08475cf700a53665ab3584
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
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>
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>
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>
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>
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>
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>
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>
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>