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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.html

Issue 2593273003: DevTools: Do not reset timeline recoring options on basic/advanced switch. (Closed)
Patch Set: more tests Created 3 years, 12 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 | third_party/WebKit/LayoutTests/inspector/tracing/frame-model-instrumentation.html » ('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="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../timeline-test.js"></script> 4 <script src="../timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function performActions() 7 function performActions()
8 { 8 {
9 var callback; 9 var callback;
10 var promise = new Promise((fulfill) => callback = fulfill); 10 var promise = new Promise((fulfill) => callback = fulfill);
11 var image = new Image(); 11 var image = new Image();
12 image.onload = bar; 12 image.onload = bar;
13 // Use random urls to avoid caching. 13 // Use random urls to avoid caching.
14 const random = Math.random(); 14 const random = Math.random();
15 image.src = "resources/anImage.png?random=" + random; 15 image.src = "resources/anImage.png?random=" + random;
16 16
17 function bar() 17 function bar()
18 { 18 {
19 var image = new Image(); 19 var image = new Image();
20 image.onload = function(event) { callback(); } // do not pass event arg ument to the callback. 20 image.onload = function(event) { callback(); } // do not pass event arg ument to the callback.
21 image.src = "resources/anotherImage.png?random=" + random; 21 image.src = "resources/anotherImage.png?random=" + random;
22 } 22 }
23 return promise; 23 return promise;
24 } 24 }
25 25
26 function test() 26 function test()
27 { 27 {
28 UI.viewManager.showView("timeline"); 28 UI.viewManager.showView("timeline");
29 UI.panels.timeline._model._currentTarget = SDK.targetManager.mainTarget(); 29 const panel = UI.panels.timeline;
30 UI.panels.timeline._captureJSProfileSetting.set(false); 30 panel._model._currentTarget = SDK.targetManager.mainTarget();
31 panel._landingPage._tabbedPane.selectTab(Timeline.TimelineLandingPage.PageId .Advanced);
32 panel._captureJSProfileSetting.set(false);
31 InspectorTest.invokeAsyncWithTimeline("performActions", finish); 33 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
32 34
33 function finish() 35 function finish()
34 { 36 {
35 var recordTypes = TimelineModel.TimelineModel.RecordType; 37 var recordTypes = TimelineModel.TimelineModel.RecordType;
36 var typesToDump = new Set([recordTypes.ResourceSendRequest, recordTypes. ResourceReceiveResponse, recordTypes.ResourceReceivedData, recordTypes.ResourceF inish, 38 var typesToDump = new Set([recordTypes.ResourceSendRequest, recordTypes. ResourceReceiveResponse, recordTypes.ResourceReceivedData, recordTypes.ResourceF inish,
37 recordTypes.EventDispatch, recordTypes.FunctionCall]); 39 recordTypes.EventDispatch, recordTypes.FunctionCall]);
38 let hasAlreadyDumptReceivedDataFor = new Map(); 40 let hasAlreadyDumptReceivedDataFor = new Map();
39 function dumpEvent(traceEvent, level) 41 function dumpEvent(traceEvent, level)
40 { 42 {
(...skipping 25 matching lines...) Expand all
66 </script> 68 </script>
67 </head> 69 </head>
68 70
69 <body onload="runTest()"> 71 <body onload="runTest()">
70 <p> 72 <p>
71 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc. 73 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc.
72 </p> 74 </p>
73 75
74 </body> 76 </body>
75 </html> 77 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/frame-model-instrumentation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698