Commit 4cc435e9 authored by Eriko Kurimoto's avatar Eriko Kurimoto Committed by Commit Bot

SharedWorker: Fix the wrong WPT undefined-arguments.html

The worker's name must be |''| in this test.

According to the spec, the default value of WorkerOptions (which is the
second argument of SharedWorker) is set as follows:
dictionary WorkerOptions {
  WorkerType type = "classic";
  RequestCredentials credentials = "same-origin";
  DOMString name = "";
};

spec:https://html.spec.whatwg.org/multipage/workers.html#workeroptions
Here, name property is set to an empty string.
Therefore, the worker's name must be an empty string when the second
argument is |undefined|.

Bug: 907749
Change-Id: I5bc9c5afcf76beae1e3924661b2ea65fad5efe1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015911
Commit-Queue: Eriko Kurimoto <elkurin@google.com>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734364}
parent d9fa0f84
This is a testharness.js-based test.
FAIL undefined as arguments assert_equals: second arg expected "undefined" but got ""
Harness: the test ran to completion.
......@@ -14,7 +14,7 @@ onconnect = function(e) {
var worker = new SharedWorker(undefined, undefined);
worker.port.addEventListener('message', this.step_func(function(e) {
assert_equals(e.data[0], 'undefined', 'first arg');
assert_equals(e.data[1], 'undefined', 'second arg');
assert_equals(e.data[1], '', 'second arg');
this.done();
}), false);
worker.port.start();
......@@ -22,4 +22,4 @@ onconnect = function(e) {
</script>
<!--
*/
//-->
\ No newline at end of file
//-->
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment