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

Side by Side Diff: test/inspector/debugger/wasm-get-breakable-locations.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 // Flags: --expose-wasm 5 // Flags: --expose-wasm
6 6
7 let {session, contextGroup, Protocol} = InspectorTest.start('Tests breakable loc ations in wasm');
8
7 utils.load('test/mjsunit/wasm/wasm-constants.js'); 9 utils.load('test/mjsunit/wasm/wasm-constants.js');
8 utils.load('test/mjsunit/wasm/wasm-module-builder.js'); 10 utils.load('test/mjsunit/wasm/wasm-module-builder.js');
9 11
10 var builder = new WasmModuleBuilder(); 12 var builder = new WasmModuleBuilder();
11 13
12 // clang-format off 14 // clang-format off
13 var func_idx = builder.addFunction('helper', kSig_v_v) 15 var func_idx = builder.addFunction('helper', kSig_v_v)
14 .addLocals({i32_count: 1}) 16 .addLocals({i32_count: 1})
15 .addBody([ 17 .addBody([
16 kExprNop, 18 kExprNop,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 201 }
200 202
201 function waitForAllPauses() { 203 function waitForAllPauses() {
202 InspectorTest.log('Missing breakpoints: ' + allBreakableLocations.length); 204 InspectorTest.log('Missing breakpoints: ' + allBreakableLocations.length);
203 if (allBreakableLocations.length == 0) return; 205 if (allBreakableLocations.length == 0) return;
204 return Protocol.Debugger.oncePaused() 206 return Protocol.Debugger.oncePaused()
205 .then(removePausedLocation) 207 .then(removePausedLocation)
206 .then(Protocol.Debugger.resume()) 208 .then(Protocol.Debugger.resume())
207 .then(waitForAllPauses); 209 .then(waitForAllPauses);
208 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698