| Index: third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
|
| diff --git a/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js b/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
|
| index 4603ade16114834981e5fb1683b98cf3b20153eb..9d1b67850553fda2567c63b28c8b94e3aa3e36c1 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
|
| +++ b/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
|
| @@ -4,6 +4,34 @@
|
|
|
| var limit = Math.pow(2, 12);
|
|
|
| +function NoParameters() {
|
| + function ExpectTypeError(f) {
|
| + try {
|
| + f();
|
| + } catch (e) {
|
| + assert_true(e instanceof TypeError)
|
| + return;
|
| + }
|
| + assert_unreached();
|
| + }
|
| + ExpectTypeError(() => new WebAssembly.Module());
|
| + ExpectTypeError(() => new WebAssembly.Module("a"));
|
| + ExpectTypeError(() => new WebAssembly.Instance());
|
| + ExpectTypeError(() => new WebAssembly.Instance("a"));
|
| +}
|
| +
|
| +function NoParameters_Promise() {
|
| + function ExpectTypeError(f) {
|
| + return f().then(assert_unreached, e => assert_true(e instanceof TypeError));
|
| + }
|
| + return Promise.all([
|
| + ExpectTypeError(() => WebAssembly.compile()),
|
| + ExpectTypeError(() => WebAssembly.compile("a")),
|
| + ExpectTypeError(() => WebAssembly.instantiate()),
|
| + ExpectTypeError(() => WebAssembly.instantiate("a"))
|
| + ]);
|
| +}
|
| +
|
| function TestBuffersAreCorrect() {
|
| var buffs = createTestBuffers(limit);
|
| assert_equals(buffs.small.byteLength, limit);
|
|
|