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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <style>
4 input {
5 height: 20px;
6 width: 20px;
7 position:absolute;
8 top:0;
9 left:0;
10 }
11 </style>
12 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
13 <script>
14
15 function installListenerAndRunTest()
16 {
17 var input = document.querySelector("input");
18 input.addEventListener("input", function inputCallback (ev) { debugger; });
19 runTest();
20 }
21
22 function clickUpButton()
23 {
24 var input = document.querySelector("input");
25 var rect = input.getBoundingClientRect();
26 eventSender.mouseMoveTo(10, 11);
27 // Don't send mouseUp to emulate case when mouseUp is ignored in debug messa ge loop.
28 eventSender.mouseDown();
29 }
30
31 function debuggerStatementNotFromInputCallback()
32 {
33 debugger;
34 }
35
36 function test()
37 {
38 InspectorTest.sendCommandOrDie("Debugger.enable", {});
39 InspectorTest.eventHandler["Debugger.paused"] = dumpTopFrameAndResume;
40 InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "clickUpB utton();" });
41
42 function dumpTopFrameAndResume(message)
43 {
44 var callFrame = message.params.callFrames[0];
45 InspectorTest.log("Top frame function name: " + callFrame.functionName);
46 InspectorTest.eventHandler["Debugger.paused"] = dumpTopFrameAndCompleTes t;
47 InspectorTest.sendCommandOrDie("Debugger.resume", {}, evaluateDebuggerSt atement);
48 }
49
50 function evaluateDebuggerStatement()
51 {
52 // Internal timer in SpinElementButton set for 250 ms. Run code with deb ugger statement after potential internal timer fired event.
53 setTimeout(() => InspectorTest.sendCommandOrDie("Runtime.evaluate", { "e xpression": "debuggerStatementNotFromInputCallback()" }), 500);
54 }
55
56 function dumpTopFrameAndCompleTest(message)
57 {
58 var callFrame = message.params.callFrames[0];
59 InspectorTest.log("Top frame function name: " + callFrame.functionName);
60 InspectorTest.completeTest();
61 }
62 }
63 </script>
64 </head>
65 <body onLoad="installListenerAndRunTest();">
66 Tests that debugger message loop clear timer in SpinElementButton.
67 <input type="number" value="0">
68 </body>
69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698