Bug 1277562 - Part 5b: Adapt test cases. r=yury

--HG--
extra : rebase_source : 545315ea97844eed615e2dd6fd380f34d4d09623
This commit is contained in:
Lars T Hansen 2017-06-29 14:49:43 -07:00
Родитель 16a023dd8a
Коммит 52006b201a
42 изменённых файлов: 86 добавлений и 61 удалений

Просмотреть файл

@ -1,6 +1,9 @@
// Tests that JavaScript scripts have a "js" format and wasm scripts have a // Tests that JavaScript scripts have a "js" format and wasm scripts have a
// "wasm" format. // "wasm" format.
if (!wasmDebuggingIsSupported())
quit(0);
var g = newGlobal(); var g = newGlobal();
var dbg = new Debugger(g); var dbg = new Debugger(g);

Просмотреть файл

@ -1,4 +1,4 @@
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
fullcompartmentchecks(true); fullcompartmentchecks(true);

Просмотреть файл

@ -1,6 +1,6 @@
// |jit-test| test-also-wasm-baseline; error: TestComplete // |jit-test| test-also-no-wasm-baseline; error: TestComplete
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
throw "TestComplete"; throw "TestComplete";
let module = new WebAssembly.Module(wasmTextToBinary(` let module = new WebAssembly.Module(wasmTextToBinary(`

Просмотреть файл

@ -1,8 +1,8 @@
// |jit-test| test-also-wasm-baseline; error: TestComplete // |jit-test| test-also-no-wasm-baseline; error: TestComplete
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
throw "TestComplete"; throw "TestComplete";
// Single-step profiling currently only works in the ARM simulator // Single-step profiling currently only works in the ARM simulator

Просмотреть файл

@ -1,8 +1,8 @@
// |jit-test| test-also-wasm-baseline; error: TestComplete // |jit-test| test-also-no-wasm-baseline; error: TestComplete
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
throw "TestComplete"; throw "TestComplete";
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -1,6 +1,6 @@
// |jit-test| test-also-wasm-baseline; error: TestComplete // |jit-test| test-also-no-wasm-baseline; error: TestComplete
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
throw "TestComplete"; throw "TestComplete";
(function createShortLivedDebugger() { (function createShortLivedDebugger() {
@ -18,4 +18,4 @@ gcslice(1000000);
new WebAssembly.Instance(module); new WebAssembly.Instance(module);
throw "TestComplete"; throw "TestComplete";

Просмотреть файл

@ -1,9 +1,9 @@
// |jit-test| test-also-wasm-baseline; exitstatus: 3 // |jit-test| test-also-no-wasm-baseline; exitstatus: 3
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(3); quit(3);
var g = newGlobal(); var g = newGlobal();
g.parent = this; g.parent = this;

Просмотреть файл

@ -1,6 +1,6 @@
// |jit-test| test-also-wasm-baseline; error: TestComplete // |jit-test| test-also-no-wasm-baseline; error: TestComplete
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
throw "TestComplete"; throw "TestComplete";
var module = new WebAssembly.Module(wasmTextToBinary(` var module = new WebAssembly.Module(wasmTextToBinary(`

Просмотреть файл

@ -1,7 +1,7 @@
// |jit-test| test-also-wasm-baseline; exitstatus: 3 // |jit-test| test-also-no-wasm-baseline; exitstatus: 3
// Checking in debug frame is initialized properly during stack overflow. // Checking in debug frame is initialized properly during stack overflow.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(3); quit(3);
var dbg; var dbg;

Просмотреть файл

@ -1,8 +1,11 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Checking if Debugger.Script.isInCatchScope return false for wasm. // Checking if Debugger.Script.isInCatchScope return false for wasm.
load(libdir + "wasm.js"); load(libdir + "wasm.js");
if (!wasmDebuggingIsSupported())
quit();
var results; var results;
wasmRunWithDebugger( wasmRunWithDebugger(
'(module (memory 1) ' + '(module (memory 1) ' +

Просмотреть файл

@ -3,7 +3,7 @@
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -1,6 +1,6 @@
// Tests that wasm module scripts are available via findScripts. // Tests that wasm module scripts are available via findScripts.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -1,6 +1,6 @@
// Tests that wasm module scripts are available via onNewScript. // Tests that wasm module scripts are available via onNewScript.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -2,7 +2,7 @@
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -2,7 +2,7 @@
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -1,10 +1,10 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm module scripts have text line to bytecode offset information // Tests that wasm module scripts have text line to bytecode offset information
// when source text is generated. // when source text is generated.
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
// Checking if experimental format generates internal source map to binary file // Checking if experimental format generates internal source map to binary file

Просмотреть файл

@ -1,9 +1,9 @@
// |jit-test| test-also-wasm-baseline; exitstatus: 3 // |jit-test| test-also-no-wasm-baseline; exitstatus: 3
// Checking resumption values for 'null' at onEnterFrame. // Checking resumption values for 'null' at onEnterFrame.
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(3); quit(3);
var g = newGlobal(''); var g = newGlobal('');

Просмотреть файл

@ -1,10 +1,10 @@
// |jit-test| test-also-wasm-baseline; exitstatus: 3 // |jit-test| test-also-no-wasm-baseline; exitstatus: 3
// Checking resumption values for 'null' at frame's onPop. // Checking resumption values for 'null' at frame's onPop.
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(3); quit(3);
var g = newGlobal(''); var g = newGlobal('');
var dbg = new Debugger(); var dbg = new Debugger();

Просмотреть файл

@ -1,10 +1,10 @@
// |jit-test| test-also-wasm-baseline; error: TestComplete // |jit-test| test-also-no-wasm-baseline; error: TestComplete
// Tests that wasm module scripts raises onEnterFrame and onLeaveFrame events. // Tests that wasm module scripts raises onEnterFrame and onLeaveFrame events.
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
throw "TestComplete"; throw "TestComplete";
function runWasmWithDebugger(wast, lib, init, done) { function runWasmWithDebugger(wast, lib, init, done) {
let g = newGlobal(''); let g = newGlobal('');

Просмотреть файл

@ -1,10 +1,13 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Checking existence of all frame.offset references during onEnterFrame, // Checking existence of all frame.offset references during onEnterFrame,
// onLeaveFrame and onStep events in the source code, and that we can // onLeaveFrame and onStep events in the source code, and that we can
// potentially resolve offset back to the line/column. // potentially resolve offset back to the line/column.
load(libdir + "wasm.js"); load(libdir + "wasm.js");
if (!wasmDebuggingIsSupported())
quit();
var offsets; var offsets;
wasmRunWithDebugger( wasmRunWithDebugger(
'(module (func (nop) (nop)) (export "test" 0))', '(module (func (nop) (nop)) (export "test" 0))',

Просмотреть файл

@ -1,8 +1,11 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Checking if we destroying work registers by breakpoint/step handler. // Checking if we destroying work registers by breakpoint/step handler.
load(libdir + "wasm.js"); load(libdir + "wasm.js");
if (!wasmDebuggingIsSupported())
quit();
// Running the following code compiled from C snippet: // Running the following code compiled from C snippet:
// //
// signed func0(signed n) { // signed func0(signed n) {

Просмотреть файл

@ -1,10 +1,10 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests debugEnabled state of wasm when allowUnobservedAsmJS == true. // Tests debugEnabled state of wasm when allowUnobservedAsmJS == true.
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
// Checking that there are no offsets are present in a wasm instance script for // Checking that there are no offsets are present in a wasm instance script for
// which debug mode was not enabled. // which debug mode was not enabled.

Просмотреть файл

@ -1,9 +1,12 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm module scripts has inspectable locals. // Tests that wasm module scripts has inspectable locals.
load(libdir + "wasm.js"); load(libdir + "wasm.js");
load(libdir + 'eqArrayHelper.js'); load(libdir + 'eqArrayHelper.js');
if (!wasmDebuggingIsSupported())
quit();
function monitorLocalValues(wast, lib, expected) { function monitorLocalValues(wast, lib, expected) {
function setupFrame(frame) { function setupFrame(frame) {
var locals = {}; var locals = {};

Просмотреть файл

@ -1,7 +1,8 @@
// |jit-test| test-also-no-wasm-baseline
// Test single-stepping where the TLS register can be evicted by a non-trivial // Test single-stepping where the TLS register can be evicted by a non-trivial
// function body. // function body.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -1,6 +1,7 @@
// |jit-test| test-also-no-wasm-baseline
// Tests that wasm module scripts have special URLs. // Tests that wasm module scripts have special URLs.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -1,4 +1,4 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm module scripts has inspectable globals and memory. // Tests that wasm module scripts has inspectable globals and memory.
load(libdir + "wasm.js"); load(libdir + "wasm.js");

Просмотреть файл

@ -3,7 +3,7 @@
load(libdir + "asserts.js"); load(libdir + "asserts.js");
load(libdir + "array-compare.js"); load(libdir + "array-compare.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -1,8 +1,11 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm module scripts handles basic breakpoint operations. // Tests that wasm module scripts handles basic breakpoint operations.
load(libdir + "wasm.js"); load(libdir + "wasm.js");
if (!wasmDebuggingIsSupported())
quit();
// Checking if we can stop at specified breakpoint. // Checking if we can stop at specified breakpoint.
var onBreakpointCalled; var onBreakpointCalled;
wasmRunWithDebugger( wasmRunWithDebugger(

Просмотреть файл

@ -1,9 +1,12 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm frame opPop event can access function resumption value. // Tests that wasm frame opPop event can access function resumption value.
load(libdir + "wasm.js"); load(libdir + "wasm.js");
load(libdir + 'eqArrayHelper.js'); load(libdir + 'eqArrayHelper.js');
if (!wasmDebuggingIsSupported())
quit();
function monitorFrameOnPopReturns(wast, expected) { function monitorFrameOnPopReturns(wast, expected) {
var values = []; var values = [];
wasmRunWithDebugger( wasmRunWithDebugger(

Просмотреть файл

@ -1,10 +1,10 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm module scripts have column and line to bytecode offset // Tests that wasm module scripts have column and line to bytecode offset
// information when source text is generated. // information when source text is generated.
load(libdir + "asserts.js"); load(libdir + "asserts.js");
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
// Checking if experimental format generates internal source map to binary file // Checking if experimental format generates internal source map to binary file

Просмотреть файл

@ -1,4 +1,4 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that JS can be evaluated on wasm module scripts frames. // Tests that JS can be evaluated on wasm module scripts frames.
load(libdir + "wasm.js"); load(libdir + "wasm.js");

Просмотреть файл

@ -1,5 +1,5 @@
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
var sandbox = newGlobal(); var sandbox = newGlobal();

Просмотреть файл

@ -1,7 +1,7 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm module sourceMappingURL section is parsed. // Tests that wasm module sourceMappingURL section is parsed.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(); quit();
load(libdir + "asserts.js"); load(libdir + "asserts.js");

Просмотреть файл

@ -1,8 +1,11 @@
// |jit-test| test-also-wasm-baseline // |jit-test| test-also-no-wasm-baseline
// Tests that wasm module scripts raises onEnterFrame and onLeaveFrame events. // Tests that wasm module scripts raises onEnterFrame and onLeaveFrame events.
load(libdir + "wasm.js"); load(libdir + "wasm.js");
if (!wasmDebuggingIsSupported())
quit();
// Checking if we stop at every wasm instruction during step. // Checking if we stop at every wasm instruction during step.
var onEnterFrameCalled, onLeaveFrameCalled, onStepCalled; var onEnterFrameCalled, onLeaveFrameCalled, onStepCalled;
wasmRunWithDebugger( wasmRunWithDebugger(
@ -62,4 +65,3 @@ wasmRunWithDebugger(
assertEq(onStepCalled.length, 0); assertEq(onStepCalled.length, 0);
} }
); );

Просмотреть файл

@ -1 +1 @@
|jit-test| test-also-wasm-baseline; test-also-wasm-check-bce; include:wasm.js |jit-test| test-also-no-wasm-baseline; test-also-wasm-check-bce; include:wasm.js

Просмотреть файл

@ -1 +1 @@
|jit-test| test-also-wasm-baseline; include:wasm.js |jit-test| test-also-no-wasm-baseline; include:wasm.js

Просмотреть файл

@ -1 +1 @@
|jit-test| test-also-wasm-baseline; include:wasm.js |jit-test| test-also-no-wasm-baseline; include:wasm.js

Просмотреть файл

@ -1 +1 @@
|jit-test| test-also-wasm-baseline; include:wasm-testharness.js |jit-test| test-also-no-wasm-baseline; include:wasm-testharness.js

Просмотреть файл

@ -2,7 +2,7 @@
// Don't include wasm.js in timeout tests: when wasm isn't supported, it will // Don't include wasm.js in timeout tests: when wasm isn't supported, it will
// quit(0) which will cause the test to fail. // quit(0) which will cause the test to fail.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(6); quit(6);
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -2,7 +2,7 @@
// Don't include wasm.js in timeout tests: when wasm isn't supported, it will // Don't include wasm.js in timeout tests: when wasm isn't supported, it will
// quit(0) which will cause the test to fail. // quit(0) which will cause the test to fail.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(6); quit(6);
var g = newGlobal(); var g = newGlobal();

Просмотреть файл

@ -2,7 +2,7 @@
// Don't include wasm.js in timeout tests: when wasm isn't supported, it will // Don't include wasm.js in timeout tests: when wasm isn't supported, it will
// quit(0) which will cause the test to fail. // quit(0) which will cause the test to fail.
if (!wasmIsSupported()) if (!wasmDebuggingIsSupported())
quit(6); quit(6);
newGlobal().Debugger().addDebuggee(this); newGlobal().Debugger().addDebuggee(this);

Просмотреть файл

@ -1,2 +1,2 @@
|jit-test| test-also-wasm-baseline |jit-test| test-also-no-wasm-baseline