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

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 and add non trusted type test Created 6 years, 8 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
« no previous file with comments | « chrome/browser/ui/ash/accelerator_commands_browsertest.cc ('k') | chrome/browser/ui/browser.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 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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // Create a window. 721 // Create a window.
722 native_window_.reset(new aura::Window(NULL)); 722 native_window_.reset(new aura::Window(NULL));
723 native_window_->set_id(0); 723 native_window_->set_id(0);
724 native_window_->SetType(ui::wm::WINDOW_TYPE_POPUP); 724 native_window_->SetType(ui::wm::WINDOW_TYPE_POPUP);
725 native_window_->Init(aura::WINDOW_LAYER_TEXTURED); 725 native_window_->Init(aura::WINDOW_LAYER_TEXTURED);
726 native_window_->Show(); 726 native_window_->Show();
727 aura::client::ParentWindowWithContext(native_window_.get(), 727 aura::client::ParentWindowWithContext(native_window_.get(),
728 ash::Shell::GetPrimaryRootWindow(), 728 ash::Shell::GetPrimaryRootWindow(),
729 gfx::Rect(10, 10, 20, 30)); 729 gfx::Rect(10, 10, 20, 30));
730 Browser::CreateParams params = Browser::CreateParams::CreateForApp( 730 Browser::CreateParams params = Browser::CreateParams::CreateForApp(
731 Browser::TYPE_POPUP, 731 Browser::TYPE_TRUSTED_POPUP,
732 kCrxAppPrefix + app_name, 732 kCrxAppPrefix + app_name,
733 gfx::Rect(), 733 gfx::Rect(),
734 profile, 734 profile,
735 chrome::HOST_DESKTOP_TYPE_ASH); 735 chrome::HOST_DESKTOP_TYPE_ASH);
736 params.window = this; 736 params.window = this;
737 browser_.reset(new Browser(params)); 737 browser_.reset(new Browser(params));
738 chrome::AddTabAt(browser_.get(), GURL(), 0, true); 738 chrome::AddTabAt(browser_.get(), GURL(), 0, true);
739 } 739 }
740 740
741 virtual ~V1App() { 741 virtual ~V1App() {
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2838 2838
2839 EXPECT_EQ(1, app_icon_loader->fetch_count()); 2839 EXPECT_EQ(1, app_icon_loader->fetch_count());
2840 ASSERT_EQ(initial_size + 1, model_->items().size()); 2840 ASSERT_EQ(initial_size + 1, model_->items().size());
2841 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); 2841 EXPECT_TRUE(launcher_controller_->IsAppPinned("1"));
2842 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); 2842 EXPECT_FALSE(launcher_controller_->IsAppPinned("0"));
2843 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); 2843 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type);
2844 2844
2845 launcher_controller_->UnpinAppWithID("1"); 2845 launcher_controller_->UnpinAppWithID("1");
2846 ASSERT_EQ(initial_size, model_->items().size()); 2846 ASSERT_EQ(initial_size, model_->items().size());
2847 } 2847 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/accelerator_commands_browsertest.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698