diff options
author | Josh Matthews <josh@joshmatthews.net> | 2019-11-13 16:58:55 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2019-11-15 10:37:55 -0500 |
commit | ebf54c978867cbf1e657aa97810eac4ba40bea2f (patch) | |
tree | 4b90ce21cd77592dbdf984a73aa0fb1bd75a3240 /tests | |
parent | 610d7d48bedab05ab06cf98f9592697b8ff1b456 (diff) | |
download | servo-ebf54c978867cbf1e657aa97810eac4ba40bea2f.tar.gz servo-ebf54c978867cbf1e657aa97810eac4ba40bea2f.zip |
Convert deprecated single-page tests to use proper test harness.
Diffstat (limited to 'tests')
4 files changed, 18 insertions, 24 deletions
diff --git a/tests/wpt/mozilla/meta/mozilla/inline-event-listener-panic.html.ini b/tests/wpt/mozilla/meta/mozilla/inline-event-listener-panic.html.ini deleted file mode 100644 index d2d530029d9..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/inline-event-listener-panic.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[inline-event-listener-panic.html] - expected: ERROR diff --git a/tests/wpt/mozilla/meta/mozilla/window_requestAnimationFrame2.html.ini b/tests/wpt/mozilla/meta/mozilla/window_requestAnimationFrame2.html.ini deleted file mode 100644 index be85f58c9b4..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/window_requestAnimationFrame2.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[window_requestAnimationFrame2.html] - type: testharness - expected: ERROR - [Test throwing an error inside requestAnimationFrame callback] - expected: FAIL - diff --git a/tests/wpt/mozilla/tests/mozilla/inline-event-listener-panic.html b/tests/wpt/mozilla/tests/mozilla/inline-event-listener-panic.html index 2418893bc05..acde98607ae 100644 --- a/tests/wpt/mozilla/tests/mozilla/inline-event-listener-panic.html +++ b/tests/wpt/mozilla/tests/mozilla/inline-event-listener-panic.html @@ -5,10 +5,11 @@ <script src="/resources/testharnessreport.js"></script> <body> <script> -var e = document.body; -e.setAttribute("onclick", "console.log('x')"); -assert_not_equals(e.onclick, null); -assert_not_equals(e.onclick, null); -done(); +test(function() { + var e = document.body; + e.setAttribute("onclick", "console.log('x')"); + assert_not_equals(e.onclick, null); + assert_not_equals(e.onclick, null); +}); </script> </body> diff --git a/tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html b/tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html index 237ef108c5c..3227b28d5b2 100644 --- a/tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html +++ b/tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html @@ -6,18 +6,19 @@ </head> <body> <script> - var stepCalled = false; - function step() { - if (stepCalled) { - setTimeout(done, 0); - } else { - stepCalled = true; - window.requestAnimationFrame(step); + setup({allow_uncaught_exception: true}); + async_test(function(t) { + var throwDidNotInterrupt = false; + function step() { + window.requestAnimationFrame(t.step_func(function() { + assert_true(throwDidNotInterrupt, "rAF should not throw errors"); + t.done(); + })); + throw new Error(); } - throw new Error(); - } - window.requestAnimationFrame(step); - assert_equals(true, true, "rAF should not throw errors"); + window.requestAnimationFrame(step); + throwDidNotInterrupt = true; + }); </script> </body> </html> |