| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_command_controller.h" | 5 #include "chrome/browser/ui/browser_command_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
| 32 #include "chromeos/chromeos_switches.h" | 32 #include "chromeos/chromeos_switches.h" |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 class BrowserCommandControllerBrowserTest: public InProcessBrowserTest { | 35 class BrowserCommandControllerBrowserTest: public InProcessBrowserTest { |
| 36 public: | 36 public: |
| 37 BrowserCommandControllerBrowserTest() {} | 37 BrowserCommandControllerBrowserTest() {} |
| 38 ~BrowserCommandControllerBrowserTest() override {} | 38 ~BrowserCommandControllerBrowserTest() override {} |
| 39 | 39 |
| 40 void SetUpCommandLine(base::CommandLine* command_line) override { | 40 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 41 InProcessBrowserTest::SetUpCommandLine(command_line); | |
| 42 | |
| 43 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
| 44 command_line->AppendSwitch( | 42 command_line->AppendSwitch( |
| 45 chromeos::switches::kIgnoreUserProfileMappingForTests); | 43 chromeos::switches::kIgnoreUserProfileMappingForTests); |
| 46 #endif | 44 #endif |
| 47 } | 45 } |
| 48 | 46 |
| 49 private: | 47 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(BrowserCommandControllerBrowserTest); | 48 DISALLOW_COPY_AND_ASSIGN(BrowserCommandControllerBrowserTest); |
| 51 }; | 49 }; |
| 52 | 50 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 107 |
| 110 const CommandUpdater* command_updater = | 108 const CommandUpdater* command_updater = |
| 111 browser->command_controller()->command_updater(); | 109 browser->command_controller()->command_updater(); |
| 112 #if defined(OS_CHROMEOS) | 110 #if defined(OS_CHROMEOS) |
| 113 // Chrome OS uses system tray menu to handle multi-profiles. | 111 // Chrome OS uses system tray menu to handle multi-profiles. |
| 114 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_SHOW_AVATAR_MENU)); | 112 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_SHOW_AVATAR_MENU)); |
| 115 #else | 113 #else |
| 116 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_SHOW_AVATAR_MENU)); | 114 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_SHOW_AVATAR_MENU)); |
| 117 #endif | 115 #endif |
| 118 } | 116 } |
| OLD | NEW |