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

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

Issue 1915623002: Fixed DevTools event-listener breakpoints for PointerEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/event-listener-breakpoints.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/event-listener-breakpoints.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/event-listener-breakpoints.html
index cd7c4a519409afdcf41a5430d5345a3f2b56b9be..9c369007e2951492fd10779140b9e4b4213c7516 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/event-listener-breakpoints.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/event-listener-breakpoints.html
@@ -4,7 +4,7 @@
<script src="../../../http/tests/inspector/debugger-test.js"></script>
<script>
-function testElementClicked()
+function testElementEventListener()
{
return 0;
}
@@ -12,10 +12,17 @@ function testElementClicked()
function addListenerAndClick()
{
var element = document.getElementById("test");
- element.addEventListener("click", testElementClicked, true);
+ element.addEventListener("click", testElementEventListener, true);
element.click();
}
+function addListenerAndPointerDown()
+{
+ var element = document.getElementById("test");
+ element.addEventListener("pointerdown", testElementEventListener, true);
+ element.dispatchEvent(new PointerEvent("pointerdown"));
+}
+
function timerFired()
{
return 0;
@@ -59,7 +66,7 @@ function onVideoPlay()
function test()
{
var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints;
- InspectorTest.runDebuggerTestSuite([
+ var testFunctions = [
function testClickBreakpoint(next)
{
pane._setBreakpoint("listener:click");
@@ -130,7 +137,33 @@ function test()
InspectorTest.resumeExecution(next);
}
}
- ]);
+ ];
+
+ if(window.PointerEvent) {
+ testFunctions.push(
+ function testPointerEventBreakpoint(next)
+ {
+ pane._setBreakpoint("listener:pointerdown");
+ InspectorTest.waitUntilPaused(paused);
+ InspectorTest.evaluateInPageWithTimeout("addListenerAndPointerDown()");
+
+ function paused(callFrames, reason, breakpointIds, asyncStackTrace, auxData)
+ {
+ InspectorTest.captureStackTrace(callFrames);
+ printEventTargetName(auxData);
+ pane._removeBreakpoint("listener:pointerdown");
+ InspectorTest.resumeExecution(resumed);
+ }
+
+ function resumed()
+ {
+ InspectorTest.evaluateInPage("addListenerAndPointerDown()", next);
+ }
+ }
+ );
+ }
+
+ InspectorTest.runDebuggerTestSuite(testFunctions);
function printEventTargetName(auxData)
{

Powered by Google App Engine
This is Rietveld 408576698