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

Side by Side Diff: ash/shell_unittest.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: oshima + mfomitchev comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 kShellWindowId_DefaultContainer); 49 kShellWindowId_DefaultContainer);
50 } 50 }
51 51
52 aura::Window* GetAlwaysOnTopContainer() { 52 aura::Window* GetAlwaysOnTopContainer() {
53 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), 53 return Shell::GetContainer(Shell::GetPrimaryRootWindow(),
54 kShellWindowId_AlwaysOnTopContainer); 54 kShellWindowId_AlwaysOnTopContainer);
55 } 55 }
56 56
57 // Expect ALL the containers! 57 // Expect ALL the containers!
58 void ExpectAllContainers() { 58 void ExpectAllContainers() {
59 // Validate no duplicate container IDs.
60 std::set<int32_t> container_ids;
61 for (size_t i = 0; i < kAllShellContainerIdsSize; ++i)
62 EXPECT_TRUE(container_ids.insert(kAllShellContainerIds[i]).second);
63
59 aura::Window* root_window = Shell::GetPrimaryRootWindow(); 64 aura::Window* root_window = Shell::GetPrimaryRootWindow();
60 EXPECT_TRUE( 65 EXPECT_TRUE(
61 Shell::GetContainer(root_window, kShellWindowId_WallpaperContainer)); 66 Shell::GetContainer(root_window, kShellWindowId_WallpaperContainer));
62 EXPECT_TRUE( 67 EXPECT_TRUE(
63 Shell::GetContainer(root_window, kShellWindowId_DefaultContainer)); 68 Shell::GetContainer(root_window, kShellWindowId_DefaultContainer));
64 EXPECT_TRUE( 69 EXPECT_TRUE(
65 Shell::GetContainer(root_window, kShellWindowId_AlwaysOnTopContainer)); 70 Shell::GetContainer(root_window, kShellWindowId_AlwaysOnTopContainer));
66 EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_PanelContainer)); 71 EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_PanelContainer));
67 EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_ShelfContainer)); 72 EXPECT_TRUE(Shell::GetContainer(root_window, kShellWindowId_ShelfContainer));
68 EXPECT_TRUE( 73 EXPECT_TRUE(
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 private: 506 private:
502 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 507 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
503 }; 508 };
504 509
505 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 510 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
506 window_.reset(new aura::Window(NULL)); 511 window_.reset(new aura::Window(NULL));
507 window_->Init(ui::LAYER_NOT_DRAWN); 512 window_->Init(ui::LAYER_NOT_DRAWN);
508 } 513 }
509 514
510 } // namespace ash 515 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698