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

Unified Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 2738983004: Set an initial background for RenderFrameHosts during commit. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager_unittest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index fd4f31722ea02abaa22cb7b663d1d9a24e7e4061..6f330425e8931e9763b56d660d11dca95ec1eaf5 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -934,6 +934,8 @@ TEST_F(RenderFrameHostManagerTest, Navigate) {
EXPECT_FALSE(host->GetSiteInstance()->HasSite());
host->GetSiteInstance()->SetSite(kUrl1);
+ manager->GetRenderWidgetHostView()->SetBackgroundColor(SK_ColorRED);
+
// 2) Navigate to next site. -------------------------
const GURL kUrl2("http://www.google.com/foo");
NavigationEntryImpl entry2(
@@ -953,6 +955,9 @@ TEST_F(RenderFrameHostManagerTest, Navigate) {
ASSERT_TRUE(host);
EXPECT_TRUE(host->GetSiteInstance()->HasSite());
+ EXPECT_EQ(SK_ColorRED,
+ manager->GetRenderWidgetHostView()->background_color());
+
// 3) Cross-site navigate to next site. --------------
const GURL kUrl3("http://webkit.org/");
NavigationEntryImpl entry3(
@@ -978,6 +983,9 @@ TEST_F(RenderFrameHostManagerTest, Navigate) {
// We should observe RVH changed event.
EXPECT_TRUE(change_observer.DidHostChange());
+
+ EXPECT_EQ(SK_ColorRED,
+ manager->GetRenderWidgetHostView()->background_color());
}
// Tests WebUI creation.
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698