Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Issue 2296483002: Fix some unit_tests under PlzNavigate (Closed)

Created:
4 years, 3 months ago by scottmg
Modified:
4 years, 3 months ago
Reviewers:
clamy, sky, nasko
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix some unit_tests under PlzNavigate I started by trying to fix ToolbarModelTest.ShouldDisplayURL but it turned out that the combination of initializing the test utils, and the simulation of the RFH unloading fixed the following: BookmarkTest.DetachedBookmarkBarOnNTP BrowserBookmarkBarTest.StateOnActiveTabChanged BrowserCommandsTest.ViewSource BrowserInstantControllerTest.DefaultSearchProviderChanged BrowserInstantControllerTest.GoogleBaseURLUpdated BrowserViewTest.BrowserViewLayout InstantNTPURLRewriteTest.UberURLHandler_InstantExtendedNewTabPage SearchIPCRouterPolicyTest.ProcessChromeIdentityCheck SearchIPCRouterPolicyTest.ProcessDeleteMostVisitedItem SearchIPCRouterPolicyTest.ProcessFocusOmnibox SearchIPCRouterPolicyTest.ProcessHistorySyncCheck SearchIPCRouterPolicyTest.ProcessLogEvent SearchIPCRouterPolicyTest.ProcessPasteIntoOmniboxMsg SearchIPCRouterPolicyTest.ProcessUndoAllMostVisitedDeletions SearchIPCRouterPolicyTest.ProcessUndoMostVisitedDeletion SearchIPCRouterPolicyTest.SendMostVisitedItems SearchIPCRouterPolicyTest.SendThemeBackgroundInfo SearchIPCRouterTest.IgnoreChromeIdentityCheckMsg SearchIPCRouterTest.IgnoreDeleteMostVisitedItemMsg SearchIPCRouterTest.IgnoreFocusOmniboxMsg SearchIPCRouterTest.IgnoreHistorySyncCheckMsg SearchIPCRouterTest.IgnoreLogEventMsg SearchIPCRouterTest.IgnorePasteAndOpenDropdownMsg SearchIPCRouterTest.IgnoreUndoAllMostVisitedDeletionsMsg SearchIPCRouterTest.IgnoreUndoMostVisitedDeletionMsg SearchIPCRouterTest.ProcessChromeIdentityCheckMsg SearchIPCRouterTest.ProcessDeleteMostVisitedItemMsg SearchIPCRouterTest.ProcessFocusOmniboxMsg SearchIPCRouterTest.ProcessHistorySyncCheckMsg SearchIPCRouterTest.ProcessLogEventMsg SearchIPCRouterTest.ProcessLogMostVisitedImpressionMsg SearchIPCRouterTest.ProcessLogMostVisitedNavigationMsg SearchIPCRouterTest.ProcessPasteAndOpenDropdownMsg SearchIPCRouterTest.ProcessUndoAllMostVisitedDeletionsMsg SearchIPCRouterTest.ProcessUndoMostVisitedDeletionMsg SearchTest.InstantCacheableNTPNavigationEntry SearchTest.InstantCacheableNTPNavigationEntryNewProfile SearchTest.InstantNTPCustomNavigationEntry SearchTest.InstantNTPExtendedEnabled SearchTest.ProcessIsolation SearchTest.ProcessIsolation_RendererInitiated SessionsSyncManagerTest.AssociateWindowsDontReloadTabs ToolbarModelTest.ShouldDisplayURL R=clamy@chromium.org, nasko@chromium.org BUG=510836 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/d2b6c5d77bb3643a84b829d51614d126b10d5d42 Cr-Commit-Position: refs/heads/master@{#416003}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : move browser_side_navigation_test_utils to content/public/test #

Patch Set 4 : make helper utility function to avoid layering violation #

Patch Set 5 : . #

Total comments: 1

Patch Set 6 : teardown #

Total comments: 7

Patch Set 7 : review fixes #

Patch Set 8 : . #

Total comments: 12

Patch Set 9 : more fixes #

Total comments: 11

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 3

Patch Set 12 : . #

Total comments: 2

Patch Set 13 : not in public interface #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -240 lines) Patch
M chrome/test/base/browser_with_test_window_test.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -38 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/navigator_impl_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
A + content/public/test/browser_side_navigation_test_utils.h View 1 2 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
A + content/public/test/browser_side_navigation_test_utils.cc View 1 2 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/test/test_renderer_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -6 lines 0 comments Download
M content/public/test/test_renderer_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +47 lines, -5 lines 0 comments Download
D content/test/browser_side_navigation_test_utils.h View 1 2 1 chunk +0 lines, -38 lines 0 comments Download
D content/test/browser_side_navigation_test_utils.cc View 1 2 1 chunk +0 lines, -74 lines 0 comments Download
M content/test/test_render_frame_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -0 lines 0 comments Download
M content/test/test_render_frame_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -1 line 0 comments Download
M content/test/test_web_contents.cc View 1 2 3 4 5 6 7 8 9 2 chunks +16 lines, -21 lines 0 comments Download
M testing/buildbot/filters/browser-side-navigation.linux.unit_tests.filter View 1 2 3 4 1 chunk +0 lines, -46 lines 0 comments Download

Messages

Total messages: 52 (29 generated)
scottmg
https://codereview.chromium.org/2296483002/diff/80001/content/public/test/browser_side_navigation_test_utils.cc File content/public/test/browser_side_navigation_test_utils.cc (right): https://codereview.chromium.org/2296483002/diff/80001/content/public/test/browser_side_navigation_test_utils.cc#newcode83 content/public/test/browser_side_navigation_test_utils.cc:83: main_frame->PrepareForCommit(); I had to move this file into content/public/test ...
4 years, 3 months ago (2016-08-30 18:15:31 UTC) #10
clamy
Thanks! Good find! https://codereview.chromium.org/2296483002/diff/100001/chrome/test/base/browser_with_test_window_test.cc File chrome/test/base/browser_with_test_window_test.cc (right): https://codereview.chromium.org/2296483002/diff/100001/chrome/test/base/browser_with_test_window_test.cc#newcode147 chrome/test/base/browser_with_test_window_test.cc:147: RenderFrameHostTester::For(old_rfh)->SendBeforeUnloadACK(true); PrepareForCommit actually takes care fo ...
4 years, 3 months ago (2016-08-30 21:17:47 UTC) #15
scottmg
Thanks! https://codereview.chromium.org/2296483002/diff/100001/chrome/test/base/browser_with_test_window_test.cc File chrome/test/base/browser_with_test_window_test.cc (right): https://codereview.chromium.org/2296483002/diff/100001/chrome/test/base/browser_with_test_window_test.cc#newcode147 chrome/test/base/browser_with_test_window_test.cc:147: RenderFrameHostTester::For(old_rfh)->SendBeforeUnloadACK(true); On 2016/08/30 21:17:47, clamy wrote: > PrepareForCommit ...
4 years, 3 months ago (2016-08-30 21:55:27 UTC) #17
clamy
Thanks! https://codereview.chromium.org/2296483002/diff/100001/content/public/test/test_renderer_host.cc File content/public/test/test_renderer_host.cc (right): https://codereview.chromium.org/2296483002/diff/100001/content/public/test/test_renderer_host.cc#newcode64 content/public/test/test_renderer_host.cc:64: return web_contents->GetRenderManagerForTesting() On 2016/08/30 21:55:27, scottmg wrote: > ...
4 years, 3 months ago (2016-08-30 23:08:38 UTC) #20
scottmg
https://codereview.chromium.org/2296483002/diff/160001/chrome/test/base/browser_with_test_window_test.cc File chrome/test/base/browser_with_test_window_test.cc (right): https://codereview.chromium.org/2296483002/diff/160001/chrome/test/base/browser_with_test_window_test.cc#newcode150 chrome/test/base/browser_with_test_window_test.cc:150: if (pending_rfh) On 2016/08/30 23:08:38, clamy wrote: > Actually ...
4 years, 3 months ago (2016-08-30 23:55:30 UTC) #21
scottmg
https://codereview.chromium.org/2296483002/diff/160001/chrome/test/base/browser_with_test_window_test.cc File chrome/test/base/browser_with_test_window_test.cc (right): https://codereview.chromium.org/2296483002/diff/160001/chrome/test/base/browser_with_test_window_test.cc#newcode150 chrome/test/base/browser_with_test_window_test.cc:150: if (pending_rfh) On 2016/08/30 23:55:30, scottmg wrote: > On ...
4 years, 3 months ago (2016-08-31 01:55:18 UTC) #22
clamy
Thanks! A few more comments below, but it's mostly good apart from that. https://codereview.chromium.org/2296483002/diff/160001/chrome/test/base/browser_with_test_window_test.cc File ...
4 years, 3 months ago (2016-08-31 18:23:21 UTC) #23
nasko
Just one suggestion around the exposure of the speculative RFH. https://codereview.chromium.org/2296483002/diff/180001/content/public/test/test_renderer_host.cc File content/public/test/test_renderer_host.cc (right): https://codereview.chromium.org/2296483002/diff/180001/content/public/test/test_renderer_host.cc#newcode59 ...
4 years, 3 months ago (2016-08-31 18:39:05 UTC) #24
scottmg
https://codereview.chromium.org/2296483002/diff/180001/content/browser/frame_host/render_frame_host_manager.h File content/browser/frame_host/render_frame_host_manager.h (right): https://codereview.chromium.org/2296483002/diff/180001/content/browser/frame_host/render_frame_host_manager.h#newcode527 content/browser/frame_host/render_frame_host_manager.h:527: friend class RenderFrameHostTester; On 2016/08/31 18:23:21, clamy wrote: > ...
4 years, 3 months ago (2016-08-31 19:01:47 UTC) #25
scottmg
https://codereview.chromium.org/2296483002/diff/180001/content/public/test/test_renderer_host.cc File content/public/test/test_renderer_host.cc (right): https://codereview.chromium.org/2296483002/diff/180001/content/public/test/test_renderer_host.cc#newcode59 content/public/test/test_renderer_host.cc:59: RenderFrameHost* RenderFrameHostTester::GetPendingForController( On 2016/08/31 19:01:46, scottmg wrote: > On ...
4 years, 3 months ago (2016-08-31 19:40:34 UTC) #26
nasko
https://codereview.chromium.org/2296483002/diff/220001/chrome/test/base/browser_with_test_window_test.cc File chrome/test/base/browser_with_test_window_test.cc (right): https://codereview.chromium.org/2296483002/diff/220001/chrome/test/base/browser_with_test_window_test.cc#newcode138 chrome/test/base/browser_with_test_window_test.cc:138: RenderFrameHostTester::CommitPendingLoad(controller); Awesome! This (pun intended) was exactly what I ...
4 years, 3 months ago (2016-08-31 19:45:24 UTC) #27
scottmg
https://codereview.chromium.org/2296483002/diff/220001/content/public/test/test_renderer_host.cc File content/public/test/test_renderer_host.cc (right): https://codereview.chromium.org/2296483002/diff/220001/content/public/test/test_renderer_host.cc#newcode66 content/public/test/test_renderer_host.cc:66: // trivial to do so, so for now we ...
4 years, 3 months ago (2016-08-31 20:10:36 UTC) #28
nasko
LGTM with a nit. https://codereview.chromium.org/2296483002/diff/180001/content/browser/frame_host/render_frame_host_manager.h File content/browser/frame_host/render_frame_host_manager.h (right): https://codereview.chromium.org/2296483002/diff/180001/content/browser/frame_host/render_frame_host_manager.h#newcode527 content/browser/frame_host/render_frame_host_manager.h:527: friend class RenderFrameHostTester; On 2016/08/31 ...
4 years, 3 months ago (2016-08-31 20:26:44 UTC) #29
scottmg
https://codereview.chromium.org/2296483002/diff/180001/content/browser/frame_host/render_frame_host_manager.h File content/browser/frame_host/render_frame_host_manager.h (right): https://codereview.chromium.org/2296483002/diff/180001/content/browser/frame_host/render_frame_host_manager.h#newcode527 content/browser/frame_host/render_frame_host_manager.h:527: friend class RenderFrameHostTester; On 2016/08/31 20:26:43, nasko (slow) wrote: ...
4 years, 3 months ago (2016-08-31 21:05:48 UTC) #30
scottmg
+sky for chrome/test/base/browser_with_test_window_test.cc OWNERS
4 years, 3 months ago (2016-08-31 21:59:23 UTC) #32
sky
LGTM
4 years, 3 months ago (2016-08-31 23:34:57 UTC) #37
clamy
Thanks! It's nice we could get rid of exposing the pending RFH. One comment below, ...
4 years, 3 months ago (2016-09-01 00:00:19 UTC) #38
scottmg
https://codereview.chromium.org/2296483002/diff/240001/content/public/test/test_renderer_host.h File content/public/test/test_renderer_host.h (right): https://codereview.chromium.org/2296483002/diff/240001/content/public/test/test_renderer_host.h#newcode99 content/public/test/test_renderer_host.h:99: virtual void PrepareForCommitIfNecessary() = 0; On 2016/09/01 00:00:18, clamy ...
4 years, 3 months ago (2016-09-01 02:33:19 UTC) #39
clamy
Thanks! Lgtm.
4 years, 3 months ago (2016-09-01 18:27:58 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2296483002/260001
4 years, 3 months ago (2016-09-01 18:31:25 UTC) #47
scottmg
Thanks for all the help on the back-and-forth here!
4 years, 3 months ago (2016-09-01 18:33:25 UTC) #48
commit-bot: I haz the power
Committed patchset #13 (id:260001)
4 years, 3 months ago (2016-09-01 18:36:43 UTC) #50
commit-bot: I haz the power
4 years, 3 months ago (2016-09-01 18:38:22 UTC) #52
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/d2b6c5d77bb3643a84b829d51614d126b10d5d42
Cr-Commit-Position: refs/heads/master@{#416003}

Powered by Google App Engine
This is Rietveld 408576698