Fergal Daly abandoned this change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
webui_contents->GetController().Reload(content::ReloadType::NORMAL,Will this `Reload` immediately drive everything as far as `Commit`? Is there any need to wait for anything?
And then, should
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(Maybe this task should be posted before calling `Reload` to ensure it hits before `DidCommit`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
webui_contents->GetController().Reload(content::ReloadType::NORMAL,Will this `Reload` immediately drive everything as far as `Commit`? Is there any need to wait for anything?
And then, should
Yeah I don't think you need to wait, just make sure you got the action before DidCommit?
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(Maybe this task should be posted before calling `Reload` to ensure it hits before `DidCommit`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (rfh) {This old test code is odd. Why would `rfh` be null and why would we want that to result in a pass? Same for handler below. It might not even call `BindInterface` every time it's run.
I added `ASSERT_TRUE`s to make sure it does.
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(Rakina Zata AmniMaybe this task should be posted before calling `Reload` to ensure it hits before `DidCommit`.
Can you use `DidCommitNavigationInterceptor` instead?
Do we want to post a task from there? That will definitely be run *after* `DidCommit`. I think I don't properly understand what this is testing.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
PTAL, this is ready for review.
Russ, please check WebUIToolbarWebViewRaceTest.BindInterfaceAfterCloseRace.
Thanks,
webui_contents->GetController().Reload(content::ReloadType::NORMAL,Rakina Zata AmniWill this `Reload` immediately drive everything as far as `Commit`? Is there any need to wait for anything?
And then, should
Yeah I don't think you need to wait, just make sure you got the action before DidCommit?
It seems like I need to wait or the bind fails (too early?).
if (rfh) {This old test code is odd. Why would `rfh` be null and why would we want that to result in a pass? Same for handler below. It might not even call `BindInterface` every time it's run.
I added `ASSERT_TRUE`s to make sure it does.
Done
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(Rakina Zata AmniMaybe this task should be posted before calling `Reload` to ensure it hits before `DidCommit`.
Fergal DalyCan you use `DidCommitNavigationInterceptor` instead?
Do we want to post a task from there? That will definitely be run *after* `DidCommit`. I think I don't properly understand what this is testing.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I don't understand the purpose of these changes. Can you explain?
ASSERT_TRUE(
base::test::RunUntil([&]() { return observer.ready_to_commit(); }));Wouldn't it be more reliable if we used a RunLoop here and ReadyToCommitNavigation called it's QuitClosure? Or do we need the RunUntilIdle behavior for some reason?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
- Remove InitialWebUIPageLoadMetricsObserverTest.OnFailedProvisionalLoad since there are no provisional loads for initial WebUI navigations anymore.
- Remove a bunch of expected services from some ProfileKeyedServiceGuestBrowserTest tests. These services were previously activated by throttles but now there are no throttles.Why is this not a problem when we had kInitialWebUISyncNavStartToCommit?
if (request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Do you actually need this addition (same below)?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
- Remove InitialWebUIPageLoadMetricsObserverTest.OnFailedProvisionalLoad since there are no provisional loads for initial WebUI navigations anymore.
- Remove a bunch of expected services from some ProfileKeyedServiceGuestBrowserTest tests. These services were previously activated by throttles but now there are no throttles.Why is this not a problem when we had kInitialWebUISyncNavStartToCommit?
This is now moved into https://crrev.com/c/7960658 but it seems to do something special with flags and ignores the field trial flags.
```
browser_tests --gtest_filter=ProfileKeyedServiceGuestBrowserTest.GuestProfileOTR_NeededServices --enable-features=InitialWebUISyncNavStartToCommit
```
fails currently even though InitialWebUISyncNavStartToCommit is set true in field trial config
I don't understand the purpose of these changes. Can you explain?
I have moved this change (with a tweak) into https://crrev.com/c/7960658 to try to make this simpler.
ASSERT_TRUE(
base::test::RunUntil([&]() { return observer.ready_to_commit(); }));Wouldn't it be more reliable if we used a RunLoop here and ReadyToCommitNavigation called it's QuitClosure? Or do we need the RunUntilIdle behavior for some reason?
It turns out the the run was essential because without the RFH is the old one.
I've rewritten the test now so that it's entirely synchronous and we explicitly get the pending RFH instead of whichever one happens to be the live one.
There is actually a RunLoop in WaiterHelper however it quits immediately.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Do you actually need this addition (same below)?
Without these, we run into
```
FATAL:content/browser/renderer_host/navigation_throttle_registry_impl.cc:284] Check failed: !navigation_request_->IsInitialWebUINavigation().
```
See https://crrev.com/c/7961878/1?tab=checks where I've removed them for the tests that fail.
Maybe the comment should say "so we need to not register".
| Code-Review | +1 |
LGTM, thanks!
raw_ptr<content::RenderFrameHost> rfh_;Can this be a RenderFrameHostWrapper
if (request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Fergal DalyDo you actually need this addition (same below)?
Without these, we run into
```
FATAL:content/browser/renderer_host/navigation_throttle_registry_impl.cc:284] Check failed: !navigation_request_->IsInitialWebUINavigation().
```
See https://crrev.com/c/7961878/1?tab=checks where I've removed them for the tests that fail.Maybe the comment should say "so we need to not register".
Oh right this is for unit tests. SGTM to tweak the comment a bit
request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Please fix this WARNING reported by autoreview issue finding: Consider updating the comment block above (around line 1733) to also mention initial WebUI navigations, similar to the comment you updated in `RegisterTestThrottle`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Regression test for crbug.com/478033216. Tests that an attempt to bind to
// `TrackedElementHandler` while the window is being closed. This previously
// caused a crash..```
// Regression test for crbug.com/478033216. Tests that an attempt to bind to
// `TrackedElementHandler` while the window is being closed does not cause a
// crash.
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
raw_ptr<content::RenderFrameHost> rfh_;Can this be a RenderFrameHostWrapper
I tried but it requires making RFHW copy-assignable but the rfh id is const. I think I'm happier to leave it as is.
// Regression test for crbug.com/478033216. Tests that an attempt to bind to
// `TrackedElementHandler` while the window is being closed. This previously
// caused a crash..```
// Regression test for crbug.com/478033216. Tests that an attempt to bind to
// `TrackedElementHandler` while the window is being closed does not cause a
// crash.
```
Done
if (request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Fergal DalyDo you actually need this addition (same below)?
Rakina Zata AmniWithout these, we run into
```
FATAL:content/browser/renderer_host/navigation_throttle_registry_impl.cc:284] Check failed: !navigation_request_->IsInitialWebUINavigation().
```
See https://crrev.com/c/7961878/1?tab=checks where I've removed them for the tests that fail.Maybe the comment should say "so we need to not register".
Oh right this is for unit tests. SGTM to tweak the comment a bit
Done
request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Please fix this WARNING reported by autoreview issue finding: Consider updating the comment block above (around line 1733) to also mention initial WebUI navigations, similar to the comment you updated in `RegisterTestThrottle`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
raw_ptr<content::RenderFrameHost> rfh_;Fergal DalyCan this be a RenderFrameHostWrapper
I tried but it requires making RFHW copy-assignable but the rfh id is const. I think I'm happier to leave it as is.
Acknowledged
request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Fergal DalyPlease fix this WARNING reported by autoreview issue finding: Consider updating the comment block above (around line 1733) to also mention initial WebUI navigations, similar to the comment you updated in `RegisterTestThrottle`.
Where is the autoreview warning?
Yeah it's kinda confusing, it's not actually visible to you, it's just visible to the reviewer when they do the review agent thing
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Fergal DalyPlease fix this WARNING reported by autoreview issue finding: Consider updating the comment block above (around line 1733) to also mention initial WebUI navigations, similar to the comment you updated in `RegisterTestThrottle`.
Rakina Zata AmniWhere is the autoreview warning?
Yeah it's kinda confusing, it's not actually visible to you, it's just visible to the reviewer when they do the review agent thing
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+rsult for chrome/browser/profiles/profile_keyed_service_browsertest.cc
request_->IsPageActivation() || request_->IsInitialWebUINavigation()) {Fergal DalyPlease fix this WARNING reported by autoreview issue finding: Consider updating the comment block above (around line 1733) to also mention initial WebUI navigations, similar to the comment you updated in `RegisterTestThrottle`.
Rakina Zata AmniWhere is the autoreview warning?
Yeah it's kinda confusing, it's not actually visible to you, it's just visible to the reviewer when they do the review agent thing
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM for `chrome/browser/profiles/profile_keyed_service_browsertest.cc`
| 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. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Adding owners for
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::unique_ptr<NavigationSimulator> simulator =Why is this test being deleted?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::unique_ptr<NavigationSimulator> simulator =Why is this test being deleted?
InitialWebUI navigation is a synchronous navigation, there is no provisional load anymore, the navigation commits immediately. I've added this to the commit message.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
std::unique_ptr<NavigationSimulator> simulator =Fergal DalyWhy is this test being deleted?
InitialWebUI navigation is a synchronous navigation, there is no provisional load anymore, the navigation commits immediately. I've added this to the commit message.
So this means we can remove the metrics recording code as well as the histograms/ukm? Are you planning to do this in a follow-up?
| 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 |
| Commit-Queue | +2 |
std::unique_ptr<NavigationSimulator> simulator =Fergal DalyWhy is this test being deleted?
Nicolás PeñaInitialWebUI navigation is a synchronous navigation, there is no provisional load anymore, the navigation commits immediately. I've added this to the commit message.
So this means we can remove the metrics recording code as well as the histograms/ukm? Are you planning to do this in a follow-up?
There's still a navigation and many stages of it to be recorded, it just doesn't have the 2-phases commit of most other navigations. I'm not sure what can be deleted. I've filed https://crbug.com/528072972.
I'll submit this CL since it has a lot of OWNERS, so I'll resolve this comment for now.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Remove kInitialWebUISyncNavStartToCommit flag.
The behaviour after removal should be as if it was enabled.
This also removes the `IsInitialWebUISyncNavigation` method and replaced
all callers with `IsInitialWebUINavigation`.
This got quite messy.
- Update NavigationSimulator to no register throttles for initial WebUI navigations
- Remove InitialWebUIPageLoadMetricsObserverTest.OnFailedProvisionalLoad since there are no provisional loads for initial WebUI navigations anymore.
- Rewrite WebUIToolbarWebViewRaceTest.BindInterfaceAfterCloseRace. Now it asserts that the reference is null and that the rfh etc are not null, confirming that the timing of the attempt to bind is correct.
- Remove InitialWebUIPageLoadMetricsObserverTest.OnFailedProvisionalLoad as
synchronous navs don't have provisional loads.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |