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

Unified Diff: components/exo/shell_surface_unittest.cc

Issue 2285633002: Add WM_EVENT_TRUSTED_PIN and WINDOW_STATE_TYPE_TRUSTED_PINNED to Ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added trusted argument. Created 4 years, 4 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: components/exo/shell_surface_unittest.cc
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc
index cfeffaaeec4239882414c3bd42dd905b85d0cb46..6bf6a5722a16273d01fcebf0a1b266d2f6f9e582 100644
--- a/components/exo/shell_surface_unittest.cc
+++ b/components/exo/shell_surface_unittest.cc
@@ -167,12 +167,22 @@ TEST_F(ShellSurfaceTest, SetPinned) {
std::unique_ptr<Surface> surface(new Surface);
std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
- shell_surface->SetPinned(true);
+ shell_surface->SetPinned(true, /* trusted */ true);
EXPECT_TRUE(
ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
->IsPinned());
- shell_surface->SetPinned(false);
+ shell_surface->SetPinned(false, /* trusted */ true);
+ EXPECT_FALSE(
+ ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
+ ->IsPinned());
+
+ shell_surface->SetPinned(true, /* trusted */ false);
+ EXPECT_TRUE(
+ ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
+ ->IsPinned());
+
+ shell_surface->SetPinned(false, /* trusted */ false);
EXPECT_FALSE(
ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
->IsPinned());

Powered by Google App Engine
This is Rietveld 408576698