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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/wasm/wasm_serialization_tests.js

Issue 2655403003: Adjust wasm_serialization_tests.html the layout test to expect null on failure. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function TestInstantiateInWorker() { 5 function TestInstantiateInWorker() {
6 return createWasmModule() 6 return createWasmModule()
7 .then((mod) => { 7 .then((mod) => {
8 var worker = new Worker("wasm_serialization_worker.js"); 8 var worker = new Worker("wasm_serialization_worker.js");
9 return new Promise((resolve, reject) => { 9 return new Promise((resolve, reject) => {
10 worker.postMessage(mod); 10 worker.postMessage(mod);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 for (var i = byteView.length - 1; i >= startOfWasmHeader + 3; --i) { 50 for (var i = byteView.length - 1; i >= startOfWasmHeader + 3; --i) {
51 if (byteView[i] != 0) { 51 if (byteView[i] != 0) {
52 byteView[i] = 0; 52 byteView[i] = 0;
53 invalidated = true; 53 invalidated = true;
54 break; 54 break;
55 } 55 }
56 } 56 }
57 assert_true(invalidated, 57 assert_true(invalidated,
58 "the serialized blob should contain some non-null bytes."); 58 "the serialized blob should contain some non-null bytes.");
59 59
60 var deserialized = undefined; 60 var deserialized = window.internals.deserializeBuffer(byteView.buffer);
61 try { 61 assert_equals(deserialized, null);
62 deserialized = window.internals.deserializeBuffer(byteView.buffer);
63 assert_unreached();
64 } catch (e) {
65 assert_equals(deserialized, undefined);
66 }
67 }); 62 });
68 } 63 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698