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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-spin-button-on-pause.html

Issue 2011673002: [DevTools] Add notifyPopupOpeningObservers call before running debug loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-spin-button-on-pause.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-spin-button-on-pause.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-spin-button-on-pause.html
new file mode 100644
index 0000000000000000000000000000000000000000..eb5ec3c1bb085c2aac4f319582fc3b64bc0e0b10
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/suspend-spin-button-on-pause.html
@@ -0,0 +1,69 @@
+<html>
+<head>
+<style>
+input {
+ height: 20px;
+ width: 20px;
+ position:absolute;
+ top:0;
+ left:0;
+}
+</style>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+
+function installListenerAndRunTest()
+{
+ var input = document.querySelector("input");
+ input.addEventListener("input", function inputCallback (ev) { debugger; });
+ runTest();
+}
+
+function clickUpButton()
+{
+ var input = document.querySelector("input");
+ var rect = input.getBoundingClientRect();
+ eventSender.mouseMoveTo(10, 11);
+ // Don't send mouseUp to emulate case when mouseUp is ignored in debug message loop.
+ eventSender.mouseDown();
+}
+
+function debuggerStatementNotFromInputCallback()
+{
+ debugger;
+}
+
+function test()
+{
+ InspectorTest.sendCommandOrDie("Debugger.enable", {});
+ InspectorTest.eventHandler["Debugger.paused"] = dumpTopFrameAndResume;
+ InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "clickUpButton();" });
+
+ function dumpTopFrameAndResume(message)
+ {
+ var callFrame = message.params.callFrames[0];
+ InspectorTest.log("Top frame function name: " + callFrame.functionName);
+ InspectorTest.eventHandler["Debugger.paused"] = dumpTopFrameAndCompleTest;
+ InspectorTest.sendCommandOrDie("Debugger.resume", {}, evaluateDebuggerStatement);
+ }
+
+ function evaluateDebuggerStatement()
+ {
+ // Internal timer in SpinElementButton set for 250 ms. Run code with debugger statement after potential internal timer fired event.
+ setTimeout(() => InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "debuggerStatementNotFromInputCallback()" }), 500);
+ }
+
+ function dumpTopFrameAndCompleTest(message)
+ {
+ var callFrame = message.params.callFrames[0];
+ InspectorTest.log("Top frame function name: " + callFrame.functionName);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onLoad="installListenerAndRunTest();">
+Tests that debugger message loop clear timer in SpinElementButton.
+<input type="number" value="0">
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698