зеркало из https://github.com/mozilla/gecko-dev.git
Bug 973849. Allow clearInterval/clearTimeout calls with no arguments; just treat them as no-ops. r=smaug
This commit is contained in:
Родитель
b458b3ad8d
Коммит
7035c5e17b
|
@ -9,6 +9,7 @@ support-files =
|
|||
[test_Image_constructor.html]
|
||||
[test_appname_override.html]
|
||||
[test_bug913761.html]
|
||||
[test_clearTimeoutIntervalNoArg.html]
|
||||
[test_constructor-assignment.html]
|
||||
[test_constructor.html]
|
||||
[test_document.all_unqualified.html]
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test for clearTimeout/clearInterval with no arguments not throwing</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
clearTimeout();
|
||||
}, "clearTimeout with no args should not throw ");
|
||||
test(function() {
|
||||
clearInterval();
|
||||
}, "clearInterval with no args should not throw ");
|
||||
</script>
|
|
@ -88,10 +88,10 @@ Window implements WindowEventHandlers;
|
|||
interface WindowTimers {
|
||||
[Throws] long setTimeout(Function handler, optional long timeout = 0, any... arguments);
|
||||
[Throws] long setTimeout(DOMString handler, optional long timeout = 0, any... unused);
|
||||
[Throws] void clearTimeout(long handle);
|
||||
[Throws] void clearTimeout(optional long handle = 0);
|
||||
[Throws] long setInterval(Function handler, optional long timeout, any... arguments);
|
||||
[Throws] long setInterval(DOMString handler, optional long timeout, any... unused);
|
||||
[Throws] void clearInterval(long handle);
|
||||
[Throws] void clearInterval(optional long handle = 0);
|
||||
};
|
||||
Window implements WindowTimers;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче