| 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 "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 bool fullscreen_; | 321 bool fullscreen_; |
| 322 | 322 |
| 323 DISALLOW_COPY_AND_ASSIGN(FullscreenTestBrowserWindow); | 323 DISALLOW_COPY_AND_ASSIGN(FullscreenTestBrowserWindow); |
| 324 }; | 324 }; |
| 325 | 325 |
| 326 // Test that uses FullscreenTestBrowserWindow for its window. | 326 // Test that uses FullscreenTestBrowserWindow for its window. |
| 327 class BrowserCommandControllerFullscreenTest | 327 class BrowserCommandControllerFullscreenTest |
| 328 : public BrowserWithTestWindowTest { | 328 : public BrowserWithTestWindowTest { |
| 329 public: | 329 public: |
| 330 BrowserCommandControllerFullscreenTest() {} | 330 BrowserCommandControllerFullscreenTest() {} |
| 331 virtual ~BrowserCommandControllerFullscreenTest() {} | 331 ~BrowserCommandControllerFullscreenTest() override {} |
| 332 | 332 |
| 333 // BrowserWithTestWindowTest overrides: | 333 // BrowserWithTestWindowTest overrides: |
| 334 BrowserWindow* CreateBrowserWindow() override { | 334 BrowserWindow* CreateBrowserWindow() override { |
| 335 return new FullscreenTestBrowserWindow; | 335 return new FullscreenTestBrowserWindow; |
| 336 } | 336 } |
| 337 | 337 |
| 338 private: | 338 private: |
| 339 DISALLOW_COPY_AND_ASSIGN(BrowserCommandControllerFullscreenTest); | 339 DISALLOW_COPY_AND_ASSIGN(BrowserCommandControllerFullscreenTest); |
| 340 }; | 340 }; |
| 341 | 341 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 | 449 |
| 450 TEST_F(BrowserCommandControllerTest, OnSigninAllowedPrefChange) { | 450 TEST_F(BrowserCommandControllerTest, OnSigninAllowedPrefChange) { |
| 451 chrome::BrowserCommandController command_controller(browser()); | 451 chrome::BrowserCommandController command_controller(browser()); |
| 452 const CommandUpdater* command_updater = command_controller.command_updater(); | 452 const CommandUpdater* command_updater = command_controller.command_updater(); |
| 453 | 453 |
| 454 // Check that the SYNC_SETUP command is updated on preference change. | 454 // Check that the SYNC_SETUP command is updated on preference change. |
| 455 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_SHOW_SYNC_SETUP)); | 455 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_SHOW_SYNC_SETUP)); |
| 456 profile()->GetPrefs()->SetBoolean(prefs::kSigninAllowed, false); | 456 profile()->GetPrefs()->SetBoolean(prefs::kSigninAllowed, false); |
| 457 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_SHOW_SYNC_SETUP)); | 457 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_SHOW_SYNC_SETUP)); |
| 458 } | 458 } |
| OLD | NEW |