Skip to content

Commit

Permalink
Merge pull request #11315 from web-platform-tests/importscripts-fix
Browse files Browse the repository at this point in the history
Correct importScripts() behavior test
  • Loading branch information
jungkees committed Jun 3, 2018
2 parents 1dc612f + 15951e2 commit ee82278
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
return post_and_wait_for_reply(worker, 'message');
})
.then(result => {
assert_equals(result.error, 'TypeError');
assert_equals(result.error, 'NetworkError');
assert_equals(result.value, null);
});
}, 'import script not previously imported');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ let echo_output = null;

// Tests importing a script that sets |echo_output| to the query string.
function test_import(str) {
echo_output = null;
importScripts('import-scripts-echo.py?msg=' + str);
assert_equals(echo_output, str);
}
Expand All @@ -18,6 +19,7 @@ self.addEventListener('install', () => {

self.addEventListener('message', e => {
var error = null;
echo_output = null;

try {
importScripts('import-scripts-echo.py?msg=' + e.data);
Expand Down

0 comments on commit ee82278

Please sign in to comment.