Skip to content

Commit

Permalink
[wpt] Fix web-share/disabled...cross-origin... when run with WebDriver
Browse files Browse the repository at this point in the history
Same fix as https://crrev.com/c/5888751:
* The testharness.js context should also load `testdriver(-vendor).js`.
* The child iframe should `set_test_context(parent)` to send its
  testdriver actions to the testharness context [0].

[0]: https://web-platform-tests.org/writing-tests/testdriver.html#using-test-driver-in-other-browsing-contexts

Bug: None
Change-Id: I34b159d13990c48ab9232267ae5e153e2a01187a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5889244
Auto-Submit: Jonathan Lee <jonathanjlee@google.com>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1359968}
  • Loading branch information
jonathan-j-lee authored and chromium-wpt-export-bot committed Sep 25, 2024
1 parent ffcb5e5 commit a19eaaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
</head>
<body></body>
<script>
Expand Down
2 changes: 2 additions & 0 deletions web-share/resources/post-message.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
test_driver.set_test_context(parent);

window.addEventListener("message", async (event) => {
const {
data: { action, data },
Expand Down

0 comments on commit a19eaaf

Please sign in to comment.