| OLD | NEW |
| 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 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2554 | 2554 |
| 2555 // Shift-middle-clicks open in a foreground tab. | 2555 // Shift-middle-clicks open in a foreground tab. |
| 2556 // http://crbug.com/396347 | 2556 // http://crbug.com/396347 |
| 2557 IN_PROC_BROWSER_TEST_F(ClickModifierTest, DISABLED_HrefShiftMiddleClickTest) { | 2557 IN_PROC_BROWSER_TEST_F(ClickModifierTest, DISABLED_HrefShiftMiddleClickTest) { |
| 2558 int modifiers = blink::WebInputEvent::ShiftKey; | 2558 int modifiers = blink::WebInputEvent::ShiftKey; |
| 2559 blink::WebMouseEvent::Button button = blink::WebMouseEvent::Button::Middle; | 2559 blink::WebMouseEvent::Button button = blink::WebMouseEvent::Button::Middle; |
| 2560 WindowOpenDisposition disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; | 2560 WindowOpenDisposition disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
| 2561 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); | 2561 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); |
| 2562 } | 2562 } |
| 2563 | 2563 |
| 2564 IN_PROC_BROWSER_TEST_F(BrowserTest, GetSizeForNewRenderView) { | 2564 // TODO(crbug.com/655112): Fails on Mac 10.11 Tests. |
| 2565 #if defined(OS_MACOSX) |
| 2566 #define MAYBE_GetSizeForNewRenderView DISABLED_GetSizeForNewRenderView |
| 2567 #else |
| 2568 #define MAYBE_GetSizeForNewRenderView GetSizeForNewRenderView |
| 2569 #endif |
| 2570 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_GetSizeForNewRenderView) { |
| 2565 // The instant extended NTP has javascript that does not work with | 2571 // The instant extended NTP has javascript that does not work with |
| 2566 // ui_test_utils::NavigateToURL. The NTP rvh reloads when the browser tries | 2572 // ui_test_utils::NavigateToURL. The NTP rvh reloads when the browser tries |
| 2567 // to navigate away from the page, which causes the WebContents to end up in | 2573 // to navigate away from the page, which causes the WebContents to end up in |
| 2568 // an inconsistent state. (is_loaded = true, last_commited_url=ntp, | 2574 // an inconsistent state. (is_loaded = true, last_commited_url=ntp, |
| 2569 // visible_url=title1.html) | 2575 // visible_url=title1.html) |
| 2570 browser()->profile()->GetPrefs()->SetBoolean(prefs::kWebKitJavascriptEnabled, | 2576 browser()->profile()->GetPrefs()->SetBoolean(prefs::kWebKitJavascriptEnabled, |
| 2571 false); | 2577 false); |
| 2572 ASSERT_TRUE(embedded_test_server()->Start()); | 2578 ASSERT_TRUE(embedded_test_server()->Start()); |
| 2573 // Create an HTTPS server for cross-site transition. | 2579 // Create an HTTPS server for cross-site transition. |
| 2574 net::EmbeddedTestServer https_test_server( | 2580 net::EmbeddedTestServer https_test_server( |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2881 Browser* browser = new Browser(params); | 2887 Browser* browser = new Browser(params); |
| 2882 gfx::Rect bounds = browser->window()->GetBounds(); | 2888 gfx::Rect bounds = browser->window()->GetBounds(); |
| 2883 | 2889 |
| 2884 // Should be EXPECT_EQ, but this width is inconsistent across platforms. | 2890 // Should be EXPECT_EQ, but this width is inconsistent across platforms. |
| 2885 // See https://crbug.com/567925. | 2891 // See https://crbug.com/567925. |
| 2886 EXPECT_GE(bounds.width(), 100); | 2892 EXPECT_GE(bounds.width(), 100); |
| 2887 EXPECT_EQ(122, bounds.height()); | 2893 EXPECT_EQ(122, bounds.height()); |
| 2888 browser->window()->Close(); | 2894 browser->window()->Close(); |
| 2889 } | 2895 } |
| 2890 } | 2896 } |
| OLD | NEW |