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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura); 656 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura);
657 }; 657 };
658 658
659 // Creates a test browser window which has a native window. 659 // Creates a test browser window which has a native window.
660 scoped_ptr<TestBrowserWindowAura> CreateTestBrowserWindow( 660 scoped_ptr<TestBrowserWindowAura> CreateTestBrowserWindow(
661 const Browser::CreateParams& params) { 661 const Browser::CreateParams& params) {
662 // Create a window. 662 // Create a window.
663 aura::Window* window = new aura::Window(NULL); 663 aura::Window* window = new aura::Window(NULL);
664 window->set_id(0); 664 window->set_id(0);
665 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 665 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
666 window->Init(ui::LAYER_TEXTURED); 666 window->Init(ui::LAYER_TEXTURED);
667 window->Show(); 667 window->Show();
668 668
669 scoped_ptr<TestBrowserWindowAura> browser_window( 669 scoped_ptr<TestBrowserWindowAura> browser_window(
670 new TestBrowserWindowAura(window)); 670 new TestBrowserWindowAura(window));
671 browser_window->CreateBrowser(params); 671 browser_window->CreateBrowser(params);
672 return browser_window.Pass(); 672 return browser_window.Pass();
673 } 673 }
674 674
675 // A views delegate which allows creating shell windows. 675 // A views delegate which allows creating shell windows.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher); 721 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher);
722 }; 722 };
723 723
724 // A V1 windowed application. 724 // A V1 windowed application.
725 class V1App : public TestBrowserWindow { 725 class V1App : public TestBrowserWindow {
726 public: 726 public:
727 V1App(Profile* profile, const std::string& app_name) { 727 V1App(Profile* profile, const std::string& app_name) {
728 // Create a window. 728 // Create a window.
729 native_window_.reset(new aura::Window(NULL)); 729 native_window_.reset(new aura::Window(NULL));
730 native_window_->set_id(0); 730 native_window_->set_id(0);
731 native_window_->SetType(aura::client::WINDOW_TYPE_POPUP); 731 native_window_->SetType(ui::wm::WINDOW_TYPE_POPUP);
732 native_window_->Init(ui::LAYER_TEXTURED); 732 native_window_->Init(ui::LAYER_TEXTURED);
733 native_window_->Show(); 733 native_window_->Show();
734 734
735 Browser::CreateParams params = Browser::CreateParams::CreateForApp( 735 Browser::CreateParams params = Browser::CreateParams::CreateForApp(
736 Browser::TYPE_POPUP, 736 Browser::TYPE_POPUP,
737 kCrxAppPrefix + app_name, 737 kCrxAppPrefix + app_name,
738 gfx::Rect(), 738 gfx::Rect(),
739 profile, 739 profile,
740 chrome::HOST_DESKTOP_TYPE_ASH); 740 chrome::HOST_DESKTOP_TYPE_ASH);
741 params.window = this; 741 params.window = this;
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 2717
2718 EXPECT_EQ(1, app_icon_loader->fetch_count()); 2718 EXPECT_EQ(1, app_icon_loader->fetch_count());
2719 ASSERT_EQ(initial_size + 1, model_->items().size()); 2719 ASSERT_EQ(initial_size + 1, model_->items().size());
2720 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); 2720 EXPECT_TRUE(launcher_controller_->IsAppPinned("1"));
2721 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); 2721 EXPECT_FALSE(launcher_controller_->IsAppPinned("0"));
2722 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); 2722 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type);
2723 2723
2724 launcher_controller_->UnpinAppWithID("1"); 2724 launcher_controller_->UnpinAppWithID("1");
2725 ASSERT_EQ(initial_size, model_->items().size()); 2725 ASSERT_EQ(initial_size, model_->items().size());
2726 } 2726 }
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller_unittest.cc ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698