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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.js

Issue 2968523003: [DevTools] Migrate inspector-protocol/debugger tests to new harness (Closed)
Patch Set: all tests Created 3 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
Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.js
new file mode 100644
index 0000000000000000000000000000000000000000..9d71b3426d11b88b9433e76078beea5e54ad0571
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-into-inline-event-handler.js
@@ -0,0 +1,35 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startHTML(`
+ <script>
+ function testFunction() {
+ var e = document.getElementById('div');
+ debugger;
+ e.click();
+ }
+
+ function shouldNotBeThisFunction() {
+ return 239;
+ }
+ </script>
+ <div id='div' onclick='shouldNotBeThisFunction()'></div>
+ `, `Tests that Debugger.stepInto doesn't ignore inline event listeners.`);
+
+
+ function dumpTopCallFrame(result) {
+ var frame = result.params.callFrames[0];
+ testRunner.log('functionName (should be empty): ' + (frame.functionName.length ? frame.functionName : 'empty'));
+ }
+
+ await dp.Debugger.enable();
+ var finished = dp.Runtime.evaluate({expression: 'testFunction()'});
+
+ await dp.Debugger.oncePaused();
+ dp.Debugger.stepInto();
+ await dp.Debugger.oncePaused();
+ dp.Debugger.stepInto();
+ dumpTopCallFrame(await dp.Debugger.oncePaused());
+ dp.Debugger.resume();
+
+ await finished;
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698