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

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

Issue 2573393002: Use random URLs in tracing layout tests to avoid caching (Closed)
Patch Set: Created 4 years 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 | « third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-network-received-data.html ('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="../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 image.src = "resources/anImage.png"; 13 // Use random urls to avoid caching.
14 const random = Math.random();
15 image.src = "resources/anImage.png?random=" + random;
14 16
15 function bar() 17 function bar()
16 { 18 {
17 var image = new Image(); 19 var image = new Image();
18 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.
19 image.src = "resources/anotherImage.png"; 21 image.src = "resources/anotherImage.png?random=" + random;
20 } 22 }
21 return promise; 23 return promise;
22 } 24 }
23 25
24 function test() 26 function test()
25 { 27 {
26 UI.viewManager.showView("timeline"); 28 UI.viewManager.showView("timeline");
27 UI.panels.timeline._model._currentTarget = SDK.targetManager.mainTarget(); 29 UI.panels.timeline._model._currentTarget = SDK.targetManager.mainTarget();
28 UI.panels.timeline._captureJSProfileSetting.set(false); 30 UI.panels.timeline._captureJSProfileSetting.set(false);
29 InspectorTest.invokeAsyncWithTimeline("performActions", finish); 31 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 </script> 66 </script>
65 </head> 67 </head>
66 68
67 <body onload="runTest()"> 69 <body onload="runTest()">
68 <p> 70 <p>
69 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc. 71 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc.
70 </p> 72 </p>
71 73
72 </body> 74 </body>
73 </html> 75 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-network-received-data.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698