Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: LayoutTests/fast/dom/Window/set-and-clear-Timeout-and-Interval.html

Issue 19494002: Distinguish actions registered with setTimeout() and setInterval(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/set-and-clear-Timeout-and-Interval-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Set-and-clear Timeout-and-Interval</title>
5 <script src="../../../resources/testharness.js"></script>
6 <script src="../../../resources/testharnessreport.js"></script>
7 <link rel="stylesheet" href="../../../resources/testharness.css">
8 </head>
9 <body>
10 <p>Actions registered with setTimeout should not be cleared with clearInterval ( and vice versa).</p>
11 <script>
12 var setTimeoutAndClearIntervalTest = async_test('Actions created with setTimeout should not be cleared by clearInterval.');
13
14 setTimeoutAndClearIntervalTest.step(function ()
15 {
16 function action()
17 {
18 setTimeoutAndClearIntervalTest.done();
19 }
20
21 var timeoutID = window.setTimeout(setTimeoutAndClearIntervalTest.step_func(a ction), 0);
22
23 window.clearInterval(timeoutID); // Should not clear the action.
24 });
25
26 var setIntervalAndClearTimeoutTest = async_test('Actions created with setInterva l should not be cleared by clearTimeout.');
27
28 setIntervalAndClearTimeoutTest.step(function ()
29 {
30 var timeoutID;
31
32 function action()
33 {
34 window.clearTimeout(timeoutID);
haraken 2013/07/17 03:49:35 What is this for?
Yuta Kitamura 2013/07/17 04:02:34 Oops, I intended this to be clearInterval() to pre
35 setIntervalAndClearTimeoutTest.done();
36 }
37
38 timeoutID = window.setInterval(setIntervalAndClearTimeoutTest.step_func(acti on), 0);
39
40 window.clearTimeout(timeoutID); // Should not clear the action.
41 });
42 </script>
43 </body>
44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/set-and-clear-Timeout-and-Interval-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698