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

Side by Side Diff: chrome/browser/browser_commands_unittest.cc

Issue 765043002: Bookmark pop-up doesn't open if Ctrl+D is set as keyboard shortcut for added extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 6 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/app/chrome_command_ids.h" 5 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 6 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
7 #include "chrome/browser/chrome_page_zoom.h" 7 #include "chrome/browser/chrome_page_zoom.h"
8 #include "chrome/browser/ui/browser_command_controller.h" 8 #include "chrome/browser/ui/browser_command_controller.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); 143 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
144 bookmarks::test::WaitForBookmarkModelToLoad(model); 144 bookmarks::test::WaitForBookmarkModelToLoad(model);
145 145
146 // Navigate to a url. 146 // Navigate to a url.
147 GURL url1("http://foo/1"); 147 GURL url1("http://foo/1");
148 AddTab(browser(), url1); 148 AddTab(browser(), url1);
149 browser()->OpenURL(OpenURLParams( 149 browser()->OpenURL(OpenURLParams(
150 url1, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); 150 url1, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false));
151 151
152 chrome::BookmarkCurrentPage(browser()); 152 chrome::BookmarkCurrentPageAllowingExtensionOverrides(browser());
153 153
154 // It should now be bookmarked in the bookmark model. 154 // It should now be bookmarked in the bookmark model.
155 EXPECT_EQ(profile(), browser()->profile()); 155 EXPECT_EQ(profile(), browser()->profile());
156 EXPECT_TRUE(model->IsBookmarked(url1)); 156 EXPECT_TRUE(model->IsBookmarked(url1));
157 } 157 }
158 158
159 // Tests back/forward in new tab (Control + Back/Forward button in the UI). 159 // Tests back/forward in new tab (Control + Back/Forward button in the UI).
160 TEST_F(BrowserCommandsTest, BackForwardInNewTab) { 160 TEST_F(BrowserCommandsTest, BackForwardInNewTab) {
161 GURL url1("http://foo/1"); 161 GURL url1("http://foo/1");
162 GURL url2("http://foo/2"); 162 GURL url2("http://foo/2");
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 tab_strip_model->ActivateTabAt(1, true); 333 tab_strip_model->ActivateTabAt(1, true);
334 EXPECT_TRUE(tab_strip_model->IsTabSelected(1)); 334 EXPECT_TRUE(tab_strip_model->IsTabSelected(1));
335 chrome_page_zoom::Zoom(contents2, content::PAGE_ZOOM_OUT); 335 chrome_page_zoom::Zoom(contents2, content::PAGE_ZOOM_OUT);
336 336
337 zoom_controller = ZoomController::FromWebContents(contents2); 337 zoom_controller = ZoomController::FromWebContents(contents2);
338 EXPECT_EQ(zoom_controller->GetZoomPercent(), 90.0f); 338 EXPECT_EQ(zoom_controller->GetZoomPercent(), 90.0f);
339 EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ZOOM_PLUS)); 339 EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ZOOM_PLUS));
340 EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ZOOM_NORMAL)); 340 EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ZOOM_NORMAL));
341 EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ZOOM_MINUS)); 341 EXPECT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ZOOM_MINUS));
342 } 342 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698