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

Side by Side Diff: test/inspector/debugger/side-effect-free-debug-evaluate.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 2017 the V8 project authors. All rights reserved. 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 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 // Flags: --ignition --turbo 5 // Flags: --ignition --turbo
6 let {session, contextGroup, Protocol} = InspectorTest.start('Tests side-effect-f ree evaluation');
6 7
7 InspectorTest.addScript(` 8 contextGroup.addScript(`
8 function testFunction() 9 function testFunction()
9 { 10 {
10 var o = 0; 11 var o = 0;
11 function f() { return 1; } 12 function f() { return 1; }
12 function g() { o = 2; return o; } 13 function g() { o = 2; return o; }
13 debugger; 14 debugger;
14 } 15 }
15 //# sourceURL=foo.js`); 16 //# sourceURL=foo.js`);
16 17
17 Protocol.Debugger.enable(); 18 Protocol.Debugger.enable();
(...skipping 29 matching lines...) Expand all
47 InspectorTest.log("f() returns " + response.result.result.value); 48 InspectorTest.log("f() returns " + response.result.result.value);
48 Protocol.Debugger.evaluateOnCallFrame({ callFrameId: topFrameId, expression: " g()", throwOnSideEffect: true}).then(evaluatedFourth); 49 Protocol.Debugger.evaluateOnCallFrame({ callFrameId: topFrameId, expression: " g()", throwOnSideEffect: true}).then(evaluatedFourth);
49 InspectorTest.completeTest(); 50 InspectorTest.completeTest();
50 } 51 }
51 52
52 function evaluatedFourth(response) 53 function evaluatedFourth(response)
53 { 54 {
54 InspectorTest.log("g() throws " + response.result.result.className); 55 InspectorTest.log("g() throws " + response.result.result.className);
55 InspectorTest.completeTest(); 56 InspectorTest.completeTest();
56 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698