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

Side by Side Diff: LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html

Issue 1124083003: Revert of DevTools: respond with error when Debugger command is sent to disabled debugger agent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint-backward-compatibility.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script>
5
6 function test()
7 {
8 InspectorTest.startDumpingProtocolMessages();
9 InspectorTest.sendCommand("Debugger.enable", {}, setEventListenerBreakpointW henDOMDisabled);
10
11 function finishIfError(message)
12 {
13 if (message.result)
14 return;
15 InspectorTest.log("FAIL: " + JSON.stringify(message));
16 InspectorTest.completeTest();
17 }
18
19 function setEventListenerBreakpointWhenDOMDisabled(message)
20 {
21 finishIfError(message);
22 InspectorTest.log("PASS: Debugger was enabled");
23 InspectorTest.sendCommand("DOMDebugger.setEventListenerBreakpoint", {'ev entName':'click'}, enableDOMAgent);
24 }
25
26 function enableDOMAgent(message)
27 {
28 InspectorTest.log("Error on attempt to set event listener breakpoint whe n DOM is disabled: " + message.error.message);
29 InspectorTest.sendCommand("DOM.enable", {}, setEventListenerBreakpoint);
30 }
31
32 function setEventListenerBreakpoint(message)
33 {
34 finishIfError(message);
35 InspectorTest.log("PASS: DOM was enabled");
36 InspectorTest.sendCommand("DOMDebugger.setEventListenerBreakpoint", {'ev entName':'click'}, disableDOMAgent);
37 }
38
39
40 function disableDOMAgent(message)
41 {
42 finishIfError(message);
43 InspectorTest.log("PASS: Listener was set.");
44 InspectorTest.sendCommand("DOM.disable", {}, disableDOMAgent2);
45 }
46
47 function disableDOMAgent2(message)
48 {
49 finishIfError(message);
50 InspectorTest.log("PASS: DOM agent was disabled successfully.");
51 InspectorTest.sendCommand("DOM.disable", {}, finish);
52 }
53
54 function finish(message)
55 {
56 if (!message.error) {
57 InspectorTest.log("FAIL: we expected an error but it wasn't happen." );
58 InspectorTest.completeTest();
59 return;
60 }
61
62 InspectorTest.log("PASS: The second attempt to disable DOM agent failed as expected.");
63 InspectorTest.completeTest();
64 }
65 }
66 </script>
67 </head>
68 <body onLoad="runTest();">
69 </body>
70 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint-backward-compatibility.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698