Chromium Code Reviews| 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/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script src="../debugger/resources/framework.js"></script> | 6 <script src="../debugger/resources/framework.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function appendElement(parentId, childId) | 9 function appendElement(parentId, childId) |
| 10 { | 10 { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 function testSteppingThroughEventListenerBreakpoint(next) | 113 function testSteppingThroughEventListenerBreakpoint(next) |
| 114 { | 114 { |
| 115 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane); | 115 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane); |
| 116 pane._setBreakpoint("listener:click"); | 116 pane._setBreakpoint("listener:click"); |
| 117 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ; | 117 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ; |
| 118 InspectorTest.waitUntilPausedAndPerformSteppingActions([ | 118 InspectorTest.waitUntilPausedAndPerformSteppingActions([ |
| 119 "StepOver", "Print", | 119 "StepOver", "Print", |
| 120 "StepOver", "Print", // should break at the first "remover()" | 120 "StepOver", "Print", // should break at the first "remover()" |
| 121 "StepOver", "StepOver", "StepOver", "Print", // enter testElemen tClicked() | 121 "StepOver", "StepOver", "StepOver", "Print", // enter testElemen tClicked() |
| 122 "StepOut", "StepOver", "StepOver", "StepOver", "StepOver", "Prin t", // enter testElementClicked() | 122 "StepOut", "StepOver", "StepOver", "StepOver", "StepOver", "Prin t", // enter testElementClicked() |
| 123 "StepOver", "StepOver", "Print", | 123 "StepOver", "StepOver", "StepOver", "Print", |
| 124 "Resume", | 124 "Resume", |
| 125 ], next); | 125 ], next); |
| 126 }, | 126 }, |
| 127 | 127 |
| 128 function testSteppingOutOnEventListenerBreakpoint(next) | 128 function testSteppingOutOnEventListenerBreakpoint(next) |
| 129 { | 129 { |
| 130 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane); | 130 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane); |
| 131 pane._setBreakpoint("listener:click"); | 131 pane._setBreakpoint("listener:click"); |
| 132 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ; | 132 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ; |
| 133 InspectorTest.waitUntilPausedAndPerformSteppingActions([ | 133 InspectorTest.waitUntilPausedAndPerformSteppingActions([ |
| 134 "StepOut", "Print", // should be in testElementClicked() | 134 "StepOut", "Print", // should be in testElementClicked() |
| 135 "StepOut", "StepOut", "Print", // again in testElementClicked() | 135 "StepOut", "StepOut", "Print", // again in testElementClicked() |
| 136 "StepOut", "Print", | 136 "StepOut", "Print", |
| 137 "Resume", | 137 "Resume", |
| 138 ], next); | 138 ], next); |
| 139 }, | 139 }, |
| 140 | 140 |
| 141 function testSteppingOutOnEventListenerBreakpointAllBlackboxed(next) | |
| 142 { | |
| 143 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane); | |
| 144 pane._setBreakpoint("listener:click"); | |
| 145 InspectorTest.evaluateInPageWithTimeout("addFewBlackboxedListenersAn dClick(false)"); | |
| 146 InspectorTest.waitUntilPausedAndPerformSteppingActions([ | |
| 147 "StepOut", "Print", | |
| 148 "Resume", | |
| 149 ], next); | |
| 150 }, | |
| 151 | |
| 152 function testSteppingOutOnEventListenerBreakpointAllBlackboxedButOne(nex t) | 141 function testSteppingOutOnEventListenerBreakpointAllBlackboxedButOne(nex t) |
| 153 { | 142 { |
| 154 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane); | 143 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane); |
| 155 pane._setBreakpoint("listener:click"); | 144 pane._setBreakpoint("listener:click"); |
| 156 InspectorTest.evaluateInPageWithTimeout("addFewBlackboxedListenersAn dClick(true)"); | 145 InspectorTest.evaluateInPageWithTimeout("addFewBlackboxedListenersAn dClick(true)"); |
| 157 InspectorTest.waitUntilPausedAndPerformSteppingActions([ | 146 InspectorTest.waitUntilPausedAndPerformSteppingActions([ |
| 158 "StepOut", "Print", | 147 "StepOut", "Print", |
| 159 "StepOut", "Print", | |
|
kozy
2017/01/20 21:59:59
add them back!
| |
| 160 "StepOut", "Print", | |
| 161 "Resume", | 148 "Resume", |
| 162 ], next); | 149 ], next); |
| 163 }, | 150 }, |
| 164 | 151 |
| 165 function tearDown(next) | 152 function tearDown(next) |
| 166 { | 153 { |
| 167 self.runtime.sharedInstance(Sources.XHRBreakpointsSidebarPane)._remo veBreakpoint("foo"); | 154 self.runtime.sharedInstance(Sources.XHRBreakpointsSidebarPane)._remo veBreakpoint("foo"); |
| 168 self.runtime.sharedInstance(Sources.EventListenerBreakpointsSidebarP ane)._removeBreakpoint("listener:click"); | 155 self.runtime.sharedInstance(Sources.EventListenerBreakpointsSidebarP ane)._removeBreakpoint("listener:click"); |
| 169 next(); | 156 next(); |
| 170 } | 157 } |
| 171 ]); | 158 ]); |
| 172 } | 159 } |
| 173 | 160 |
| 174 </script> | 161 </script> |
| 175 </head> | 162 </head> |
| 176 | 163 |
| 177 <body onload="runTest()"> | 164 <body onload="runTest()"> |
| 178 <p> | 165 <p> |
| 179 Tests framework black-boxing on DOM, XHR and Event breakpoints. | 166 Tests framework black-boxing on DOM, XHR and Event breakpoints. |
| 180 </p> | 167 </p> |
| 181 <div id="rootElement"></div> | 168 <div id="rootElement"></div> |
| 182 <input type=button id="test"></input> | 169 <input type=button id="test"></input> |
| 183 </body> | 170 </body> |
| 184 </html> | 171 </html> |
| OLD | NEW |