Skip to content

Commit

Permalink
[wptrunner] Do not include testharness{,report}.js twice (web-platf…
Browse files Browse the repository at this point in the history
…orm-tests#43984)

Injecting `<script src="/resources/testharness{,report}.js">` is an
implicit behavior of `wptserve` for `.js` files [0].

Including `testharnessreport.js` twice for `content_shell` appears
benign, but causes issues for the default WebDriver testharness
implementation. Exporting this change will enable useful coverage for
such browsers.

A follow-up PR upstream will have `wpt lint` ban such duplicate scripts.

[0]: https://github.com/web-platform-tests/wpt/blob/9e0d5be/tools/serve/serve.py#L273-L451

Bug: 1518022
Change-Id: I7a6e344c82bbaa33adfa578feeb966fa92f08040
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5195267
Commit-Queue: Jonathan Lee <[email protected]>
Reviewed-by: Weizhong Xia <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1247652}

Co-authored-by: Jonathan Lee <[email protected]>
  • Loading branch information
chromium-wpt-export-bot and jonathan-j-lee authored Jan 16, 2024
1 parent 3763aff commit f66439a
Show file tree
Hide file tree
Showing 28 changed files with 2 additions and 61 deletions.
3 changes: 1 addition & 2 deletions fetch/api/basic/keepalive.any.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// META: global=window
// META: timeout=long
// META: title=Fetch API: keepalive handling
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=../resources/keepalive-helper.js
Expand Down
2 changes: 0 additions & 2 deletions fetch/api/cors/cors-keepalive.any.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// META: global=window
// META: timeout=long
// META: title=Fetch API: keepalive handling
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=../resources/keepalive-helper.js
Expand Down
3 changes: 1 addition & 2 deletions fetch/api/redirect/redirect-keepalive.any.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// META: global=window
// META: timeout=long
// META: title=Fetch API: keepalive handling
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=../resources/keepalive-helper.js
Expand Down
2 changes: 0 additions & 2 deletions fetch/api/redirect/redirect-keepalive.https.any.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// META: global=window
// META: title=Fetch API: keepalive handling
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=../resources/keepalive-helper.js
Expand Down
2 changes: 0 additions & 2 deletions fetch/fetch-later/activate-after.tentative.https.window.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
Expand Down
3 changes: 0 additions & 3 deletions fetch/fetch-later/basic.tentative.https.window.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js

'use strict';

test(() => {
Expand Down
2 changes: 0 additions & 2 deletions fetch/fetch-later/iframe.tentative.https.window.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
Expand Down
2 changes: 0 additions & 2 deletions fetch/fetch-later/new-window.tentative.https.window.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
Expand Down
3 changes: 0 additions & 3 deletions fetch/fetch-later/non-secure.window.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js

'use strict';

test(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// META: title=FetchLater: allowed by CSP
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// META: title=FetchLater: blocked by CSP
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// META: title=FetchLater: redirect blocked by CSP
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/common/get-host-info.sub.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
Expand Down
2 changes: 0 additions & 2 deletions fetch/fetch-later/quota.tentative.https.window.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
// META: timeout=long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=/pending-beacon/resources/pending_beacon-helper.js
// META: timeout=long
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// // META: script=/common/utils.js
// // META: script=/resources/testdriver.js
// // META: script=/resources/testdriver-vendor.js
// // META: script=/resources/testharness.js
// // META: script=/resources/testharnessreport.js
// // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
// // META: script=./resources/sandbox-top-navigation-helper.js

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// META: script=/common/utils.js
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
// META: script=./resources/sandbox-top-navigation-helper.js

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// META: script=/common/utils.js
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
// META: script=./resources/sandbox-top-navigation-helper.js

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// META: script=/common/utils.js
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
// META: script=./resources/sandbox-top-navigation-helper.js

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// META: script=/common/utils.js
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
// META: script=./resources/sandbox-top-navigation-helper.js

Expand Down
3 changes: 0 additions & 3 deletions pending-beacon/pending_beacon-basic.window.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js

'use strict';

test(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/utils.js
// META: script=./resources/pending_beacon-helper.js

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/common/dispatcher/dispatcher.js
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=/shape-detection/resources/shapedetection-helpers.js

const imgUint16 = new ImageData(1024, 1024, {storageFormat: 'uint16'});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js

'use strict';

promise_test(async t => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js

'use strict';

test(() => {
Expand Down

0 comments on commit f66439a

Please sign in to comment.