forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run SharedArrayBuffer WPT tests in virtual/sharedarraybuffer testsuite
This also fixes an issue in postMessage when CanTransferArrayBuffersAndImageBitmaps is false (e.g. MessagePorts). Previously, we would remove all transferables from the transferables list, serialize that, then transfer the transferables separately. This prevents an exception from being thrown when a SharedArrayBuffer is in the transferables list. BUG=chromium:716320 Review-Url: https://codereview.chromium.org/2860303002 Cr-Commit-Position: refs/heads/master@{#470154}
- Loading branch information
Showing
16 changed files
with
148 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...l/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/README.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This suite runs the tests in with --js-flags=--harmony-sharedarraybuffer | ||
# This enables the SharedArrayBuffer language feature in V8. | ||
# See https://github.com/tc39/ecmascript_sharedmem for more information. |
6 changes: 6 additions & 0 deletions
6
.../safe-passing-of-structured-data/shared-array-buffers/identity-not-preserved-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
PASS postMessaging to this window does not give back the same SharedArrayBuffer (but does use the same backing block) | ||
PASS postMessaging to a worker and back does not give back the same SharedArrayBuffer | ||
PASS postMessaging to an iframe and back does not give back the same SharedArrayBuffer | ||
Harness: the test ran to completion. | ||
|
6 changes: 6 additions & 0 deletions
6
...ructure/safe-passing-of-structured-data/shared-array-buffers/no-transferring-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
PASS Trying to transfer a SharedArrayBuffer to this window throws | ||
PASS Trying to transfer a SharedArrayBuffer to a worker throws | ||
PASS Trying to transfer a SharedArrayBuffer through a MessagePort throws | ||
Harness: the test ran to completion. | ||
|
23 changes: 23 additions & 0 deletions
23
...fe-passing-of-structured-data/shared-array-buffers/serialization-via-history-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
This is a testharness.js-based test. | ||
FAIL history.pushState(): simple case assert_throws: function "() => { | ||
history[method](new SharedArrayBuffer(), "dummy title"); | ||
}" did not throw | ||
FAIL history.pushState(): is interleaved correctly assert_throws: function "() => { | ||
history[method]([ | ||
{ get x() { getter1Called = true; return 5; } }, | ||
new SharedArrayBuffer(), | ||
{ get x() { getter2Called = true; return 5; } } | ||
], "dummy title"); | ||
}" did not throw | ||
FAIL history.replaceState(): simple case assert_throws: function "() => { | ||
history[method](new SharedArrayBuffer(), "dummy title"); | ||
}" did not throw | ||
FAIL history.replaceState(): is interleaved correctly assert_throws: function "() => { | ||
history[method]([ | ||
{ get x() { getter1Called = true; return 5; } }, | ||
new SharedArrayBuffer(), | ||
{ get x() { getter2Called = true; return 5; } } | ||
], "dummy title"); | ||
}" did not throw | ||
Harness: the test ran to completion. | ||
|
4 changes: 4 additions & 0 deletions
4
...fe-passing-of-structured-data/shared-array-buffers/window-domain-success.sub-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is a testharness.js-based test. | ||
PASS postMessaging to a same-origin-domain (but not same-origin) iframe allows them to see each others' modifications | ||
Harness: the test ran to completion. | ||
|
4 changes: 4 additions & 0 deletions
4
...g-of-structured-data/shared-array-buffers/window-serviceworker-failure.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is a testharness.js-based test. | ||
FAIL SharedArrayBuffer cannot cross agent clusters, service worker edition assert_unreached: Got an unexpected message from the service worker: worker onmessage was reached when in state "we are expecting a messageerror due to the window sending us a SAB" and data null Reached unreachable code | ||
Harness: the test ran to completion. | ||
|
4 changes: 4 additions & 0 deletions
4
...ctured-data/shared-array-buffers/window-similar-but-cross-origin-success.sub-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is a testharness.js-based test. | ||
PASS postMessaging to a not same-origin-domain, but similar origin, iframe allows them to see each others' modifications | ||
Harness: the test ran to completion. | ||
|
16 changes: 16 additions & 0 deletions
16
...e/safe-passing-of-structured-data/shared-array-buffers/window-simple-success-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This is a testharness.js-based test. | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with DataView | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Int8Array | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Uint8Array | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Uint8ClampedArray | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Int16Array | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Uint16Array | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Int32Array | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Uint32Array | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Float32Array | ||
PASS postMessaging to a dedicated worker allows them to see each others' modifications with Float64Array | ||
PASS postMessaging to a same-origin iframe allows them to see each others' modifications | ||
PASS postMessaging to a same-origin deeply-nested iframe allows them to see each others' modifications | ||
PASS postMessaging to a same-origin opened window allows them to see each others' modifications | ||
Harness: the test ran to completion. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters