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

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

Issue 121773003: Makes Window::Init take a WindowLayerType instead of LayerType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to master Created 6 years, 11 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura); 657 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura);
658 }; 658 };
659 659
660 // Creates a test browser window which has a native window. 660 // Creates a test browser window which has a native window.
661 scoped_ptr<TestBrowserWindowAura> CreateTestBrowserWindow( 661 scoped_ptr<TestBrowserWindowAura> CreateTestBrowserWindow(
662 const Browser::CreateParams& params) { 662 const Browser::CreateParams& params) {
663 // Create a window. 663 // Create a window.
664 aura::Window* window = new aura::Window(NULL); 664 aura::Window* window = new aura::Window(NULL);
665 window->set_id(0); 665 window->set_id(0);
666 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); 666 window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
667 window->Init(ui::LAYER_TEXTURED); 667 window->Init(aura::WINDOW_LAYER_TEXTURED);
668 window->Show(); 668 window->Show();
669 669
670 scoped_ptr<TestBrowserWindowAura> browser_window( 670 scoped_ptr<TestBrowserWindowAura> browser_window(
671 new TestBrowserWindowAura(window)); 671 new TestBrowserWindowAura(window));
672 browser_window->CreateBrowser(params); 672 browser_window->CreateBrowser(params);
673 return browser_window.Pass(); 673 return browser_window.Pass();
674 } 674 }
675 675
676 // A views delegate which allows creating shell windows. 676 // A views delegate which allows creating shell windows.
677 class TestViewsDelegateForAppTest : public views::TestViewsDelegate { 677 class TestViewsDelegateForAppTest : public views::TestViewsDelegate {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 }; 723 };
724 724
725 // A V1 windowed application. 725 // A V1 windowed application.
726 class V1App : public TestBrowserWindow { 726 class V1App : public TestBrowserWindow {
727 public: 727 public:
728 V1App(Profile* profile, const std::string& app_name) { 728 V1App(Profile* profile, const std::string& app_name) {
729 // Create a window. 729 // Create a window.
730 native_window_.reset(new aura::Window(NULL)); 730 native_window_.reset(new aura::Window(NULL));
731 native_window_->set_id(0); 731 native_window_->set_id(0);
732 native_window_->SetType(ui::wm::WINDOW_TYPE_POPUP); 732 native_window_->SetType(ui::wm::WINDOW_TYPE_POPUP);
733 native_window_->Init(ui::LAYER_TEXTURED); 733 native_window_->Init(aura::WINDOW_LAYER_TEXTURED);
734 native_window_->Show(); 734 native_window_->Show();
735 735
736 Browser::CreateParams params = Browser::CreateParams::CreateForApp( 736 Browser::CreateParams params = Browser::CreateParams::CreateForApp(
737 Browser::TYPE_POPUP, 737 Browser::TYPE_POPUP,
738 kCrxAppPrefix + app_name, 738 kCrxAppPrefix + app_name,
739 gfx::Rect(), 739 gfx::Rect(),
740 profile, 740 profile,
741 chrome::HOST_DESKTOP_TYPE_ASH); 741 chrome::HOST_DESKTOP_TYPE_ASH);
742 params.window = this; 742 params.window = this;
743 browser_.reset(new Browser(params)); 743 browser_.reset(new Browser(params));
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 2739
2740 EXPECT_EQ(1, app_icon_loader->fetch_count()); 2740 EXPECT_EQ(1, app_icon_loader->fetch_count());
2741 ASSERT_EQ(initial_size + 1, model_->items().size()); 2741 ASSERT_EQ(initial_size + 1, model_->items().size());
2742 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); 2742 EXPECT_TRUE(launcher_controller_->IsAppPinned("1"));
2743 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); 2743 EXPECT_FALSE(launcher_controller_->IsAppPinned("0"));
2744 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); 2744 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type);
2745 2745
2746 launcher_controller_->UnpinAppWithID("1"); 2746 launcher_controller_->UnpinAppWithID("1");
2747 ASSERT_EQ(initial_size, model_->items().size()); 2747 ASSERT_EQ(initial_size, model_->items().size());
2748 } 2748 }
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller_unittest.cc ('k') | content/browser/renderer_host/media/desktop_capture_device_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698