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

Side by Side Diff: test/inspector/sessions/runtime-evaluate.js

Issue 2906153002: [inspector] Support multiple sessions per context group (Closed)
Patch Set: using set per kozy@ 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 InspectorTest.log('Tests that multiple sessions share the context.');
6
7 (async function test() {
8 var contextGroup = new InspectorTest.ContextGroup();
9 var session1 = contextGroup.connect();
10 var session2 = contextGroup.connect();
11
12 InspectorTest.log('Assigning in 1');
13 await session1.Protocol.Runtime.evaluate({expression: 'var a = 42;'});
14 InspectorTest.log('Evaluating in 2');
15 InspectorTest.logMessage(await session2.Protocol.Runtime.evaluate({expression: 'a'}));
16
17 InspectorTest.log('Awaiting in 1');
18 var promise = session1.Protocol.Runtime.evaluate({expression: 'var cb; new Pro mise(f => cb = f)', awaitPromise: true});
19 InspectorTest.log('Resolving in 2');
20 await session2.Protocol.Runtime.evaluate({expression: 'cb("foo")'});
21 InspectorTest.log('Should resolve in 1');
22 InspectorTest.logMessage(await promise);
23
24 InspectorTest.completeTest();
25 })();
OLDNEW
« no previous file with comments | « test/inspector/sessions/runtime-console-api-called-expected.txt ('k') | test/inspector/sessions/runtime-evaluate-exception.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698