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

Unified Diff: LayoutTests/inspector/sources/debugger/debugger-step-into-event-listener.html

Issue 723543002: DevTools: Fix wrong pause reason when stepping into an event listener. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 1 month 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 | Source/core/inspector/InspectorDOMDebuggerAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/sources/debugger/debugger-step-into-event-listener.html
diff --git a/LayoutTests/inspector/sources/debugger/debugger-step-into-event-listener.html b/LayoutTests/inspector/sources/debugger/debugger-step-into-event-listener.html
index 722c2bb2e825321834a467d0ca9a1560e74f4a8c..5db1ae4a1aa0399431daeb3847d9d5447ae28b2b 100644
--- a/LayoutTests/inspector/sources/debugger/debugger-step-into-event-listener.html
+++ b/LayoutTests/inspector/sources/debugger/debugger-step-into-event-listener.html
@@ -7,17 +7,19 @@
function testFunction()
{
var div = document.getElementById("myDiv");
- function fooEventHandler1() {
+ function fooEventHandler1()
+ {
div.textContent += "Recieved foo event(1)!\n";
}
div.addEventListener("foo", fooEventHandler1);
- function fooEventHandler2() {
+ function fooEventHandler2()
+ {
div.textContent += "Recieved foo event(2)!\n";
}
div.addEventListener("foo", fooEventHandler2);
- var e = new CustomEvent('foo');
+ var e = new CustomEvent("foo");
debugger;
div.dispatchEvent(e);
}
@@ -31,30 +33,31 @@ var test = function()
InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
}
-
- function checkTopFrameFunction(callFrames, expectedName)
+ function checkTopFrameFunction(callFrames, expectedName, reason)
{
var topFunctionName = callFrames[0].functionName;
if (expectedName === topFunctionName)
InspectorTest.addResult("SUCCESS: Did step into event listener(" + expectedName + ").");
else
InspectorTest.addResult("FAIL: Unexpected top function: expected " + expectedName + ", found " + topFunctionName);
+ InspectorTest.assertEquals(WebInspector.DebuggerModel.BreakReason.Other, reason, "FAIL: wrong pause reason: " + reason);
}
var stepCount = 0;
- function step2(callFrames)
+ function step2(callFrames, reason)
{
if (stepCount === 2)
- checkTopFrameFunction(callFrames, "fooEventHandler1");
+ checkTopFrameFunction(callFrames, "fooEventHandler1", reason);
else if (stepCount === 5)
- checkTopFrameFunction(callFrames, "fooEventHandler2");
+ checkTopFrameFunction(callFrames, "fooEventHandler2", reason);
if (stepCount < 5) {
InspectorTest.addResult("Stepping into...");
WebInspector.panels.sources._stepIntoButton.element.click();
InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(InspectorTest, step2));
- } else
+ } else {
InspectorTest.completeDebuggerTest();
+ }
stepCount++;
}
}
« no previous file with comments | « no previous file | Source/core/inspector/InspectorDOMDebuggerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698