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

Unified Diff: ui/views/widget/native_widget_mac_unittest.mm

Issue 2009333002: Converts Widget::SetOpacity from char to float (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « ui/views/widget/native_widget_mac.mm ('k') | ui/views/widget/native_widget_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac_unittest.mm
diff --git a/ui/views/widget/native_widget_mac_unittest.mm b/ui/views/widget/native_widget_mac_unittest.mm
index d4566d04f1518288d8a9bee837d51d80df19457d..511a507bab50b1c701ebbd5da5be933a2e20240c 100644
--- a/ui/views/widget/native_widget_mac_unittest.mm
+++ b/ui/views/widget/native_widget_mac_unittest.mm
@@ -1259,9 +1259,9 @@ TEST_F(NativeWidgetMacTest, ChangeOpacity) {
NSWindow* ns_window = widget->GetNativeWindow();
CGFloat old_opacity = [ns_window alphaValue];
- widget->SetOpacity(0xAA);
+ widget->SetOpacity(.7f);
EXPECT_NE(old_opacity, [ns_window alphaValue]);
- EXPECT_DOUBLE_EQ(0xAA / 255.0, [ns_window alphaValue]);
+ EXPECT_DOUBLE_EQ(.7, [ns_window alphaValue]);
widget->CloseNow();
}
« no previous file with comments | « ui/views/widget/native_widget_mac.mm ('k') | ui/views/widget/native_widget_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698