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

Side by Side Diff: LayoutTests/inspector/tracing/worker-events.html

Issue 643533003: DevTools: remove unnecessary setInterval from worker-events.html test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/tracing/resources/worker.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script src="../tracing-test.js"></script> 5 <script src="../tracing-test.js"></script>
6 <script> 6 <script>
7 7
8 // Save references to the worker objects to make sure they are not GC'ed.
9 var worker1;
10 var worker2;
11
8 function startWorkerAndRunTest() 12 function startWorkerAndRunTest()
9 { 13 {
10 var worker1 = new Worker("resources/worker.js"); 14 worker1 = new Worker("resources/worker.js");
11 worker1.postMessage(""); 15 worker1.postMessage("");
12 16
13 if (window.testRunner) { 17 if (window.testRunner) {
14 testRunner.dumpAsText(); 18 testRunner.dumpAsText();
15 testRunner.waitUntilDone(); 19 testRunner.waitUntilDone();
16 } 20 }
17 21
18 worker1.onmessage = function(event) 22 worker1.onmessage = function(event)
19 { 23 {
20 worker1.onmessage = null; 24 worker1.onmessage = null;
21 runTest(); 25 runTest();
22 } 26 }
23 } 27 }
24 28
25 function startSecondWorker(onActionComplete) 29 function startSecondWorker(onActionComplete)
26 { 30 {
27 var worker2 = new Worker("resources/worker.js"); 31 worker2 = new Worker("resources/worker.js");
28 worker2.postMessage(""); 32 worker2.postMessage("");
29 worker2.onmessage = function(event) 33 worker2.onmessage = function(event)
30 { 34 {
31 onActionComplete(); 35 onActionComplete();
32 worker2.onmessage = null; 36 worker2.onmessage = null;
33 } 37 }
34 } 38 }
35 39
36 function test() 40 function test()
37 { 41 {
(...skipping 25 matching lines...) Expand all
63 67
64 </script> 68 </script>
65 </head> 69 </head>
66 70
67 <body onload="startWorkerAndRunTest()"> 71 <body onload="startWorkerAndRunTest()">
68 <p> 72 <p>
69 Tests that worker events are recorded with proper devtools metadata events. 73 Tests that worker events are recorded with proper devtools metadata events.
70 </p> 74 </p>
71 </body> 75 </body>
72 </html> 76 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/tracing/resources/worker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698