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

Side by Side Diff: test/inspector/console/destroy-context-during-log.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
« no previous file with comments | « no previous file | test/inspector/console/destroy-context-during-log-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 let {session, contextGroup, Protocol} = InspectorTest.start('Tests that destroyi ng context from inside of console.log does not crash');
6
5 const expression = ` 7 const expression = `
6 Object.defineProperty(Object.prototype, 'RemoteObject', { 8 Object.defineProperty(Object.prototype, 'RemoteObject', {
7 configurable: true, 9 configurable: true,
8 set(v) { 10 set(v) {
9 console.log("Should never be called"); 11 console.log("Should never be called");
10 delete Object.prototype.RemoteObject; 12 delete Object.prototype.RemoteObject;
11 this.RemoteObject = v; 13 this.RemoteObject = v;
12 14
13 inspector.fireContextDestroyed(); 15 inspector.fireContextDestroyed();
14 setTimeout(function() { 16 setTimeout(function() {
(...skipping 16 matching lines...) Expand all
31 33
32 Protocol.Runtime.enable(); 34 Protocol.Runtime.enable();
33 Protocol.Runtime.evaluate({ expression: expression }); 35 Protocol.Runtime.evaluate({ expression: expression });
34 36
35 Protocol.Runtime.onConsoleAPICalled(function(result) { 37 Protocol.Runtime.onConsoleAPICalled(function(result) {
36 InspectorTest.logObject(result.params.args[0]); 38 InspectorTest.logObject(result.params.args[0]);
37 if (result.params.args[0].value == "End of test") { 39 if (result.params.args[0].value == "End of test") {
38 InspectorTest.completeTest(); 40 InspectorTest.completeTest();
39 } 41 }
40 }); 42 });
OLDNEW
« no previous file with comments | « no previous file | test/inspector/console/destroy-context-during-log-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698