mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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>
|
||||
<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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue