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

Unified Diff: components/exo/shell_surface_unittest.cc

Issue 2790943003: Add ability to have active window autohide shelf (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
« no previous file with comments | « components/exo/shell_surface.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface_unittest.cc
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc
index 64d69af55c119837b573bc4069127409ee563329..5e300222acbaa3cf826be1ba02d395b5d36d110a 100644
--- a/components/exo/shell_surface_unittest.cc
+++ b/components/exo/shell_surface_unittest.cc
@@ -206,6 +206,26 @@ TEST_F(ShellSurfaceTest, SetPinned) {
->IsPinned());
}
+TEST_F(ShellSurfaceTest, SetSystemUiVisibility) {
+ gfx::Size buffer_size(256, 256);
+ std::unique_ptr<Buffer> buffer(
+ new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
+ std::unique_ptr<Surface> surface(new Surface);
+ std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
+ surface->Attach(buffer.get());
+ surface->Commit();
+
+ shell_surface->SetSystemUiVisibility(true);
+ EXPECT_TRUE(
+ ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
+ ->autohide_shelf_when_maximized_or_fullscreen());
+
+ shell_surface->SetSystemUiVisibility(false);
+ EXPECT_FALSE(
+ ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
+ ->autohide_shelf_when_maximized_or_fullscreen());
+}
+
TEST_F(ShellSurfaceTest, SetTitle) {
std::unique_ptr<Surface> surface(new Surface);
std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
« no previous file with comments | « components/exo/shell_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698