| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/aura/wm_window_aura.h" | 5 #include "ash/aura/wm_window_aura.h" |
| 6 #include "ash/common/accessibility_delegate.h" | 6 #include "ash/common/accessibility_delegate.h" |
| 7 #include "ash/common/wm/window_state.h" | 7 #include "ash/common/wm/window_state.h" |
| 8 #include "ash/common/wm/wm_event.h" | 8 #include "ash/common/wm/wm_event.h" |
| 9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 shell_surface->SetTitle(base::string16(base::ASCIIToUTF16("test"))); | 198 shell_surface->SetTitle(base::string16(base::ASCIIToUTF16("test"))); |
| 199 surface->Commit(); | 199 surface->Commit(); |
| 200 } | 200 } |
| 201 | 201 |
| 202 TEST_F(ShellSurfaceTest, SetApplicationId) { | 202 TEST_F(ShellSurfaceTest, SetApplicationId) { |
| 203 std::unique_ptr<Surface> surface(new Surface); | 203 std::unique_ptr<Surface> surface(new Surface); |
| 204 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); | 204 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); |
| 205 | 205 |
| 206 surface->Commit(); | 206 surface->Commit(); |
| 207 aura::Window* window = shell_surface->GetWidget()->GetNativeWindow(); | 207 EXPECT_EQ("", ShellSurface::GetApplicationId( |
| 208 EXPECT_EQ("", ShellSurface::GetApplicationId(window)); | 208 shell_surface->GetWidget()->GetNativeWindow())); |
| 209 shell_surface->SetApplicationId("test"); | 209 shell_surface->SetApplicationId("test"); |
| 210 EXPECT_EQ("test", ShellSurface::GetApplicationId(window)); | 210 EXPECT_EQ("test", ShellSurface::GetApplicationId( |
| 211 shell_surface->GetWidget()->GetNativeWindow())); |
| 211 } | 212 } |
| 212 | 213 |
| 213 TEST_F(ShellSurfaceTest, Move) { | 214 TEST_F(ShellSurfaceTest, Move) { |
| 214 std::unique_ptr<Surface> surface(new Surface); | 215 std::unique_ptr<Surface> surface(new Surface); |
| 215 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); | 216 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); |
| 216 | 217 |
| 217 // Map shell surface. | 218 // Map shell surface. |
| 218 surface->Commit(); | 219 surface->Commit(); |
| 219 | 220 |
| 220 // The interactive move should end when surface is destroyed. | 221 // The interactive move should end when surface is destroyed. |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 shell_surface.OnAccessibilityModeChanged(); | 805 shell_surface.OnAccessibilityModeChanged(); |
| 805 shell_surface2.OnAccessibilityModeChanged(); | 806 shell_surface2.OnAccessibilityModeChanged(); |
| 806 | 807 |
| 807 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible()); | 808 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible()); |
| 808 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds()); | 809 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds()); |
| 809 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds()); | 810 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds()); |
| 810 } | 811 } |
| 811 | 812 |
| 812 } // namespace | 813 } // namespace |
| 813 } // namespace exo | 814 } // namespace exo |
| OLD | NEW |