| 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..c75bc7fbfe1f3a98efb7bfbe43576e47679f1088 100644
|
| --- a/components/exo/shell_surface_unittest.cc
|
| +++ b/components/exo/shell_surface_unittest.cc
|
| @@ -52,6 +52,13 @@ wm::ShadowElevation GetShadowElevation(aura::Window* window) {
|
| return window->GetProperty(wm::kShadowElevationKey);
|
| }
|
|
|
| +bool WidgetIsPinned(views::Widget* widget) {
|
| + aura::client::WindowPinType type =
|
| + widget->GetNativeWindow()->GetProperty(aura::client::kWindowPinTypeKey);
|
| + return type == aura::client::WindowPinType::PINNED ||
|
| + type == aura::client::WindowPinType::TRUSTED_PINNED;
|
| +}
|
| +
|
| TEST_F(ShellSurfaceTest, AcknowledgeConfigure) {
|
| gfx::Size buffer_size(32, 32);
|
| std::unique_ptr<Buffer> buffer(
|
| @@ -187,24 +194,16 @@ TEST_F(ShellSurfaceTest, SetPinned) {
|
| std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
|
|
| shell_surface->SetPinned(true, /* trusted */ true);
|
| - EXPECT_TRUE(
|
| - ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
|
| - ->IsPinned());
|
| + EXPECT_TRUE(WidgetIsPinned(shell_surface->GetWidget()));
|
|
|
| shell_surface->SetPinned(false, /* trusted */ true);
|
| - EXPECT_FALSE(
|
| - ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
|
| - ->IsPinned());
|
| + EXPECT_FALSE(WidgetIsPinned(shell_surface->GetWidget()));
|
|
|
| shell_surface->SetPinned(true, /* trusted */ false);
|
| - EXPECT_TRUE(
|
| - ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
|
| - ->IsPinned());
|
| + EXPECT_TRUE(WidgetIsPinned(shell_surface->GetWidget()));
|
|
|
| shell_surface->SetPinned(false, /* trusted */ false);
|
| - EXPECT_FALSE(
|
| - ash::wm::GetWindowState(shell_surface->GetWidget()->GetNativeWindow())
|
| - ->IsPinned());
|
| + EXPECT_FALSE(WidgetIsPinned(shell_surface->GetWidget()));
|
| }
|
|
|
| TEST_F(ShellSurfaceTest, SetTitle) {
|
|
|