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/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 <script src="../../../http/tests/inspector/resources/compiled.js"></script> | 5 <script src="../../../http/tests/inspector/resources/compiled.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 var test = function() | 8 var test = function() |
9 { | 9 { |
10 InspectorTest.startDebuggerTest(step1); | 10 InspectorTest.startDebuggerTest(step1); |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 var counter = 2; | 24 var counter = 2; |
25 | 25 |
26 function didSetBreakpointInDebugger() | 26 function didSetBreakpointInDebugger() |
27 { | 27 { |
28 counter--; | 28 counter--; |
29 if (!counter) { | 29 if (!counter) { |
30 //Both breakpoints are resolved before reload | 30 //Both breakpoints are resolved before reload |
31 InspectorTest.dumpBreakpointSidebarPane("Breakpoints before relo
ad:"); | 31 InspectorTest.dumpBreakpointSidebarPane("Breakpoints before relo
ad:"); |
32 InspectorTest.addSniffer(WebInspector.CompilerScriptMapping.prot
otype, "_sourceMapLoaded", onSourceMapLoaded); | 32 InspectorTest.addSniffer(WebInspector.CompilerScriptMapping.prot
otype, "_sourceMapLoaded", onSourceMapLoaded); |
33 InspectorTest.reloadPage(); | 33 InspectorTest.reloadPage(onPageReloaded); |
34 } | 34 } |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
| 38 var sourceMapLoaded = false; |
| 39 var pageReloaded = false; |
| 40 |
| 41 function onPageReloaded() |
| 42 { |
| 43 pageReloaded = true; |
| 44 maybeCompleteTest(); |
| 45 } |
| 46 |
38 function onSourceMapLoaded() | 47 function onSourceMapLoaded() |
39 { | 48 { |
| 49 sourceMapLoaded = true; |
| 50 maybeCompleteTest(); |
| 51 } |
| 52 |
| 53 function maybeCompleteTest() |
| 54 { |
| 55 if (!pageReloaded || !sourceMapLoaded) |
| 56 return; |
40 InspectorTest.dumpBreakpointSidebarPane("Breakpoints after reload:"); | 57 InspectorTest.dumpBreakpointSidebarPane("Breakpoints after reload:"); |
41 InspectorTest.completeDebuggerTest(); | 58 InspectorTest.completeDebuggerTest(); |
42 } | 59 } |
43 } | 60 } |
44 | 61 |
45 </script> | 62 </script> |
46 </head> | 63 </head> |
47 | 64 |
48 <body onload="runTest()"> | 65 <body onload="runTest()"> |
49 <p> | 66 <p> |
50 Tests "reload" from within inspector window while on pause. | 67 Tests "reload" from within inspector window while on pause. |
51 </p> | 68 </p> |
52 | 69 |
53 </body> | 70 </body> |
54 </html> | 71 </html> |
OLD | NEW |