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

Side by Side Diff: test/inspector/debugger/suspended-generator-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 suspende d generators produce scopes');
6
7 contextGroup.addScript(
6 `function *gen(a) { 8 `function *gen(a) {
7 var b = 42; 9 var b = 42;
8 yield a; 10 yield a;
9 return b; 11 return b;
10 } 12 }
11 function testSuspendedGenerator() 13 function testSuspendedGenerator()
12 { 14 {
13 var g = gen(420); 15 var g = gen(420);
14 g.next(); 16 g.next();
15 17
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 }, 72 },
71 73
72 function testScopesNonPaused(next) { 74 function testScopesNonPaused(next) {
73 Protocol.Runtime.evaluate({ expression : "gen(430)"}) 75 Protocol.Runtime.evaluate({ expression : "gen(430)"})
74 .then(msg => fetchGeneratorProperties(msg.result.result.objectId)) 76 .then(msg => fetchGeneratorProperties(msg.result.result.objectId))
75 .then(dumpGeneratorScopes) 77 .then(dumpGeneratorScopes)
76 .then(next); 78 .then(next);
77 }, 79 },
78 ]); 80 ]);
79 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698