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

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

Issue 2480713003: Window prerequisites for ShelfWindowWatcher panel support. (Closed)
Patch Set: Fix ShellSurface KAppIdKey use; remove local application_id_. 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
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 EXPECT_EQ("", ShellSurface::GetApplicationId( 207 aura::Window* window = shell_surface->GetWidget()->GetNativeWindow();
208 shell_surface->GetWidget()->GetNativeWindow())); 208 EXPECT_EQ("", ShellSurface::GetApplicationId(window));
209 shell_surface->SetApplicationId("test"); 209 ShellSurface::SetApplicationId(window, "test");
210 EXPECT_EQ("test", ShellSurface::GetApplicationId( 210 EXPECT_EQ("test", ShellSurface::GetApplicationId(window));
211 shell_surface->GetWidget()->GetNativeWindow()));
212 } 211 }
213 212
214 TEST_F(ShellSurfaceTest, Move) { 213 TEST_F(ShellSurfaceTest, Move) {
215 std::unique_ptr<Surface> surface(new Surface); 214 std::unique_ptr<Surface> surface(new Surface);
216 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); 215 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
217 216
218 // Map shell surface. 217 // Map shell surface.
219 surface->Commit(); 218 surface->Commit();
220 219
221 // The interactive move should end when surface is destroyed. 220 // The interactive move should end when surface is destroyed.
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 shell_surface.OnAccessibilityModeChanged(); 804 shell_surface.OnAccessibilityModeChanged();
806 shell_surface2.OnAccessibilityModeChanged(); 805 shell_surface2.OnAccessibilityModeChanged();
807 806
808 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible()); 807 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible());
809 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds()); 808 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds());
810 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds()); 809 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds());
811 } 810 }
812 811
813 } // namespace 812 } // namespace
814 } // namespace exo 813 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698