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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.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/debugger-scope-skip-variables-with-empty-name.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..a9e887114ccc8e66e7f19d266b01549823f7e0f2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-scope-skip-variables-with-empty-name.js
@@ -0,0 +1,28 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank('');
+
+ dp.Debugger.enable();
+ dp.Runtime.evaluate({expression: `
+ function testFunction() {
+ for (var a of [1]) {
+ ++a;
+ debugger;
+ }
+ }
+ testFunction();
+ `});
+
+ var message = await dp.Debugger.oncePaused();
+ var scopeChain = message.params.callFrames[0].scopeChain;
+ var localScopeObjectIds = [];
+ for (var scope of scopeChain) {
+ if (scope.type === 'local')
+ localScopeObjectIds.push(scope.object.objectId);
+ }
+
+ for (var objectId of localScopeObjectIds)
+ testRunner.logObject((await dp.Runtime.getProperties({objectId})).result);
+
+ await dp.Debugger.resume();
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698