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

Unified Diff: components/exo/shell_surface_unittest.cc

Issue 2782223002: Add ability to have active window autohide shelf (Closed)
Patch Set: Rebase 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 bc2f48b30fe381898c7d4dc958836ad248594e86..8d2543fb7e3075490c223bec090590c27a332890 100644
--- a/components/exo/shell_surface_unittest.cc
+++ b/components/exo/shell_surface_unittest.cc
@@ -207,6 +207,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