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

Unified Diff: LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html

Issue 1129473003: DevTools: respond with error when Debugger command is sent to disabled debugger agent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint-backward-compatibility.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html
diff --git a/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint-backward-compatibility.html b/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html
similarity index 71%
rename from LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint-backward-compatibility.html
rename to LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html
index a0363a289fc81db574087b2722de5acf49d51074..9b259e3765990d5f13502898cb3c0e0d087b7f9c 100644
--- a/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint-backward-compatibility.html
+++ b/LayoutTests/inspector-protocol/debugger/debugger-setEventListenerBreakpoint.html
@@ -6,28 +6,41 @@
function test()
{
InspectorTest.startDumpingProtocolMessages();
- InspectorTest.sendCommand("Debugger.enable", {}, setEventListenerBreakpoint);
+ InspectorTest.sendCommand("Debugger.enable", {}, setEventListenerBreakpointWhenDOMDisabled);
function finishIfError(message)
{
if (message.result)
return;
- testRunner.logToStderr("FAIL: finishIfError");
InspectorTest.log("FAIL: " + JSON.stringify(message));
InspectorTest.completeTest();
}
- function setEventListenerBreakpoint(message)
+ function setEventListenerBreakpointWhenDOMDisabled(message)
{
finishIfError(message);
InspectorTest.log("PASS: Debugger was enabled");
+ InspectorTest.sendCommand("DOMDebugger.setEventListenerBreakpoint", {'eventName':'click'}, enableDOMAgent);
+ }
+
+ function enableDOMAgent(message)
+ {
+ InspectorTest.log("Error on attempt to set event listener breakpoint when DOM is disabled: " + message.error.message);
+ InspectorTest.sendCommand("DOM.enable", {}, setEventListenerBreakpoint);
+ }
+
+ function setEventListenerBreakpoint(message)
+ {
+ finishIfError(message);
+ InspectorTest.log("PASS: DOM was enabled");
InspectorTest.sendCommand("DOMDebugger.setEventListenerBreakpoint", {'eventName':'click'}, disableDOMAgent);
}
+
function disableDOMAgent(message)
{
finishIfError(message);
- InspectorTest.log("PASS: Listener was set and we expect that DOM agent was silently enabled.");
+ InspectorTest.log("PASS: Listener was set.");
InspectorTest.sendCommand("DOM.disable", {}, disableDOMAgent2);
}
@@ -41,7 +54,6 @@ function test()
function finish(message)
{
if (!message.error) {
- testRunner.logToStderr("FAIL: finish");
InspectorTest.log("FAIL: we expected an error but it wasn't happen.");
InspectorTest.completeTest();
return;
« 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