forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move WebContentsTester::TestDidNavigate to use RFH's. This eliminates…
… one usage of the wretched RenderViewHost::main_frame_routing_id, which is the main motivation of this CL. Fix up tests accordingly, which entails a substantial amount of rvh-to-rfh reorientation. In most of the updated tests, the local variables are changed from RVH's to RFH's. When the RVH is needed, just grab it from the RFH. Add TestRVH/TestRFH covariant overrides of TRFH::GetRenderViewHost(), TestWebContents::GetMainFrame(), etc. These provide a simpler, more discoverable, and less static_cast<>-ey way to get at the test-enabled version of the object. The difference is felt especially by those tests that employ a second WebContents. The remapping goes according to the new comments added to RenderViewHostImplTestHarness, copied here. // test_rvh() is equivalent to any of the following: // contents()->GetMainFrame()->GetRenderViewHost() // contents()->GetRenderViewHost() // static_cast<TestRenderViewHost*>(rvh()) // // Since most functionality will eventually shift from RVH to RFH, you may // prefer to use the GetMainFrame() method in tests. // // pending_test_rvh() is equivalent to all of the following: // contents()->GetPendingMainFrame()->GetRenderViewHost() // contents()->GetPendingRenderViewHost() // static_cast<TestRenderViewHost*>(pending_rvh()) // // Since most functionality will eventually shift from RVH to RFH, you may // prefer to use the GetPendingMainFrame() method in tests. // // active_test_rvh() is equivalent to: // contents()->GetPendingRenderViewHost() ? // contents()->GetPendingRenderViewHost() : // contents()->GetRenderViewHost(); // // main_test_rfh() is equivalent to contents()->GetMainFrame() // In addition, main_pending_test_rfh() (which is removed) is equivalent to contents()->GetPendingMainFrame(). BUG=304341 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/457093004 Cr-Commit-Position: refs/heads/master@{#289798} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289798 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
nick@chromium.org
committed
Aug 15, 2014
1 parent
6485243
commit 6b50e36
Showing
20 changed files
with
597 additions
and
539 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.