Vlad and Reilly, this should be identical to the changes you reviewed in https://chromium-review.googlesource.com/c/chromium/src/+/5581251.
Arthur - can you take a look at the tests? I still need add the process isolation tests..
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
THanks!
crbug.com/344963946 virtual/coop-noopener-allow-popups/external/wpt/html/cross-origin-opener-policy/coop-noopener-allow-popups-restrict-properties.tentative.https.html [ Failure Pass ]
Does it fail, or does it pass?
crbug.com/344963946 virtual/coop-noopener-allow-popups/external/wpt/html/cross-origin-opener-policy/coop-noopener-allow-popups.https.html [ Failure Pass ]
This is meant for flaky tests or things the gardeners quickly disabled.
It would be better to have some test expectations files instead.
See:
https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/web_test_expectations.md#local-manual-rebaselining
You can use `--reset-results` to create those files.
"bases": ["external/wpt/html/cross-origin-opener-policy/coop-noopener-allow-popups.https.html",
Should you group everything related to this feature under a common directory?
<script src=/resources/testharness.js></script>
optional nit: add " around every attributes value.
"restrict-properties-allow-popups",
This doesn't exist.
<!doctype html>
This is testing non specified behavior, so the filename should contain "tentative" or be put an a directory about experimental tests.
const test_noopener_opening_popup = (opener_coop, openee_coop, opener_expectation) => {
nit: wrap to fit 80 columns.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
crbug.com/344963946 virtual/coop-noopener-allow-popups/external/wpt/html/cross-origin-opener-policy/coop-noopener-allow-popups-restrict-properties.tentative.https.html [ Failure Pass ]
Does it fail, or does it pass?
Removed!
crbug.com/344963946 virtual/coop-noopener-allow-popups/external/wpt/html/cross-origin-opener-policy/coop-noopener-allow-popups.https.html [ Failure Pass ]
This is meant for flaky tests or things the gardeners quickly disabled.
It would be better to have some test expectations files instead.
See:
https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/testing/web_test_expectations.md#local-manual-rebaseliningYou can use `--reset-results` to create those files.
Created expectations!
"bases": ["external/wpt/html/cross-origin-opener-policy/coop-noopener-allow-popups.https.html",
Should you group everything related to this feature under a common directory?
Done
optional nit: add " around every attributes value.
Done
"restrict-properties-allow-popups",
Yoav Weiss (@Shopify)This doesn't exist.
oops!
This is testing non specified behavior, so the filename should contain "tentative" or be put an a directory about experimental tests.
Done
const test_noopener_opening_popup = (opener_coop, openee_coop, opener_expectation) => {
nit: wrap to fit 80 columns.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Thanks!
LGTM % 12 suggestions below:
// Verify that the `noopener-allow-popups COOP header value triggers
// isolation, and that this behaves sanely with window.open().
nit: fit 80 columns:
```
// Verify that the `noopener-allow-popups COOP header value triggers isolation,
// and that this behaves sanely with window.open().
```
// swap a BrowsingInstance because of noopener-allow-popups. Verify that the
// popup ends up in a different SiteInstance from the opener (which requires a
// dedicated process).
The implication: "different SiteInstance" => "different process" is not true in general. Could you rework the comment to avoid making this claim?
EXPECT_EQ(popup_rfh->GetSiteInstance(), coop_instance);
Can we check if the SiteInstance::GetProcess() are different?
NavigationVirtualBrowsingContextGroupNoopener) {
Could you duplicate this test, but use COOP-RO instead of COOP?
false,
false,
Note: I am expecting those values to be updated once you land the implementation. You might want to add a TODO making it clear this is expected to be updated.
features::kCoopNoopenerAllowPopups},
add a trailing "," to get a better formatting.
```
{
features::kCrossOriginOpenerPolicy,
features::kCoopRestrictProperties,
features::kCoopNoopenerAllowPopups,
},
```
{"noopener-allow-popups", kCoepNone, kNoHeader, kCoepNone, kNoEndpoint,
Optional: You might want to add a TODO about fixing landing the implementation to fix this.
// severe its opener relationship with the document that opened it.
Could you add a link to the proposal?
<script src=/resources/testharness.js></script>
Yoav Weiss (@Shopify)optional nit: add " around every attributes value.
Done
(re-open, because it is not done)
const test_noopener_opening_popup =
nit: Add a description of the test:
```
// Open a same-origin popup with `opener_coop` header, then open a popup with
// `openee_coop` header. Check whether the opener can script the openee.
```
const test_noopener_navigating_away = (popup_coop) => {
nit: Add a description.
```
// Open a same-origin popup with `popup_coop` header, then navigate away toward
// one with `noopener-allow-popups`. Check the opener can't script the openee.
```
const executor_path = '/common/dispatcher/executor.html?pipe=';
const coop_header = policy => {
return `|header(Cross-Origin-Opener-Policy,${policy})`;
};
function getExecutorPath(uuid, origin, coop_header) {
return origin.origin + executor_path + coop_header + `&uuid=${uuid}`;
}
const test_noopener_opening_popup =
(opener_coop, openee_coop, opener_expectation) => {
promise_test(
async t => {
// Set up dispatcher communications.
const popup_token = token();
const reply_token = token();
const popup_reply_token = token();
const popup_openee_token = token();
const popup_url = getExecutorPath(
popup_token, SAME_ORIGIN, coop_header(opener_coop));
// We open a popup and then ping it, it will respond after loading.
const popup = window.open(popup_url);
t.add_cleanup(() => send(popup_token, 'window.close()'));
send(popup_token, `send('${reply_token}', 'Popup loaded');`);
assert_equals(await receive(reply_token), 'Popup loaded');
if (opener_coop == 'noopener-allow-popups') {
// Assert that we can't script the popup.
assert_equals(popup.window, null, 'Opener popup.window is null');
assert_true(popup.closed, 'Opener popup.closed');
}
// Ensure that the popup has no access to its opener.
send(popup_token, `
let openerDOMAccessAllowed = false;
try {
openerDOMAccessAllowed = !!self.opener.document.URL;
} catch(ex) {
}
const payload = {
opener: !!self.opener,
openerDOMAccess: openerDOMAccessAllowed
};
send('${reply_token}', JSON.stringify(payload));
`);
let payload = JSON.parse(await receive(reply_token));
if (opener_coop == 'noopener-allow-popups') {
assert_false(payload.opener, 'popup opener');
assert_false(payload.openerDOMAccess, 'popup DOM access');
}
// Open another popup from inside the popup, and wait for it to
// load.
const popup_openee_url = getExecutorPath(
popup_openee_token, SAME_ORIGIN, coop_header(openee_coop));
send(popup_token, `
window.openee = open("${popup_openee_url}");
await receive('${popup_reply_token}');
const payload = {
openee: !!window.openee,
closed: window.openee.closed
};
send('${reply_token}', JSON.stringify(payload));
`);
t.add_cleanup(() => send(popup_token, 'window.openee.close()'));
// Notify the popup that its openee was loaded.
send(popup_openee_token, `send('${popup_reply_token}',
'popup openee opened');`);
// Assert that the popup has access to its openee.
payload = JSON.parse(await receive(reply_token));
assert_true(payload.openee, 'popup openee');
// Assert that the openee has access to its popup opener.
send(popup_openee_token, `
let openerDOMAccessAllowed = false;
try {
openerDOMAccessAllowed = !!self.opener.document.URL;
} catch(ex) {
}
const payload = {
opener: !!self.opener,
openerDOMAccess: openerDOMAccessAllowed
};
send('${reply_token}', JSON.stringify(payload));
`);
payload = JSON.parse(await receive(reply_token));
if (opener_expectation) {
assert_true(payload.opener, 'Opener is not null');
assert_true(payload.openerDOMAccess, 'No DOM access');
} else {
assert_false(payload.opener, 'Opener is null');
assert_false(payload.openerDOMAccess, 'No DOM access');
}
},
'noopener-allow-popups ensures that the opener cannot script the openee,' +
' but further popups with no COOP can access their opener: ' +
opener_coop + '/' + openee_coop);
};
const test_noopener_navigating_away = (popup_coop) => {
promise_test(
async t => {
// Set up dispatcher communications.
const popup_token = token();
const reply_token = token();
const popup_reply_token = token();
const popup_second_token = token();
const popup_url =
getExecutorPath(popup_token, SAME_ORIGIN, coop_header(popup_coop));
// We open a popup and then ping it, it will respond after loading.
const popup = window.open(popup_url);
send(popup_token, `send('${reply_token}', 'Popup loaded');`);
assert_equals(await receive(reply_token), 'Popup loaded');
t.add_cleanup(() => send(popup_token, 'window.close()'));
// Assert that we can script the popup.
assert_not_equals(popup.window, null);
assert_false(popup.closed, 'popup closed');
// Ensure that the popup has no access to its opener.
send(popup_token, `
let openerDOMAccessAllowed = false;
try {
openerDOMAccessAllowed = !!self.opener.document.URL;
} catch(ex) {
}
const payload = {
opener: !!self.opener,
openerDOMAccess: openerDOMAccessAllowed
};
send('${reply_token}', JSON.stringify(payload));
`);
let payload = JSON.parse(await receive(reply_token));
assert_true(payload.opener, 'popup opener');
assert_true(payload.openerDOMAccess, 'popup DOM access');
// Navigate the popup
const popup_second_url = getExecutorPath(
popup_second_token, SAME_ORIGIN,
coop_header('noopener-allow-popups'));
send(popup_token, `
window.location = '${popup_second_url}';
`);
// Notify the popup that its openee was loaded.
send(
popup_second_token,
`send('${reply_token}', 'popup navigated away');`);
assert_equals(await receive(reply_token), 'popup navigated away');
assert_equals(popup.window, null);
assert_true(popup.closed, 'popup.closed');
},
'noopener-allow-popups ensures that the opener cannot script the openee,' +
' even after a navigation: ' + popup_coop);
};
The indentation is broken. Could you fix it?
```suggestion
const executor_path = '/common/dispatcher/executor.html?pipe=';
const coop_header = policy => {
return `|header(Cross-Origin-Opener-Policy,${policy})`;
};
function getExecutorPath(uuid, origin, coop_header) {
return origin.origin + executor_path + coop_header + `&uuid=${uuid}`;
}
// Open a same-origin popup with `opener_coop` header, then open a popup with
// `openee_coop` header. Check whether the opener can script the openee.
const test_noopener_opening_popup = (
opener_coop,
openee_coop,
opener_expectation
) => {
promise_test(async t => {
// Set up dispatcher communications.
const popup_token = token();
const reply_token = token();
const popup_reply_token = token();
const popup_openee_token = token();
const popup_url = getExecutorPath(
popup_token, SAME_ORIGIN, coop_header(opener_coop));
// We open a popup and then ping it, it will respond after loading.
const popup = window.open(popup_url);
t.add_cleanup(() => send(popup_token, 'window.close()'));
send(popup_token, `send('${reply_token}', 'Popup loaded');`);
assert_equals(await receive(reply_token), 'Popup loaded');
if (opener_coop == 'noopener-allow-popups') {
// Assert that we can't script the popup.
assert_equals(popup.window, null, 'Opener popup.window is null');
assert_true(popup.closed, 'Opener popup.closed');
}
// Ensure that the popup has no access to its opener.
send(popup_token, `
let openerDOMAccessAllowed = false;
try {
openerDOMAccessAllowed = !!self.opener.document.URL;
} catch(ex) {}
const payload = {
opener: !!self.opener,
openerDOMAccess: openerDOMAccessAllowed
};
send('${reply_token}', JSON.stringify(payload));
`);
let payload = JSON.parse(await receive(reply_token));
if (opener_coop == 'noopener-allow-popups') {
assert_false(payload.opener, 'popup opener');
assert_false(payload.openerDOMAccess, 'popup DOM access');
}
// Open another popup from inside the popup, and wait for it to load.
const popup_openee_url = getExecutorPath(popup_openee_token, SAME_ORIGIN,
coop_header(openee_coop));
send(popup_token, `
window.openee = open("${popup_openee_url}");
await receive('${popup_reply_token}');
const payload = {
openee: !!window.openee,
closed: window.openee.closed
};
send('${reply_token}', JSON.stringify(payload));
`);
t.add_cleanup(() => send(popup_token, 'window.openee.close()'));
// Notify the popup that its openee was loaded.
send(popup_openee_token, `
send('${popup_reply_token}', 'popup openee opened');
`);
// Assert that the popup has access to its openee.
payload = JSON.parse(await receive(reply_token));
assert_true(payload.openee, 'popup openee');
// Assert that the openee has access to its popup opener.
send(popup_openee_token, `
let openerDOMAccessAllowed = false;
try {
openerDOMAccessAllowed = !!self.opener.document.URL;
} catch(ex) {}
const payload = {
opener: !!self.opener,
openerDOMAccess: openerDOMAccessAllowed
};
send('${reply_token}', JSON.stringify(payload));
`);
payload = JSON.parse(await receive(reply_token));
if (opener_expectation) {
assert_true(payload.opener, 'Opener is not null');
assert_true(payload.openerDOMAccess, 'No DOM access');
} else {
assert_false(payload.opener, 'Opener is null');
assert_false(payload.openerDOMAccess, 'No DOM access');
}
},
'noopener-allow-popups ensures that the opener cannot script the openee,' +
' but further popups with no COOP can access their opener: ' +
opener_coop + '/' + openee_coop);
};
// Open a same-origin popup with `popup_coop` header, then navigate away toward
// one with `noopener-allow-popups`. Check the opener can't script the openee.
const test_noopener_navigating_away = (popup_coop) => {
promise_test(async t => {
// Set up dispatcher communications.
const popup_token = token();
const reply_token = token();
const popup_reply_token = token();
const popup_second_token = token();
const popup_url =
getExecutorPath(popup_token, SAME_ORIGIN, coop_header(popup_coop));
// We open a popup and then ping it, it will respond after loading.
const popup = window.open(popup_url);
send(popup_token, `send('${reply_token}', 'Popup loaded');`);
assert_equals(await receive(reply_token), 'Popup loaded');
t.add_cleanup(() => send(popup_token, 'window.close()'));
// Assert that we can script the popup.
assert_not_equals(popup.window, null);
assert_false(popup.closed, 'popup closed');
// Ensure that the popup has no access to its opener.
send(popup_token, `
let openerDOMAccessAllowed = false;
try {
openerDOMAccessAllowed = !!self.opener.document.URL;
} catch(ex) {}
const payload = {
opener: !!self.opener,
openerDOMAccess: openerDOMAccessAllowed
};
send('${reply_token}', JSON.stringify(payload));
`);
let payload = JSON.parse(await receive(reply_token));
assert_true(payload.opener, 'popup opener');
assert_true(payload.openerDOMAccess, 'popup DOM access');
// Navigate the popup.
const popup_second_url = getExecutorPath(
popup_second_token, SAME_ORIGIN,
coop_header('noopener-allow-popups'));
send(popup_token, `
window.location = '${popup_second_url}';
`);
// Notify the popup that its openee was loaded.
send(popup_second_token, `
send('${reply_token}', 'popup navigated away');
`);
assert_equals(await receive(reply_token), 'popup navigated away');
assert_equals(popup.window, null);
assert_true(popup.closed, 'popup.closed');
},
'noopener-allow-popups ensures that the opener cannot script the openee,' +
' even after a navigation: ' + popup_coop);
};
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Verify that the `noopener-allow-popups COOP header value triggers
// isolation, and that this behaves sanely with window.open().
nit: fit 80 columns:
```
// Verify that the `noopener-allow-popups COOP header value triggers isolation,
// and that this behaves sanely with window.open().
```
Done
// swap a BrowsingInstance because of noopener-allow-popups. Verify that the
// popup ends up in a different SiteInstance from the opener (which requires a
// dedicated process).
The implication: "different SiteInstance" => "different process" is not true in general. Could you rework the comment to avoid making this claim?
Removed the parenthesis. (but a similar comment is already in line 6715)
nit: Add a description of the test:
```
// Open a same-origin popup with `opener_coop` header, then open a popup with
// `openee_coop` header. Check whether the opener can script the openee.
```
Done
const test_noopener_navigating_away = (popup_coop) => {
nit: Add a description.
```
// Open a same-origin popup with `popup_coop` header, then navigate away toward
// one with `noopener-allow-popups`. Check the opener can't script the openee.
```
Done
const executor_path = '/common/dispatcher/executor.html?pipe=';
Done! `git cl format --js` messed up the indentation, it seems..
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
NavigationVirtualBrowsingContextGroupNoopener) {
Could you duplicate this test, but use COOP-RO instead of COOP?
Would you like a completely separate test, or should I just add the RO cases to this one?
false,
false,
Note: I am expecting those values to be updated once you land the implementation. You might want to add a TODO making it clear this is expected to be updated.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
add a trailing "," to get a better formatting.
```
{
features::kCrossOriginOpenerPolicy,
features::kCoopRestrictProperties,
features::kCoopNoopenerAllowPopups,
},
```
Done
{"noopener-allow-popups", kCoepNone, kNoHeader, kCoepNone, kNoEndpoint,
Optional: You might want to add a TODO about fixing landing the implementation to fix this.
Done
// severe its opener relationship with the document that opened it.
Could you add a link to the proposal?
Done
false,
false,
Yoav Weiss (@Shopify)Note: I am expecting those values to be updated once you land the implementation. You might want to add a TODO making it clear this is expected to be updated.
Adding a TODO
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
<script src=/resources/testharness.js></script>
Yoav Weiss (@Shopify)optional nit: add " around every attributes value.
Arthur SonzogniDone
(re-open, because it is not done)
Oops!! Should be good now
EXPECT_EQ(popup_rfh->GetSiteInstance(), coop_instance);
Can we check if the SiteInstance::GetProcess() are different?
Added a check (that currently fails)
assert_equals(popup.window, null, 'Opener popup.window is null');
I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Indeed, I see there are no causality chains preventing this race from happening:
```
┌────┐ ┌───────┐ ┌─────────────┐┌─────────────┐
│test│ │browser│ │popup_old_doc││popup_new_doc│
└─┬──┘ └───┬───┘ └──────┬──────┘└──────┬──────┘
│ │ │ │
│ window.open │ │ │
│─────────────────────────>│ │ │
│ │ │ │
│ │Create window and the initial empty document│ │
│ │───────────────────────────────────────────>│ │
│ │ │ │
│ │ CommitNavigation in a new doc│ │
│ │──────────────────────────────────────────────────────────>│
│ │ │ │
│ │ SwapIn (DidCommitNavigation) │ │
│ │<──────────────────────────────────────────────────────────│
│ │ │ │
│ │ Destroy RenderFrameHostProxy │ │
│ │<───────────────────────────────────────────│ │
│ │ │ │
│ │ Ping │ │
│─────────────────────────────────────────────────────────────────────────────────────>│
│ │ Pong │ │
│<─────────────────────────────────────────────────────────────────────────────────────│
│ │ │ │
│ │ SwapOut │ │
│ │───────────────────────────────────────────>│ │
│ │ Remove old_doc RenderFrameHost │ │
│ │<───────────────────────────────────────────│ │
│Remove old WindowProxy │ │ │
│<─────────────────────────│ │ │
┌─┴──┐ ┌───┴───┐ ┌──────┴──────┐┌──────┴──────┐
│test│ │browser│ │popup_old_doc││popup_new_doc│
└────┘ └───────┘ └─────────────┘└─────────────┘
```
It means this process (1) can talk to the process (2) handling creating the popup's new document, while the process (3) is destroying the popup's old document.
Could you wait for this process (1) to see the destruction of the old document using:
https://web-platform-tests.org/writing-tests/testharness-api.html#timers-in-tests
e.g. `step_wait()`?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +1 |
assert_equals(popup.window, null, 'Opener popup.window is null');
I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
@arthurs...@chromium.org confirmed that this is racy, so removed.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
@arthurs...@chromium.org confirmed that this is racy, so removed.
What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Arthur Sonzogni@arthurs...@chromium.org confirmed that this is racy, so removed.
What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Added an await (with a 1 second timeout) and it seems flaky..
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Arthur Sonzogni@arthurs...@chromium.org confirmed that this is racy, so removed.
Yoav Weiss (@Shopify)What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Added an await (with a 1 second timeout) and it seems flaky..
Why are you talking about a timeout? Did you try `step_awaiŧ`?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Arthur Sonzogni@arthurs...@chromium.org confirmed that this is racy, so removed.
Yoav Weiss (@Shopify)What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Arthur SonzogniAdded an await (with a 1 second timeout) and it seems flaky..
Why are you talking about a timeout? Did you try `step_awaiŧ`?
I added `await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null', 1000)`, and (so a timeout of 1 second) and I see it timing out occasionally
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Arthur Sonzogni@arthurs...@chromium.org confirmed that this is racy, so removed.
Yoav Weiss (@Shopify)What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Arthur SonzogniAdded an await (with a 1 second timeout) and it seems flaky..
Yoav Weiss (@Shopify)Why are you talking about a timeout? Did you try `step_awaiŧ`?
I added `await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null', 1000)`, and (so a timeout of 1 second) and I see it timing out occasionally
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Arthur Sonzogni@arthurs...@chromium.org confirmed that this is racy, so removed.
Yoav Weiss (@Shopify)What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Arthur SonzogniAdded an await (with a 1 second timeout) and it seems flaky..
Yoav Weiss (@Shopify)Why are you talking about a timeout? Did you try `step_awaiŧ`?
Arthur SonzogniI added `await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null', 1000)`, and (so a timeout of 1 second) and I see it timing out occasionally
And without a timeout?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Arthur Sonzogni@arthurs...@chromium.org confirmed that this is racy, so removed.
Yoav Weiss (@Shopify)What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Arthur SonzogniAdded an await (with a 1 second timeout) and it seems flaky..
Yoav Weiss (@Shopify)Why are you talking about a timeout? Did you try `step_awaiŧ`?
Arthur SonzogniI added `await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null', 1000)`, and (so a timeout of 1 second) and I see it timing out occasionally
Yoav Weiss (@Shopify)And without a timeout?
Trying now..
I think the entire test was timing out, so added a meta for a long timeout. I'm still not sure this would work on the webkit side of things though..
Code-Review | +1 |
NavigationVirtualBrowsingContextGroupNoopener) {
Yoav Weiss (@Shopify)Could you duplicate this test, but use COOP-RO instead of COOP?
Would you like a completely separate test, or should I just add the RO cases to this one?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
assert_equals(popup.window, null, 'Opener popup.window is null');
Yoav Weiss (@Shopify)I'm thinking of removing this check, as I'm not sure it's guaranteed to be true (without races). Thoughts?
Arthur Sonzogni@arthurs...@chromium.org confirmed that this is racy, so removed.
Yoav Weiss (@Shopify)What about `step_wait()` conditions?
```
await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null')
```
Arthur SonzogniAdded an await (with a 1 second timeout) and it seems flaky..
Yoav Weiss (@Shopify)Why are you talking about a timeout? Did you try `step_awaiŧ`?
Arthur SonzogniI added `await t.step_wait(() => popup.window == null, 'Opener popup.window becomes null', 1000)`, and (so a timeout of 1 second) and I see it timing out occasionally
Yoav Weiss (@Shopify)And without a timeout?
Yoav Weiss (@Shopify)Trying now..
I think the entire test was timing out, so added a meta for a long timeout. I'm still not sure this would work on the webkit side of things though..
ACK
'Opener popup.window becomes null', 1000)
What about omitting this and keep the default value? (3000)
I would like to avoid the test to fail, because the web browser is slow.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +1 |
What about omitting this and keep the default value? (3000)
I would like to avoid the test to fail, because the web browser is slow.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |