| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "chrome/app/chrome_command_ids.h" | 6 #include "chrome/app/chrome_command_ids.h" |
| 7 #include "chrome/browser/extensions/extension_browsertest.h" | 7 #include "chrome/browser/extensions/extension_browsertest.h" |
| 8 #include "chrome/browser/ui/browser_commands.h" | 8 #include "chrome/browser/ui/browser_commands.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 | 10 |
| 11 class ChromeUIOverridesBrowserTest : public ExtensionBrowserTest {}; | 11 class ChromeUIOverridesBrowserTest : public ExtensionBrowserTest {}; |
| 12 | 12 |
| 13 IN_PROC_BROWSER_TEST_F(ChromeUIOverridesBrowserTest, | 13 IN_PROC_BROWSER_TEST_F(ChromeUIOverridesBrowserTest, |
| 14 BookmarkShortcutOverrides) { | 14 BookmarkShortcutOverrides) { |
| 15 // This functionality requires a feature flag. | 15 // This functionality requires a feature flag. |
| 16 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 16 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 17 "--enable-override-bookmarks-ui", | 17 "--enable-override-bookmarks-ui", "1"); |
| 18 "1"); | |
| 19 | 18 |
| 20 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("bookmarks_ui"))); | 19 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("bookmarks_ui"))); |
| 21 EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_BOOKMARK_PAGE)); | 20 EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_BOOKMARK_PAGE)); |
| 22 | 21 |
| 23 AddTabAtIndex(1, | 22 AddTabAtIndex(1, |
| 24 GURL(chrome::kChromeUINewTabURL), | 23 GURL(chrome::kChromeUINewTabURL), |
| 25 ui::PAGE_TRANSITION_TYPED); | 24 ui::PAGE_TRANSITION_TYPED); |
| 26 EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_BOOKMARK_ALL_TABS)); | 25 EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_BOOKMARK_ALL_TABS)); |
| 27 } | 26 } |
| OLD | NEW |