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

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

Issue 2314853003: Move ash::DisplayManager switches to ui::display (Closed)
Patch Set: Created 4 years, 3 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
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_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "extensions/browser/app_window/app_window_contents.h" 94 #include "extensions/browser/app_window/app_window_contents.h"
95 #include "extensions/browser/app_window/app_window_registry.h" 95 #include "extensions/browser/app_window/app_window_registry.h"
96 #include "extensions/browser/app_window/native_app_window.h" 96 #include "extensions/browser/app_window/native_app_window.h"
97 #include "extensions/common/extension.h" 97 #include "extensions/common/extension.h"
98 #include "extensions/common/manifest_constants.h" 98 #include "extensions/common/manifest_constants.h"
99 #include "testing/gtest/include/gtest/gtest.h" 99 #include "testing/gtest/include/gtest/gtest.h"
100 #include "ui/aura/client/window_tree_client.h" 100 #include "ui/aura/client/window_tree_client.h"
101 #include "ui/aura/window.h" 101 #include "ui/aura/window.h"
102 #include "ui/base/models/menu_model.h" 102 #include "ui/base/models/menu_model.h"
103 #include "ui/display/display.h" 103 #include "ui/display/display.h"
104 #include "ui/display/display_switches.h"
104 #include "ui/display/screen.h" 105 #include "ui/display/screen.h"
105 #include "ui/views/widget/widget.h" 106 #include "ui/views/widget/widget.h"
106 107
107 using base::ASCIIToUTF16; 108 using base::ASCIIToUTF16;
108 using extensions::Extension; 109 using extensions::Extension;
109 using extensions::Manifest; 110 using extensions::Manifest;
110 using extensions::UnloadedExtensionInfo; 111 using extensions::UnloadedExtensionInfo;
111 using arc::mojom::OrientationLock; 112 using arc::mojom::OrientationLock;
112 113
113 namespace { 114 namespace {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 protected: 309 protected:
309 ChromeLauncherControllerImplTest() 310 ChromeLauncherControllerImplTest()
310 : BrowserWithTestWindowTest(Browser::TYPE_TABBED, false), 311 : BrowserWithTestWindowTest(Browser::TYPE_TABBED, false),
311 test_controller_(NULL), 312 test_controller_(NULL),
312 extension_service_(NULL) {} 313 extension_service_(NULL) {}
313 314
314 ~ChromeLauncherControllerImplTest() override {} 315 ~ChromeLauncherControllerImplTest() override {}
315 316
316 void SetUp() override { 317 void SetUp() override {
317 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 318 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
318 command_line->AppendSwitch(ash::switches::kAshUseFirstDisplayAsInternal); 319 command_line->AppendSwitch(switches::kUseFirstDisplayAsInternal);
319 command_line->AppendSwitch(ash::switches::kAshEnableTouchViewTesting); 320 command_line->AppendSwitch(ash::switches::kAshEnableTouchViewTesting);
320 321
321 app_list::AppListSyncableServiceFactory::SetUseInTesting(); 322 app_list::AppListSyncableServiceFactory::SetUseInTesting();
322 323
323 BrowserWithTestWindowTest::SetUp(); 324 BrowserWithTestWindowTest::SetUp();
324 325
325 if (!profile_manager_) { 326 if (!profile_manager_) {
326 profile_manager_.reset( 327 profile_manager_.reset(
327 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); 328 new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
328 ASSERT_TRUE(profile_manager_->SetUp()); 329 ASSERT_TRUE(profile_manager_->SetUp());
(...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3783 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); 3784 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id));
3784 3785
3785 std::string window_app_id("org.chromium.arc.1"); 3786 std::string window_app_id("org.chromium.arc.1");
3786 CreateArcWindow(window_app_id); 3787 CreateArcWindow(window_app_id);
3787 arc_test_.app_instance()->SendTaskCreated(1, 3788 arc_test_.app_instance()->SendTaskCreated(1,
3788 arc_test_.fake_default_apps()[0]); 3789 arc_test_.fake_default_apps()[0]);
3789 3790
3790 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); 3791 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id));
3791 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); 3792 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id));
3792 } 3793 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698