Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the transfer object into WindowPostMessageOptions #12212

Merged
merged 1 commit into from
Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webmessaging/with-options/broken-origin.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script>
test(function() {
assert_throws('SYNTAX_ERR', function() {
postMessage('', [], {targetOrigin: 'http://foo bar'});
postMessage('', {targetOrigin: 'http://foo bar'});
}, 'should have failed to resolve');
});
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div id="log"></div>
<script>
async_test(function() {
postMessage('', [], {targetOrigin: location.protocol + '//' + location.host + '//'});
postMessage('', {targetOrigin: location.protocol + '//' + location.host + '//'});
onmessage = this.step_func(function(e) {
assert_equals(e.origin, location.protocol + '//' + location.host);
this.done();
Expand Down
10 changes: 0 additions & 10 deletions webmessaging/with-options/invalid-args.tentative.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script>
async_test(function(t) {
var channel = new MessageChannel();
postMessage('', [channel.port1, channel.port2], {targetOrigin: '*'});
postMessage('', {targetOrigin: '*', transfer: [channel.port1, channel.port2]});
onmessage = t.step_func(function(e) {
assert_equals(e.ports.length, 2);
t.done();
Expand Down
2 changes: 1 addition & 1 deletion webmessaging/with-options/no-target-origin.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div id="log"></div>
<script>
async_test(function() {
postMessage('', [], {});
postMessage('', {});
onmessage = this.step_func(function(e) {
assert_equals(e.data, '');
this.done();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!doctype html>
<title>null arg two interpreted as null string</title>
<title>null transfer</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
test(function(t) {
assert_throws(new SyntaxError, () => postMessage('', null));
assert_throws(new TypeError, () => postMessage('', {transfer: null}));
});
</script>
2 changes: 1 addition & 1 deletion webmessaging/with-options/slash-origin.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div id="log"></div>
<script>
async_test(function() {
postMessage('', [], {targetOrigin: '/'});
postMessage('', {targetOrigin: '/'});
onmessage = this.step_func(function(e) {
assert_equals(e.data, '');
this.done();
Expand Down
14 changes: 0 additions & 14 deletions webmessaging/with-options/two-arg.tentative.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div id=log></div>
<script>
async_test(function() {
postMessage('', undefined);
postMessage('', {transfer: undefined});
onmessage = this.step_func(function(e) {
assert_array_equals(e.ports, []);
this.done();
Expand Down
2 changes: 1 addition & 1 deletion webmessaging/with-options/unknown-parameter.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div id="log"></div>
<script>
async_test(function() {
postMessage('', [], {someBogusParameterOnThisDictionary: 'food'});
postMessage('', {someBogusParameterOnThisDictionary: 'food'});
onmessage = this.step_func(function(e) {
assert_equals(e.data, '');
this.done();
Expand Down