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

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

Issue 1186883007: DevTools: Update dedicated workers thread name. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « no previous file | LayoutTests/inspector/tracing/worker-js-profile-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
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. 8 // Save references to the worker objects to make sure they are not GC'ed.
9 var worker1; 9 var worker1;
10 var worker2; 10 var worker2;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 function test() 50 function test()
51 { 51 {
52 InspectorTest.invokeWithTracing("startSecondWorker", processTracingEvents, 52 InspectorTest.invokeWithTracing("startSecondWorker", processTracingEvents,
53 "disabled-by-default-devtools.timeline.stack", true); 53 "disabled-by-default-devtools.timeline.stack", true);
54 54
55 function processTracingEvents() 55 function processTracingEvents()
56 { 56 {
57 var mainThread = { name: "Main Thread", events: InspectorTest.tracingTim elineModel()._mainThreadEvents }; 57 var mainThread = { name: "Main Thread", events: InspectorTest.tracingTim elineModel()._mainThreadEvents };
58 processThread(new Set(["startSecondWorker", "worker2.onmessage"]), mainT hread); 58 processThread(new Set(["startSecondWorker", "worker2.onmessage"]), mainT hread);
59 // FIXME: enable the check for workers. 59 var workers = InspectorTest.tracingTimelineModel()._virtualThreads.filte r(function(thread) { return thread.isWorker(); });
60 // var workers = InspectorTest.tracingTimelineModel()._virtualThreads.fi lter(function(thread) { return thread.name === "WebCore: Worker"}); 60 workers.forEach(processThread.bind(null, new Set(["onmessage"])));
61 // workers.forEach(processThread.bind(null, new Set(["onmessage"])));
62 InspectorTest.completeTest(); 61 InspectorTest.completeTest();
63 } 62 }
64 63
65 function processThread(expectedFunctions, thread) 64 function processThread(expectedFunctions, thread)
66 { 65 {
67 InspectorTest.addResult(thread.name); 66 InspectorTest.addResult(thread.name);
68 var missingFunctions = thread.events.reduce(processEvent, expectedFuncti ons); 67 var missingFunctions = thread.events.reduce(processEvent, expectedFuncti ons);
69 if (missingFunctions.size) { 68 if (missingFunctions.size) {
70 InspectorTest.addResult("FAIL: missing functions:"); 69 InspectorTest.addResult("FAIL: missing functions:");
71 missingFunctions.forEach(InspectorTest.addResult); 70 missingFunctions.forEach(InspectorTest.addResult);
(...skipping 10 matching lines...) Expand all
82 81
83 </script> 82 </script>
84 </head> 83 </head>
85 84
86 <body onload="startWorkerAndRunTest()"> 85 <body onload="startWorkerAndRunTest()">
87 <p> 86 <p>
88 Tests js cpu profile in timeline. 87 Tests js cpu profile in timeline.
89 </p> 88 </p>
90 </body> 89 </body>
91 </html> 90 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/worker-js-profile-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698