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

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

Issue 343653007: DevTools: Support media event listener breakpoints in frontend. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/sources/debugger/event-listener-breakpoints-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/sources/debugger/event-listener-breakpoints.html
diff --git a/LayoutTests/inspector/sources/debugger/event-listener-breakpoints.html b/LayoutTests/inspector/sources/debugger/event-listener-breakpoints.html
index 74e3778bd1064ed5f7f30eb80b34cf824e793398..83ae1f327e783d6c027a063f4f5dcd4c84e13b8f 100644
--- a/LayoutTests/inspector/sources/debugger/event-listener-breakpoints.html
+++ b/LayoutTests/inspector/sources/debugger/event-listener-breakpoints.html
@@ -44,6 +44,18 @@ function loadCallback()
return 0;
}
+function playVideo()
+{
+ var video = document.getElementById("video");
+ video.addEventListener("play", onVideoPlay, false);
+ video.play();
+}
+
+function onVideoPlay()
+{
+ return 0;
+}
+
function test()
{
WebInspector.inspectorView.showPanel("sources");
@@ -103,6 +115,21 @@ function test()
{
InspectorTest.evaluateInPage("addLoadListeners()", next);
}
+ },
+
+ function testMediaEventBreakpoint(next)
+ {
+ pane._setBreakpoint("listener:play", ["audio", "video"]);
+ InspectorTest.waitUntilPaused(paused);
+ InspectorTest.evaluateInPageWithTimeout("playVideo()");
+
+ function paused(callFrames, reason, breakpointIds, asyncStackTrace, auxData)
+ {
+ InspectorTest.captureStackTrace(callFrames);
+ printEventTargetName(auxData);
+ pane._removeBreakpoint("listener:play", ["audio", "video"]);
+ InspectorTest.resumeExecution(next);
+ }
}
]);
@@ -125,6 +152,7 @@ Tests event listener breakpoints.
</p>
<input type=button id="test"></input>
+<video id="video" src="../../../media/content/test.ogv"></video>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/event-listener-breakpoints-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698