Skip to content

Commit

Permalink
fix: replace navigations to data:, with about:blank (#1993)
Browse files Browse the repository at this point in the history
  • Loading branch information
bicknellr authored Jul 18, 2022
1 parent 3f671e7 commit 8a81317
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/tough-bikes-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@web/test-runner-selenium': patch
'@web/test-runner-webdriver': patch
---

Navigations to blank pages now use `about:blank` instead of `data:,`.
2 changes: 1 addition & 1 deletion packages/test-runner-selenium/src/IFrameManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class IFrameManager {
}
// set src after retreiving values to avoid the iframe from navigating away
iframe.src = "data:,";
iframe.src = "about:blank";
return { testCoverage: testCoverage };
`);

Expand Down
2 changes: 1 addition & 1 deletion packages/test-runner-webdriver/src/IFrameManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class IFrameManager {
iframe.addEventListener('load', loaded);
iframe.addEventListener('error', loaded);
// set src after retrieving values to avoid the iframe from navigating away
iframe.src = "data:,";
iframe.src = "about:blank";
`);

if (!validateBrowserResult(returnValue)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-runner-webdriver/src/SessionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class SessionManager {
const { testCoverage } = returnValue;

// navigate to an empty page to kill any running code on the page
await this.driver.navigateTo('data:,');
await this.driver.navigateTo('about:blank');

this.urlMap.delete(id);

Expand Down

0 comments on commit 8a81317

Please sign in to comment.