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++; |
} |
} |