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

Unified Diff: ui/views/widget/widget_unittest.cc

Issue 1105613002: [MacViews] Implement AlwaysOnTop and VisibleOnAllWorkspaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_unittest.cc
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index b564366fd0672cfa209ba25c840b3d917a7653dc..28810988f559d5bc4fc2cfe5a933e59a6559724a 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -3433,5 +3433,15 @@ TEST_F(WidgetTest, CharMessagesAsKeyboardMessagesDoesNotCrash) {
}
#endif
+// Test that SetAlwaysOnTop and IsAlwaysOnTop are consistent.
+TEST_F(WidgetTest, AlwaysOnTop) {
+ Widget* widget = CreateTopLevelNativeWidget();
+ EXPECT_FALSE(widget->IsAlwaysOnTop());
+ widget->SetAlwaysOnTop(true);
+ EXPECT_TRUE(widget->IsAlwaysOnTop());
+ widget->SetAlwaysOnTop(false);
+ EXPECT_FALSE(widget->IsAlwaysOnTop());
+}
+
} // namespace test
} // namespace views
« no previous file with comments | « ui/views/widget/native_widget_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698