Bug 1591649 [wpt PR 19915] - [mediacapture-streams] Refactor test, a=testonly draft
authorjugglinmike <mike@mikepennisi.com>
Mon, 18 Nov 2019 22:08:14 +0000
changeset 2480198 321c53506f20f8de712282d8c1a85a0172e6a819
parent 2480197 91617cba88f397528ea88903ae70695d1daa4430
child 2480199 b686fd0301aedaa9602e8ec43899cf843b98f860
push id451110
push userreviewbot
push dateMon, 18 Nov 2019 22:14:28 +0000
treeherdertry@72198775b6e1 [default view] [failures only]
reviewerstestonly
bugs1591649, 19915, 19449
milestone72.0a1
Bug 1591649 [wpt PR 19915] - [mediacapture-streams] Refactor test, a=testonly Automatic update from web-platform-tests [mediacapture-streams] Refactor test (#19915) testharness.js was recently extended with an API to explicitly opt-in to the "single page test" feature [1]. As per WPT RFC 28 [2], tests which do not use this API and which do not declare any subtests will soon be reported as a harness error. Update the tests which previously opted in implicitly to instead declare a single subtest (so that it is no longer a single-page test). [1] https://github.com/web-platform-tests/wpt/pull/19449 [2] https://github.com/web-platform-tests/rfcs/blob/master/rfcs/single_test.md -- wpt-commits: 3ce3017ee8b575af6a0e226f54d1bda4e241838d wpt-pr: 19915 Differential Diff: PHID-DIFF-zmkjxl2hsmbdlwqc66cu
testing/web-platform/tests/mediacapture-streams/MediaDevices-SecureContext.html
--- a/testing/web-platform/tests/mediacapture-streams/MediaDevices-SecureContext.html
+++ b/testing/web-platform/tests/mediacapture-streams/MediaDevices-SecureContext.html
@@ -2,19 +2,18 @@
 <html>
 <head>
 <title>MediaDevices and SecureContext</title>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 </head>
 <body>
 <script>
-
-assert_false(window.isSecureContext, "This test must be run in a non secure context");
-assert_false('MediaDevices' in window, "MediaDevices is not exposed");
-assert_false('MediaDeviceInfo' in window, "MediaDeviceInfo is not exposed");
-assert_false('getUserMedia' in navigator, "getUserMedia is not exposed");
-assert_false('mediaDevices' in navigator, "mediaDevices is not exposed");
-
-done();
+test(function() {
+  assert_false(window.isSecureContext, "This test must be run in a non secure context");
+  assert_false('MediaDevices' in window, "MediaDevices is not exposed");
+  assert_false('MediaDeviceInfo' in window, "MediaDeviceInfo is not exposed");
+  assert_false('getUserMedia' in navigator, "getUserMedia is not exposed");
+  assert_false('mediaDevices' in navigator, "mediaDevices is not exposed");
+});
 </script>
 </body>
 </html>