| Index: third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js b/third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a0a0e5a8be4c1f8287b0ce835641de1b2ef13d98
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js
|
| @@ -0,0 +1,21 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +function createWasmModule() {
|
| + // the file incrementer.wasm is copied from
|
| + // //v8/test/mjsunit/wasm. This is because currently we cannot
|
| + // reference files outside the LayoutTests folder. When wasm format
|
| + // changes require that file to be updated, there is a test on the
|
| + // v8 side (same folder), ensure-wasm-binaries-up-to-date.js, which
|
| + // fails and will require incrementer.wasm to be updated on that side.
|
| + return fetch('incrementer.wasm')
|
| + .then(response => {
|
| + if (!response.ok) throw new Error(response.statusText);
|
| + return response.arrayBuffer();
|
| + })
|
| + .then(data => {
|
| + var mod = new WebAssembly.Module(data);
|
| + return mod;
|
| + });
|
| +}
|
|
|