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

Side by Side Diff: chrome/browser/apps/custom_launcher_page_browsertest_views.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/apps/app_browsertest_util.h" 8 #include "chrome/browser/apps/app_browsertest_util.h"
9 #include "chrome/browser/ui/app_list/app_list_service.h" 9 #include "chrome/browser/ui/app_list/app_list_service.h"
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // Browser tests for custom launcher pages, platform apps that run as a page in 24 // Browser tests for custom launcher pages, platform apps that run as a page in
25 // the app launcher. Within this test class, LoadAndLaunchPlatformApp runs the 25 // the app launcher. Within this test class, LoadAndLaunchPlatformApp runs the
26 // app inside the launcher, not as a standalone background page. 26 // app inside the launcher, not as a standalone background page.
27 // the app launcher. 27 // the app launcher.
28 class CustomLauncherPageBrowserTest 28 class CustomLauncherPageBrowserTest
29 : public extensions::PlatformAppBrowserTest { 29 : public extensions::PlatformAppBrowserTest {
30 public: 30 public:
31 CustomLauncherPageBrowserTest() {} 31 CustomLauncherPageBrowserTest() {}
32 32
33 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 33 void SetUpCommandLine(base::CommandLine* command_line) override {
34 PlatformAppBrowserTest::SetUpCommandLine(command_line); 34 PlatformAppBrowserTest::SetUpCommandLine(command_line);
35 35
36 // Custom launcher pages only work in the experimental app list. 36 // Custom launcher pages only work in the experimental app list.
37 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); 37 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList);
38 38
39 // The test app must be whitelisted to use launcher_page. 39 // The test app must be whitelisted to use launcher_page.
40 command_line->AppendSwitchASCII( 40 command_line->AppendSwitchASCII(
41 extensions::switches::kWhitelistedExtensionID, kCustomLauncherPageID); 41 extensions::switches::kWhitelistedExtensionID, kCustomLauncherPageID);
42 } 42 }
43 43
44 // Open the launcher. Ignores the Extension argument (this will simply 44 // Open the launcher. Ignores the Extension argument (this will simply
45 // activate any loaded launcher pages). 45 // activate any loaded launcher pages).
46 virtual void LaunchPlatformApp( 46 void LaunchPlatformApp(const extensions::Extension* /*unused*/) override {
47 const extensions::Extension* /*unused*/) override {
48 AppListService* service = 47 AppListService* service =
49 AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE); 48 AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE);
50 DCHECK(service); 49 DCHECK(service);
51 service->ShowForProfile(browser()->profile()); 50 service->ShowForProfile(browser()->profile());
52 } 51 }
53 52
54 private: 53 private:
55 DISALLOW_COPY_AND_ASSIGN(CustomLauncherPageBrowserTest); 54 DISALLOW_COPY_AND_ASSIGN(CustomLauncherPageBrowserTest);
56 }; 55 };
57 56
58 IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, LoadPageAndOpenLauncher) { 57 IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, LoadPageAndOpenLauncher) {
59 LoadAndLaunchPlatformApp(kCustomLauncherPagePath, "Launched"); 58 LoadAndLaunchPlatformApp(kCustomLauncherPagePath, "Launched");
60 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698