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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-network-received-data.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 | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.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 image = new Image(); 9 var image = new Image();
10 var imagePromise = new Promise((fulfill) => image.onload = fulfill); 10 var imagePromise = new Promise((fulfill) => image.onload = fulfill);
11 image.src = "resources/anImage.png"; 11 // Use random urls to avoid caching.
12 const random = Math.random();
13 image.src = "resources/anImage.png?random=" + random;
12 14
13 var scriptPromise = new Promise((fulfill) => window.timelineNetworkResourceE valuated = fulfill); 15 var scriptPromise = new Promise((fulfill) => window.timelineNetworkResourceE valuated = fulfill);
14 var script = document.createElement("script"); 16 var script = document.createElement("script");
15 script.src = "resources/timeline-network-resource.js"; 17 script.src = "resources/timeline-network-resource.js?randome=" + random;
16 document.body.appendChild(script); 18 document.body.appendChild(script);
17 19
18 return Promise.all([imagePromise, scriptPromise]); 20 return Promise.all([imagePromise, scriptPromise]);
19 } 21 }
20 22
21 function test() 23 function test()
22 { 24 {
23 InspectorTest.invokeAsyncWithTimeline("performActions", done); 25 InspectorTest.invokeAsyncWithTimeline("performActions", done);
24 26
25 function done() 27 function done()
(...skipping 11 matching lines...) Expand all
37 39
38 </script> 40 </script>
39 </head> 41 </head>
40 42
41 <body onload="runTest()"> 43 <body onload="runTest()">
42 <p> 44 <p>
43 Tests the Timeline API instrumentation of a network resource received data 45 Tests the Timeline API instrumentation of a network resource received data
44 </p> 46 </p>
45 </body> 47 </body>
46 </html> 48 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698