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

Side by Side Diff: test/inspector/debugger/eval-scopes.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 InspectorTest.addScript( 5 let {session, contextGroup, Protocol} = InspectorTest.start('Tests that variable s introduced in eval scopes are accessible');
6
7 contextGroup.addScript(
6 `function testNonEmptyEvalScope() { 8 `function testNonEmptyEvalScope() {
7 eval("'use strict'; var hest = 420; debugger;"); 9 eval("'use strict'; var hest = 420; debugger;");
8 } 10 }
9 function testEmptyEvalScope() { 11 function testEmptyEvalScope() {
10 eval("var fisk = 42; testNonEmptyEvalScope();"); 12 eval("var fisk = 42; testNonEmptyEvalScope();");
11 }`); 13 }`);
12 14
13 Protocol.Debugger.enable(); 15 Protocol.Debugger.enable();
14 Protocol.Debugger.oncePaused().then(dumpScopeOnPause); 16 Protocol.Debugger.oncePaused().then(dumpScopeOnPause);
15 Protocol.Runtime.evaluate({ "expression": "testEmptyEvalScope();" }); 17 Protocol.Runtime.evaluate({ "expression": "testEmptyEvalScope();" });
(...skipping 18 matching lines...) Expand all
34 } 36 }
35 } 37 }
36 38
37 function dumpProperties(message) 39 function dumpProperties(message)
38 { 40 {
39 InspectorTest.logMessage(message); 41 InspectorTest.logMessage(message);
40 --waitScopeObjects; 42 --waitScopeObjects;
41 if (!waitScopeObjects) 43 if (!waitScopeObjects)
42 Protocol.Debugger.resume().then(InspectorTest.completeTest); 44 Protocol.Debugger.resume().then(InspectorTest.completeTest);
43 } 45 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/es6-module-set-script-source.js ('k') | test/inspector/debugger/eval-scopes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698