OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script> | |
4 console.error("Console error 1."); | |
5 console.error("Console error 2."); | |
6 </script> | |
7 <script src="../inspector-test.js"></script> | |
8 <script src="../resources-test.js"></script> | |
9 <script src="resource-tree-test.js"></script> | |
10 <script> | |
11 | |
12 function test() | |
13 { | |
14 var resourcesWereFinished = false; | |
15 var pageWasReloaded = false; | |
16 | |
17 // Resources panel has heavy initialization that does not work well with rel
oading-from-test. | |
18 InspectorTest.runAfterPendingDispatches(function() { | |
19 InspectorTest.resourceTreeModel.addEventListener(WebInspector.ResourceTr
eeModel.EventTypes.MainFrameNavigated, frameNavigated); | |
20 InspectorTest.reloadPage(pageReloaded); | |
21 }); | |
22 | |
23 function frameNavigated() | |
24 { | |
25 InspectorTest.runAfterResourcesAreFinished(["resource-tree-errors-reload
.html"], resourcesFinished); | |
26 } | |
27 | |
28 function resourcesFinished() | |
29 { | |
30 if (pageWasReloaded) | |
31 step1(); | |
32 else | |
33 resourcesWereFinished = true; | |
34 } | |
35 | |
36 function pageReloaded() | |
37 { | |
38 if (resourcesWereFinished) | |
39 step1(); | |
40 else | |
41 pageWasReloaded = true; | |
42 | |
43 } | |
44 | |
45 function step1() | |
46 { | |
47 var resource = InspectorTest.resourceTreeModel.resourceForURL("http://12
7.0.0.1:8000/inspector/resource-tree/resource-tree-errors-reload.html"); | |
48 InspectorTest.addResult("Number of errors for the main resource: " + res
ource.errors); | |
49 InspectorTest.completeTest(); | |
50 } | |
51 } | |
52 </script> | |
53 </head> | |
54 <body onload="runTest()"> | |
55 <p>Tests that console messages are matched to resources after page reload.</p> | |
56 <a href="https://bugs.webkit.org/show_bug.cgi?id=60701">Bug 60701</a> | |
57 </body> | |
58 </html> | |
OLD | NEW |