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

Side by Side Diff: ash/shell_unittest.cc

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ozone deps Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ash/shell/window_watcher_shelf_item_delegate.cc ('k') | ash/test/ash_test_base.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 (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/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 455
456 // Clean up. 456 // Clean up.
457 widget->Close(); 457 widget->Close();
458 } 458 }
459 459
460 // Various assertions around SetShelfAutoHideBehavior() and 460 // Various assertions around SetShelfAutoHideBehavior() and
461 // GetShelfAutoHideBehavior(). 461 // GetShelfAutoHideBehavior().
462 TEST_F(ShellTest, ToggleAutoHide) { 462 TEST_F(ShellTest, ToggleAutoHide) {
463 scoped_ptr<aura::Window> window(new aura::Window(NULL)); 463 scoped_ptr<aura::Window> window(new aura::Window(NULL));
464 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 464 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
465 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 465 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
466 window->Init(ui::LAYER_TEXTURED); 466 window->Init(ui::LAYER_TEXTURED);
467 ParentWindowInPrimaryRootWindow(window.get()); 467 ParentWindowInPrimaryRootWindow(window.get());
468 window->Show(); 468 window->Show();
469 wm::ActivateWindow(window.get()); 469 wm::ActivateWindow(window.get());
470 470
471 Shell* shell = Shell::GetInstance(); 471 Shell* shell = Shell::GetInstance();
472 aura::Window* root_window = Shell::GetPrimaryRootWindow(); 472 aura::Window* root_window = Shell::GetPrimaryRootWindow();
473 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 473 shell->SetShelfAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
474 root_window); 474 root_window);
475 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 475 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 private: 529 private:
530 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 530 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
531 }; 531 };
532 532
533 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 533 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
534 window_.reset(new aura::Window(NULL)); 534 window_.reset(new aura::Window(NULL));
535 window_->Init(ui::LAYER_NOT_DRAWN); 535 window_->Init(ui::LAYER_NOT_DRAWN);
536 } 536 }
537 537
538 } // namespace ash 538 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_watcher_shelf_item_delegate.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698