| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 function onBreakpointsReady() | 35 function onBreakpointsReady() |
| 36 { | 36 { |
| 37 InspectorTest.dumpBreakpointSidebarPane("Breakpoints before reload:"
); | 37 InspectorTest.dumpBreakpointSidebarPane("Breakpoints before reload:"
); |
| 38 waitForBreakpoints(); | 38 waitForBreakpoints(); |
| 39 InspectorTest.reloadPage(onPageReloaded); | 39 InspectorTest.reloadPage(onPageReloaded); |
| 40 } | 40 } |
| 41 | 41 |
| 42 function waitForBreakpoints() | 42 function waitForBreakpoints() |
| 43 { | 43 { |
| 44 var breakpointAddCounter = 4; // Before source map loaded and after. | 44 var expectedBreakpointLocations = [[14, 0], [16, 4]]; |
| 45 var jsBreakpoints = self.runtime.sharedInstance(WebInspector.JavaScr
iptBreakpointsSidebarPane); | 45 var jsBreakpoints = self.runtime.sharedInstance(WebInspector.JavaScr
iptBreakpointsSidebarPane); |
| 46 jsBreakpoints.didReceiveBreakpointLineForTest = function(uiSourceCod
e) | 46 jsBreakpoints.didReceiveBreakpointLineForTest = function(uiSourceCod
e, line, column) |
| 47 { | 47 { |
| 48 if (WebInspector.CompilerScriptMapping.StubProjectID === uiSourc
eCode.project().id()) | 48 if (WebInspector.CompilerScriptMapping.StubProjectID === uiSourc
eCode.project().id()) |
| 49 return; | 49 return; |
| 50 if (!uiSourceCode.url().endsWith("source1.js")) | 50 if (!uiSourceCode.url().endsWith("source1.js")) |
| 51 return; | 51 return; |
| 52 --breakpointAddCounter; | 52 |
| 53 if (breakpointAddCounter) | 53 expectedBreakpointLocations = |
| 54 expectedBreakpointLocations.filter((location) => (location[0
] != line && location[1] != column)); |
| 55 if (expectedBreakpointLocations.length) |
| 54 return; | 56 return; |
| 55 breakpointSourcesReceived = true; | 57 breakpointSourcesReceived = true; |
| 56 maybeCompleteTest(); | 58 maybeCompleteTest(); |
| 57 } | 59 } |
| 58 } | 60 } |
| 59 | 61 |
| 60 } | 62 } |
| 61 | 63 |
| 62 var breakpointSourcesReceived = false; | 64 var breakpointSourcesReceived = false; |
| 63 var pageReloaded = false; | 65 var pageReloaded = false; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 80 </script> | 82 </script> |
| 81 </head> | 83 </head> |
| 82 | 84 |
| 83 <body onload="runTest()"> | 85 <body onload="runTest()"> |
| 84 <p> | 86 <p> |
| 85 Tests "reload" from within inspector window while on pause. | 87 Tests "reload" from within inspector window while on pause. |
| 86 </p> | 88 </p> |
| 87 | 89 |
| 88 </body> | 90 </body> |
| 89 </html> | 91 </html> |
| OLD | NEW |