Skip to content

Commit

Permalink
Make the data-url-shared.html test a bit prettier/simpler
Browse files Browse the repository at this point in the history
This has looked odd since
web-platform-tests#5075 and can be
simplified anyway.
  • Loading branch information
foolip authored and kereliuk committed Feb 28, 2018
1 parent a547534 commit 7350ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workers/data-url-shared.html
Expand Up @@ -40,7 +40,7 @@
assert_worker_sends_pass('cross-origin worker', '', 'fetch("/").then(() => port.postMessage("FAIL"), () => port.postMessage("PASS"))');

// 'data:' workers have opaque origin
assert_worker_sends_pass('worker has opaque origin', 'application/javascript', 'if (self.location.origin == "null") port.postMessage("PASS"); else { port.postMessage("FAIL"); }');
assert_worker_sends_pass('worker has opaque origin', 'application/javascript', 'port.postMessage(self.location.origin == "null" ? "PASS" : "FAIL")');

function openWindow(url) {
return new Promise(resolve => {
Expand Down

0 comments on commit 7350ed6

Please sign in to comment.