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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 11866004: Add scheme to HostZoomMap (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add namespace Created 7 years, 9 months 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 (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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #include "base/mac/scoped_nsautorelease_pool.h" 75 #include "base/mac/scoped_nsautorelease_pool.h"
76 #include "chrome/browser/ui/cocoa/run_loop_testing.h" 76 #include "chrome/browser/ui/cocoa/run_loop_testing.h"
77 #endif 77 #endif
78 78
79 #if defined(OS_WIN) 79 #if defined(OS_WIN)
80 #include "base/i18n/rtl.h" 80 #include "base/i18n/rtl.h"
81 #include "chrome/browser/browser_process.h" 81 #include "chrome/browser/browser_process.h"
82 #endif 82 #endif
83 83
84 using content::InterstitialPage; 84 using content::InterstitialPage;
85 using content::HostZoomMap;
85 using content::NavigationController; 86 using content::NavigationController;
86 using content::NavigationEntry; 87 using content::NavigationEntry;
87 using content::OpenURLParams; 88 using content::OpenURLParams;
88 using content::Referrer; 89 using content::Referrer;
89 using content::WebContents; 90 using content::WebContents;
90 using content::WebContentsObserver; 91 using content::WebContentsObserver;
91 using extensions::Extension; 92 using extensions::Extension;
92 93
93 namespace { 94 namespace {
94 95
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 IncognitoModePrefs::SetAvailability(popup_browser->profile()->GetPrefs(), 1363 IncognitoModePrefs::SetAvailability(popup_browser->profile()->GetPrefs(),
1363 IncognitoModePrefs::ENABLED); 1364 IncognitoModePrefs::ENABLED);
1364 // OPTIONS and IMPORT_SETTINGS are still disabled since it is a non-normal UI. 1365 // OPTIONS and IMPORT_SETTINGS are still disabled since it is a non-normal UI.
1365 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_OPTIONS)); 1366 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_OPTIONS));
1366 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_IMPORT_SETTINGS)); 1367 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_IMPORT_SETTINGS));
1367 } 1368 }
1368 1369
1369 namespace { 1370 namespace {
1370 1371
1371 void OnZoomLevelChanged(const base::Closure& callback, 1372 void OnZoomLevelChanged(const base::Closure& callback,
1372 const std::string& host) { 1373 const HostZoomMap::ZoomLevelChange& host) {
1373 callback.Run(); 1374 callback.Run();
1374 } 1375 }
1375 1376
1376 } // namespace 1377 } // namespace
1377 1378
1378 #if defined(OS_WIN) 1379 #if defined(OS_WIN)
1379 // Flakes regularly on Windows XP 1380 // Flakes regularly on Windows XP
1380 // http://crbug.com/146040 1381 // http://crbug.com/146040
1381 #define MAYBE_PageZoom DISABLED_PageZoom 1382 #define MAYBE_PageZoom DISABLED_PageZoom
1382 #else 1383 #else
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2102 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2103 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2103 } 2104 }
2104 2105
2105 // Shift-middle-clicks open in a foreground tab. 2106 // Shift-middle-clicks open in a foreground tab.
2106 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) { 2107 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) {
2107 int modifiers = WebKit::WebInputEvent::ShiftKey; 2108 int modifiers = WebKit::WebInputEvent::ShiftKey;
2108 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle; 2109 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle;
2109 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB; 2110 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB;
2110 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2111 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2111 } 2112 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698