Code-Review | +1 |
for more details.
I wonder if we should have a spec text about this behavior in the speculation rules spec.
AddPrerenderAsync(kPrerenderingUrl);
`AddPrerender()` should work without `PrerenderHostRegistryObserver`
```
int host_id = AddPrerender(kPrerenderingUrl);
```
Also, `AddPrerender()` internally calls `WaitForPrerenderLoadCompletion()`, so you don't need to call it explicitly.
EXPECT_TRUE(ExecJs(web_contents(), ""));
qq: What happens when the initiator page is unexpectedly closed? Does `ExecJs()` return false or crash?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
for more details.
I wonder if we should have a spec text about this behavior in the speculation rules spec.
I think yes, is there any guidance about how to update the spec(?
`AddPrerender()` should work without `PrerenderHostRegistryObserver`
```
int host_id = AddPrerender(kPrerenderingUrl);
```Also, `AddPrerender()` internally calls `WaitForPrerenderLoadCompletion()`, so you don't need to call it explicitly.
Updated, thanks.
EXPECT_TRUE(ExecJs(web_contents(), ""));
qq: What happens when the initiator page is unexpectedly closed? Does `ExecJs()` return false or crash?
It returns false with the error message `(a JavaScript error: "RenderFrame deleted."`. It doesn't crash.
https://source.chromium.org/chromium/chromium/src/+/main:content/public/test/browser_test_utils.h;l=954?q=ExecJs
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
include caseq@ for reviewing `third_party/blink/public/devtools_protocol/browser_protocol.pdl`
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
for more details.
Huanpo LinI wonder if we should have a spec text about this behavior in the speculation rules spec.
I think yes, is there any guidance about how to update the spec(?
Basically you are expected to file a spec issue in https://github.com/WICG/nav-speculation/ and then write a PR like other PRs on the repository. I think domenic@ may know the definitive guide for newcomers. Can you reach out to him?
EXPECT_TRUE(ExecJs(web_contents(), ""));
Huanpo Linqq: What happens when the initiator page is unexpectedly closed? Does `ExecJs()` return false or crash?
It returns false with the error message `(a JavaScript error: "RenderFrame deleted."`. It doesn't crash.
https://source.chromium.org/chromium/chromium/src/+/main:content/public/test/browser_test_utils.h;l=954?q=ExecJs
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// For prerendered pages, if window.close is called, it should be cancelled.
From `ClosePageSource`, it looks like this function can also be called because the browser/tab is shutting down. Do you want to differentiate or exclude those cases maybe?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Bug: 348232620
It might be good to have a separate bug for this feature in particular, just so we can more accurately and publicly track all the different workstreams blocking this meta bug.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
preloading: Cancel prerendering if window.closed is called
closed -> close