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

Unified Diff: chrome/browser/fullscreen_chromeos_unittest.cc

Issue 14156005: Hide the tab indicators and the shelf when in immersive + tab fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/fullscreen_chromeos_unittest.cc
diff --git a/chrome/browser/fullscreen_chromeos_unittest.cc b/chrome/browser/fullscreen_chromeos_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5b7a1489d3e9c19e67d7bc9e892eb948e7f87da9
--- /dev/null
+++ b/chrome/browser/fullscreen_chromeos_unittest.cc
@@ -0,0 +1,41 @@
+#include "ash/test/ash_test_base.h"
sky 2013/04/23 22:34:08 You're missing the copright header here.
+
+#include "chrome/browser/fullscreen.h"
+#include "ui/aura/root_window.h"
+#include "ui/views/widget/widget.h"
+
+namespace ash {
+namespace {
+
+typedef ash::test::AshTestBase FullscreenChromeOSTest;
+
+// Test that IsFullScreenMode() still returns true if the active window's
+// transient parent is fullscreen. A transient window can be visible while in
+// fullscreen if a user opens a dialog (eg the bookmkark bubble) while the
+// top-of-window views are revealed in immersive fullscreen.
+TEST_F(FullscreenChromeOSTest, TransientParentIsFullscreen) {
+ views::Widget::InitParams parent_params;
+ parent_params.context = CurrentContext();
+ parent_params.bounds = gfx::Rect(0, 0, 100, 100);
+
+ views::Widget* parent = new views::Widget();
+ parent->Init(parent_params);
+ parent->SetFullscreen(true);
+ parent->Show();
+
+ // |child| is a transient child of |parent|.
+ views::Widget::InitParams child_params;
+ child_params.parent = parent->GetNativeView();
+ child_params.bounds = gfx::Rect(0, 0, 100, 100);
+
+ views::Widget* child = new views::Widget();
+ child->Init(child_params);
+ child->Show();
+ child->Activate();
+ ASSERT_TRUE(child->IsActive());
+
+ EXPECT_TRUE(IsFullScreenMode());
sky 2013/04/23 22:34:08 How about an expect for !InFullScreenMode above?
+}
+
+} // namespace
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698