Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: LayoutTests/inspector-enabled/sources/debugger/script-window-close-breakpoint.html

Issue 401523004: Break on window close when the inspector is open (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: a working test Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5
6 <script>
7
8 function doClose()
9 {
10 window.close();
11 }
12
13
14
15 function onload()
16 {
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 testRunner.waitUntilDone();
20 testRunner.showWebInspector();
21 }
22 runTest();
23 }
24
25 var test = function()
26 {
27 function log(message) {
28 InspectorTest.evaluateInPage("console.log('"+ message +"')");
29 }
30
31 log("Starting test");
32 WebInspector.inspectorView.showPanel("sources");
33 var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints ;
34 InspectorTest.runDebuggerTestSuite([
35 function testCloseBreakpoint(next)
36 {
37 log("Setting breakpoint");
38 pane._setBreakpoint('instrumentation:close');
39
40 log("Calling window.close()");
41 InspectorTest.waitUntilPaused(paused);
42 InspectorTest.evaluateInPage("doClose()");
43
44 function paused(callFrames, reason, breakpointIds, asyncStackTrace, auxData)
45 {
46 log("Paused in breakpoint");
pfeldman 2014/07/22 08:57:40 You should dump the stack here to test that it is
47 pane._removeBreakpoint('instrumentation:close');
48 next();
49 }
50 }
51 ]);
52
53 }
54 </script>
55 </head>
56 <body onload="onload()">
57 <p>Tests the window close breakpoint.
58 </p>
59 </body>
60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698