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

Side by Side Diff: components/exo/shell_surface_unittest.cc

Issue 2479353003: Revert of Window prerequisites for ShelfWindowWatcher panel support. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « components/exo/shell_surface.cc ('k') | ui/aura/client/aura_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/exo/shell_surface.cc ('k') | ui/aura/client/aura_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698