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

Side by Side Diff: LayoutTests/inspector/timeline/timeline-receive-response-event.html

Issue 361463002: Unflaky inspector/timeline/timeline-receive-response-event.html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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> 5 <script>
6 6
7 function performActions() 7 function performActions()
8 { 8 {
9 var image = new Image(); 9 var image = new Image();
10 image.onload = bar; 10 image.onload = bar;
(...skipping 23 matching lines...) Expand all
34 TimelineAgent.stop(step3); 34 TimelineAgent.stop(step3);
35 } 35 }
36 36
37 function step3() 37 function step3()
38 { 38 {
39 function dumpFormattedRecord(presentationRecord, prefix) 39 function dumpFormattedRecord(presentationRecord, prefix)
40 { 40 {
41 var record = presentationRecord.record(); 41 var record = presentationRecord.record();
42 prefix = prefix || ""; 42 prefix = prefix || "";
43 // Here and below: pretend coalesced record are just not there, as c oalescation is time dependent and, hence, not stable. 43 // Here and below: pretend coalesced record are just not there, as c oalescation is time dependent and, hence, not stable.
44 var categoryName = WebInspector.panels.timeline._uiUtils.categoryFor Record(record).name;
45 if (categoryName !== "loading" && categoryName !== "scripting")
46 return;
44 if (!presentationRecord.coalesced() && record.type() !== "GCEvent") 47 if (!presentationRecord.coalesced() && record.type() !== "GCEvent")
45 InspectorTest.addResult(prefix + record.type()); 48 InspectorTest.addResult(prefix + record.type());
46 // Ignore stray paint & rendering events for better stability. 49 // Ignore stray paint & rendering events for better stability.
47 var categoryName = WebInspector.panels.timeline._uiUtils.categoryFor Record(record).name;
48 if (categoryName !== "loading" && categoryName !== "scripting")
49 return;
50 if (presentationRecord.presentationChildren()) { 50 if (presentationRecord.presentationChildren()) {
51 var childPrefix = prefix + (presentationRecord.coalesced() ? "" : " "); 51 var childPrefix = prefix + (presentationRecord.coalesced() ? "" : " ");
52 for (var i = 0; i < presentationRecord.presentationChildren().le ngth; ++i) 52 for (var i = 0; i < presentationRecord.presentationChildren().le ngth; ++i)
53 dumpFormattedRecord(presentationRecord.presentationChildren( )[i], childPrefix); 53 dumpFormattedRecord(presentationRecord.presentationChildren( )[i], childPrefix);
54 } 54 }
55 } 55 }
56 WebInspector.panels.timeline._model._collectionEnabled = false; 56 WebInspector.panels.timeline._model._collectionEnabled = false;
57 57
58 var records = WebInspector.panels.timeline._currentViews[0]._rootRecord( ).presentationChildren(); 58 var records = WebInspector.panels.timeline._currentViews[0]._rootRecord( ).presentationChildren();
59 for (var i = 0; i < records.length; ++i) 59 for (var i = 0; i < records.length; ++i)
60 dumpFormattedRecord(records[i]); 60 dumpFormattedRecord(records[i]);
61 InspectorTest.completeTest(); 61 InspectorTest.completeTest();
62 } 62 }
63 } 63 }
64 64
65 if (!window.testRunner) 65 if (!window.testRunner)
66 setTimeout(performActions, 3000); 66 setTimeout(performActions, 3000);
67 67
68 </script> 68 </script>
69 </head> 69 </head>
70 70
71 <body onload="runTest()"> 71 <body onload="runTest()">
72 <p> 72 <p>
73 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc. 73 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc.
74 </p> 74 </p>
75 75
76 </body> 76 </body>
77 </html> 77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698