mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Convert deprecated single-page tests to use proper test harness.
This commit is contained in:
parent
610d7d48be
commit
ebf54c9788
4 changed files with 18 additions and 24 deletions
|
@ -1,2 +0,0 @@
|
||||||
[inline-event-listener-panic.html]
|
|
||||||
expected: ERROR
|
|
|
@ -1,6 +0,0 @@
|
||||||
[window_requestAnimationFrame2.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
||||||
[Test throwing an error inside requestAnimationFrame callback]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -5,10 +5,11 @@
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
var e = document.body;
|
test(function() {
|
||||||
e.setAttribute("onclick", "console.log('x')");
|
var e = document.body;
|
||||||
assert_not_equals(e.onclick, null);
|
e.setAttribute("onclick", "console.log('x')");
|
||||||
assert_not_equals(e.onclick, null);
|
assert_not_equals(e.onclick, null);
|
||||||
done();
|
assert_not_equals(e.onclick, null);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -6,18 +6,19 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
var stepCalled = false;
|
setup({allow_uncaught_exception: true});
|
||||||
function step() {
|
async_test(function(t) {
|
||||||
if (stepCalled) {
|
var throwDidNotInterrupt = false;
|
||||||
setTimeout(done, 0);
|
function step() {
|
||||||
} else {
|
window.requestAnimationFrame(t.step_func(function() {
|
||||||
stepCalled = true;
|
assert_true(throwDidNotInterrupt, "rAF should not throw errors");
|
||||||
window.requestAnimationFrame(step);
|
t.done();
|
||||||
|
}));
|
||||||
|
throw new Error();
|
||||||
}
|
}
|
||||||
throw new Error();
|
window.requestAnimationFrame(step);
|
||||||
}
|
throwDidNotInterrupt = true;
|
||||||
window.requestAnimationFrame(step);
|
});
|
||||||
assert_equals(true, true, "rAF should not throw errors");
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue