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

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

Issue 1917973002: mac: Remove IsOSLion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tapted Created 4 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #include "net/test/embedded_test_server/embedded_test_server.h" 109 #include "net/test/embedded_test_server/embedded_test_server.h"
110 #include "net/test/embedded_test_server/request_handler_util.h" 110 #include "net/test/embedded_test_server/request_handler_util.h"
111 #include "net/test/spawned_test_server/spawned_test_server.h" 111 #include "net/test/spawned_test_server/spawned_test_server.h"
112 #include "net/test/url_request/url_request_mock_http_job.h" 112 #include "net/test/url_request/url_request_mock_http_job.h"
113 #include "net/url_request/url_request_filter.h" 113 #include "net/url_request/url_request_filter.h"
114 #include "net/url_request/url_request_test_util.h" 114 #include "net/url_request/url_request_test_util.h"
115 #include "ui/base/l10n/l10n_util.h" 115 #include "ui/base/l10n/l10n_util.h"
116 #include "ui/base/page_transition_types.h" 116 #include "ui/base/page_transition_types.h"
117 117
118 #if defined(OS_MACOSX) 118 #if defined(OS_MACOSX)
119 #include "base/mac/mac_util.h"
120 #include "base/mac/scoped_nsautorelease_pool.h" 119 #include "base/mac/scoped_nsautorelease_pool.h"
121 #include "chrome/browser/ui/cocoa/run_loop_testing.h" 120 #include "chrome/browser/ui/cocoa/run_loop_testing.h"
122 #endif 121 #endif
123 122
124 #if defined(OS_WIN) 123 #if defined(OS_WIN)
125 #include "base/i18n/rtl.h" 124 #include "base/i18n/rtl.h"
126 #include "chrome/browser/browser_process.h" 125 #include "chrome/browser/browser_process.h"
127 #endif 126 #endif
128 127
129 using app_modal::AppModalDialog; 128 using app_modal::AppModalDialog;
(...skipping 2584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2714 // Shift-middle-clicks open in a foreground tab. 2713 // Shift-middle-clicks open in a foreground tab.
2715 // http://crbug.com/396347 2714 // http://crbug.com/396347
2716 IN_PROC_BROWSER_TEST_F(ClickModifierTest, DISABLED_HrefShiftMiddleClickTest) { 2715 IN_PROC_BROWSER_TEST_F(ClickModifierTest, DISABLED_HrefShiftMiddleClickTest) {
2717 int modifiers = blink::WebInputEvent::ShiftKey; 2716 int modifiers = blink::WebInputEvent::ShiftKey;
2718 blink::WebMouseEvent::Button button = blink::WebMouseEvent::ButtonMiddle; 2717 blink::WebMouseEvent::Button button = blink::WebMouseEvent::ButtonMiddle;
2719 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB; 2718 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB;
2720 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2719 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2721 } 2720 }
2722 2721
2723 IN_PROC_BROWSER_TEST_F(BrowserTest, GetSizeForNewRenderView) { 2722 IN_PROC_BROWSER_TEST_F(BrowserTest, GetSizeForNewRenderView) {
2724 #if defined(OS_MACOSX)
2725 // TODO(erikchen): This behavior has regressed on OSX 10.7 and 10.8 and should
2726 // be fixed. http://crbug.com/503185
2727 if (base::mac::IsOSMountainLion() || base::mac::IsOSLion())
2728 return;
2729 #endif // defined(OS_MACOSX)
2730 // The instant extended NTP has javascript that does not work with 2723 // The instant extended NTP has javascript that does not work with
2731 // ui_test_utils::NavigateToURL. The NTP rvh reloads when the browser tries 2724 // ui_test_utils::NavigateToURL. The NTP rvh reloads when the browser tries
2732 // to navigate away from the page, which causes the WebContents to end up in 2725 // to navigate away from the page, which causes the WebContents to end up in
2733 // an inconsistent state. (is_loaded = true, last_commited_url=ntp, 2726 // an inconsistent state. (is_loaded = true, last_commited_url=ntp,
2734 // visible_url=title1.html) 2727 // visible_url=title1.html)
2735 browser()->profile()->GetPrefs()->SetBoolean(prefs::kWebKitJavascriptEnabled, 2728 browser()->profile()->GetPrefs()->SetBoolean(prefs::kWebKitJavascriptEnabled,
2736 false); 2729 false);
2737 ASSERT_TRUE(embedded_test_server()->Start()); 2730 ASSERT_TRUE(embedded_test_server()->Start());
2738 // Create an HTTPS server for cross-site transition. 2731 // Create an HTTPS server for cross-site transition.
2739 net::EmbeddedTestServer https_test_server( 2732 net::EmbeddedTestServer https_test_server(
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 Browser* browser = new Browser(params); 3270 Browser* browser = new Browser(params);
3278 gfx::Rect bounds = browser->window()->GetBounds(); 3271 gfx::Rect bounds = browser->window()->GetBounds();
3279 3272
3280 // Should be EXPECT_EQ, but this width is inconsistent across platforms. 3273 // Should be EXPECT_EQ, but this width is inconsistent across platforms.
3281 // See https://crbug.com/567925. 3274 // See https://crbug.com/567925.
3282 EXPECT_GE(bounds.width(), 100); 3275 EXPECT_GE(bounds.width(), 100);
3283 EXPECT_EQ(122, bounds.height()); 3276 EXPECT_EQ(122, bounds.height());
3284 browser->window()->Close(); 3277 browser->window()->Close();
3285 } 3278 }
3286 } 3279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698