I'm trying to run the web-platform-tests under service-workers by the following command after I imported the tests using update-w3c-deps.
./third_party/WebKit/Tools/Scripts/run-webkit-tests --enable-wptserve -t Release imported/wpt/service-workers/service-worker/navigation-redirec│
t.https.html
This gets the following error because the origin coming from '{{host}}' is '127.0.0.1' though the origin of the resource is 'web-platform.test'.
== Error ==
This is a testharness.js-based test.
FAIL Clients.matchAll() should not show an old window as controlled after it navigates. assert_unreached: unregister should not fail: Failed to get a ServiceWorkerRegistration: The origin of the provided documentURL ('https://127.0.0.1:8444') does not match the current origin ('https://web-platform.test:8444'). Reached unreachable code
FAIL Clients.matchAll() should not show an old window after it navigates. assert_unreached: unregister should not fail: Failed to get a ServiceWorkerRegistration: The origin of the provided documentURL ('https://127.0.0.1:8444') does not match the current origin ('https://web-platform.test:8444'). Reached unreachable code
Harness: the test ran to completion.
========
I investigated the detail, and found 127.0.0.1 is set at /third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt.config.json
This "host" option should be removed to translate '{{host}}' correctly, but this causes an error because 'serve' tries to listen to the "host", and "web-platform.test" cannot be resolved by DNS unless /etc/hosts isn't modified.
Could you take a look?
Comment 1 by jeffcarp@chromium.org
, Sep 16 2016