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

Unified Diff: test/mjsunit/regress/regress-crbug-514081.js

Issue 2697723004: Make regress-crbug-514081 less flaky by having max serialization size (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-514081.js
diff --git a/test/mjsunit/regress/regress-crbug-514081.js b/test/mjsunit/regress/regress-crbug-514081.js
index af31f4b9c6ceed6e74e5deea65f03d0b7b12e19b..ee3ed81300dab183fbbb7cef24f70ad2ff12407a 100644
--- a/test/mjsunit/regress/regress-crbug-514081.js
+++ b/test/mjsunit/regress/regress-crbug-514081.js
@@ -5,16 +5,14 @@
if (this.Worker) {
var __v_7 = new Worker('onmessage = function() {};');
var e;
+ var ab = new ArrayBuffer(2 * 1000 * 1000);
try {
- var ab = new ArrayBuffer(2147483648);
- try {
- __v_7.postMessage(ab);
- } catch (e) {
- // postMessage failed, should be a DataCloneError message.
- assertContains('cloned', e.message);
- }
+ __v_7.postMessage(ab);
+ threw = false;
} catch (e) {
- // Creating the ArrayBuffer failed.
- assertInstanceof(e, RangeError);
+ // postMessage failed, should be a DataCloneError message.
+ assertContains('cloned', e.message);
+ threw = true;
}
+ assertTrue(threw, 'Should throw when trying to serialize large message.');
}
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698