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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc

Issue 187443008: Elim Browser::AppType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 public: 738 public:
739 V1App(Profile* profile, const std::string& app_name) { 739 V1App(Profile* profile, const std::string& app_name) {
740 // Create a window. 740 // Create a window.
741 native_window_.reset(new aura::Window(NULL)); 741 native_window_.reset(new aura::Window(NULL));
742 native_window_->set_id(0); 742 native_window_->set_id(0);
743 native_window_->SetType(ui::wm::WINDOW_TYPE_POPUP); 743 native_window_->SetType(ui::wm::WINDOW_TYPE_POPUP);
744 native_window_->Init(aura::WINDOW_LAYER_TEXTURED); 744 native_window_->Init(aura::WINDOW_LAYER_TEXTURED);
745 native_window_->Show(); 745 native_window_->Show();
746 746
747 Browser::CreateParams params = Browser::CreateParams::CreateForApp( 747 Browser::CreateParams params = Browser::CreateParams::CreateForApp(
748 Browser::TYPE_POPUP, 748 Browser::TYPE_HOSTED_POPUP,
749 kCrxAppPrefix + app_name, 749 kCrxAppPrefix + app_name,
750 gfx::Rect(), 750 gfx::Rect(),
751 profile, 751 profile,
752 chrome::HOST_DESKTOP_TYPE_ASH); 752 chrome::HOST_DESKTOP_TYPE_ASH);
753 params.window = this; 753 params.window = this;
754 browser_.reset(new Browser(params)); 754 browser_.reset(new Browser(params));
755 chrome::AddTabAt(browser_.get(), GURL(), 0, true); 755 chrome::AddTabAt(browser_.get(), GURL(), 0, true);
756 } 756 }
757 757
758 virtual ~V1App() { 758 virtual ~V1App() {
(...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after
2787 2787
2788 EXPECT_EQ(1, app_icon_loader->fetch_count()); 2788 EXPECT_EQ(1, app_icon_loader->fetch_count());
2789 ASSERT_EQ(initial_size + 1, model_->items().size()); 2789 ASSERT_EQ(initial_size + 1, model_->items().size());
2790 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); 2790 EXPECT_TRUE(launcher_controller_->IsAppPinned("1"));
2791 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); 2791 EXPECT_FALSE(launcher_controller_->IsAppPinned("0"));
2792 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); 2792 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type);
2793 2793
2794 launcher_controller_->UnpinAppWithID("1"); 2794 launcher_controller_->UnpinAppWithID("1");
2795 ASSERT_EQ(initial_size, model_->items().size()); 2795 ASSERT_EQ(initial_size, model_->items().size());
2796 } 2796 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698