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

Unified Diff: third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js

Issue 2778443003: [wasm] Use new override mechanism for wasm limits (Closed)
Patch Set: regression tests Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698