OLD | NEW |
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(callback) | 7 function performActions(callback) |
8 { | 8 { |
9 function onImageLoad() | 9 function onImageLoad() |
10 { | 10 { |
11 window._imageLoaded = true; | 11 window._imageLoaded = true; |
12 if (window._scriptEvaluated) | 12 if (window._scriptEvaluated) |
13 callback(); | 13 callback(); |
14 } | 14 } |
15 | 15 |
16 function scriptEvaluated() | 16 function scriptEvaluated() |
17 { | 17 { |
18 window._scriptEvaluated = true; | 18 window._scriptEvaluated = true; |
19 if (window._imageLoaded) | 19 if (window._imageLoaded) |
20 callback(); | 20 callback(); |
21 } | 21 } |
22 | 22 |
23 var image = new Image(); | 23 var image = new Image(); |
24 image.onload = onImageLoad; | 24 image.onload = onImageLoad; |
25 image.src = "resources/anImage.png"; | 25 image.src = "../resources/anImage.png"; |
26 var script = document.createElement("script"); | 26 var script = document.createElement("script"); |
27 script.src = "timeline-network-resource.js"; | 27 script.src = "timeline-network-resource.js"; |
28 document.body.appendChild(script); | 28 document.body.appendChild(script); |
29 | 29 |
30 window.timelineNetworkResourceEvaluated = scriptEvaluated; | 30 window.timelineNetworkResourceEvaluated = scriptEvaluated; |
31 } | 31 } |
32 | 32 |
33 function test() | 33 function test() |
34 { | 34 { |
35 InspectorTest.invokeAsyncWithTimeline("performActions", done); | 35 InspectorTest.invokeAsyncWithTimeline("performActions", done); |
(...skipping 13 matching lines...) Expand all Loading... |
49 | 49 |
50 </script> | 50 </script> |
51 </head> | 51 </head> |
52 | 52 |
53 <body onload="runTest()"> | 53 <body onload="runTest()"> |
54 <p> | 54 <p> |
55 Tests the Timeline API instrumentation of a network resource received data | 55 Tests the Timeline API instrumentation of a network resource received data |
56 </p> | 56 </p> |
57 </body> | 57 </body> |
58 </html> | 58 </html> |
OLD | NEW |