Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utility): create utility world when web security is disabled #31458

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

pavelfeldman
Copy link
Member

@pavelfeldman pavelfeldman commented Jun 27, 2024

Reverts previous attempt at #31096

Fixes: #31431
Fixes: #31442

tests/library/chromium/disable-web-security.spec.ts Outdated Show resolved Hide resolved
const guid = createGuid();
this.source = `(() => {
globalThis.__pwInitScripts = globalThis.__pwInitScripts || {};
const hasInitScript = globalThis.__pwInitScripts[${JSON.stringify(guid)}];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const hasInitScript = globalThis.__pwInitScripts[${JSON.stringify(guid)}];
const hasInitScript = globalThis.__pwInitScripts['${guid}'];

Here and below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like JSON.stringify for consistency and safety when concating scripts.

This comment has been minimized.

@pavelfeldman pavelfeldman merged commit c9e673c into microsoft:main Jun 27, 2024
11 checks passed
pavelfeldman added a commit that referenced this pull request Jun 27, 2024
Copy link
Contributor

Test results for "tests 1"

10 flaky ⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [firefox-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [firefox-page] › page/frame-goto.spec.ts:46:3 › should continue after client redirect
⚠️ [firefox-page] › page/workers.spec.ts:106:3 › should clear upon navigation
⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [playwright-test] › ui-mode-test-screencast.spec.ts:21:5 › should show screenshots
⚠️ [webkit-library] › library/browsercontext-add-cookies.spec.ts:429:3 › should allow unnamed cookies
⚠️ [webkit-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture

28397 passed, 649 skipped
✔️✔️✔️

Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants