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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm

Issue 2824613002: Mac: Remove white CALayers (Closed)
Patch Set: Fix unit test Created 3 years, 8 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index f762d0c84eb8fae4abd6bdf7b5909bfa4a4a2286..59ba0e7c5c24564d1d44f5281ad0f51fb30896ad 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -1271,33 +1271,34 @@ InputEventAck unhandled_scroll_ack(InputEventAckSource::COMPOSITOR_THREAD,
new MockRenderWidgetHostImpl(&delegate, process_host, routing_id);
RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(host, false);
- EXPECT_NE(static_cast<unsigned>(SK_ColorTRANSPARENT),
- view->background_color());
- EXPECT_TRUE([view->cocoa_view() isOpaque]);
-
- view->SetBackgroundColor(SK_ColorTRANSPARENT);
EXPECT_EQ(static_cast<unsigned>(SK_ColorTRANSPARENT),
view->background_color());
EXPECT_FALSE([view->cocoa_view() isOpaque]);
+ view->SetBackgroundColor(SK_ColorWHITE);
+ EXPECT_NE(static_cast<unsigned>(SK_ColorTRANSPARENT),
+ view->background_color());
+ EXPECT_TRUE([view->cocoa_view() isOpaque]);
+
const IPC::Message* set_background;
set_background = process_host->sink().GetUniqueMessageMatching(
ViewMsg_SetBackgroundOpaque::ID);
ASSERT_TRUE(set_background);
std::tuple<bool> sent_background;
ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background);
- EXPECT_FALSE(std::get<0>(sent_background));
+ EXPECT_TRUE(std::get<0>(sent_background));
// Try setting it back.
process_host->sink().ClearMessages();
- view->SetBackgroundColor(SK_ColorWHITE);
- EXPECT_EQ(static_cast<unsigned>(SK_ColorWHITE), view->background_color());
- EXPECT_TRUE([view->cocoa_view() isOpaque]);
+ view->SetBackgroundColor(SK_ColorTRANSPARENT);
+ EXPECT_EQ(static_cast<unsigned>(SK_ColorTRANSPARENT),
+ view->background_color());
+ EXPECT_FALSE([view->cocoa_view() isOpaque]);
set_background = process_host->sink().GetUniqueMessageMatching(
ViewMsg_SetBackgroundOpaque::ID);
ASSERT_TRUE(set_background);
ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background);
- EXPECT_TRUE(std::get<0>(sent_background));
+ EXPECT_FALSE(std::get<0>(sent_background));
host->ShutdownAndDestroyWidget(true);
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698