summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wasm/create_multiple_memory.worker.js
blob: 5bb1dcfc8a1aa56f0e748dfccd1e65ab48657d45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// The WebAssembly spec doesn't specify a limit on how many Memory objects can
// be allocated. This test makes sure we can have at least two at once.

importScripts("/resources/testharness.js");
test(function () {
  const mem1 = new WebAssembly.Memory({initial: 1});
  const mem2 = new WebAssembly.Memory({initial: 1});
}, "WebAssembly#CreateMultipleMemories.");
done();