mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
add a test for invalid timer removal
We cover such cases; yet its better to have a test.
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script id=setTimeout>
|
||||
testing.expectEqual(1, window.setTimeout.length);
|
||||
let wst2 = 1;
|
||||
@@ -32,3 +31,11 @@
|
||||
}, 1, 2, 3);
|
||||
testing.eventually(() => testing.expectEqual(5, wst2));
|
||||
</script>
|
||||
|
||||
<script id=invalid-timer-clear>
|
||||
// Surprisingly, these don't fail but silently ignored.
|
||||
clearTimeout(-1);
|
||||
clearInterval(-2);
|
||||
clearImmediate(-3);
|
||||
testing.expectEqual(true, true);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user