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

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

Issue 2916803005: [inspector] Create InjectedScript per session in each context (Closed)
Patch Set: rebased 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 do not interfere with each other \'s remote objects.');
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('Evaluating in 1');
13 var result1 = await session1.Protocol.Runtime.evaluate({expression: '({a: 42}) '});
14 InspectorTest.log('Evaluating in 2');
15 var result2 = await session2.Protocol.Runtime.evaluate({expression: '({a: 17}) '});
16
17 await print(2, session2, result2);
18 await print(1, session1, result1);
19 InspectorTest.log('Disconnecting 2');
20 session2.disconnect();
21 await print(1, session1, result1);
22
23 InspectorTest.completeTest();
24 })();
25
26 async function print(num, session, message) {
27 InspectorTest.log('Retrieving properties in ' + num);
28 var objectId = message.result.result.objectId;
29 InspectorTest.logMessage(await session.Protocol.Runtime.getProperties({objectI d, ownProperties: true}));
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698