| OLD | NEW |
| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 // Make sure the state matches. | 1365 // Make sure the state matches. |
| 1366 TabStripModel* new_model = new_browser->tab_strip_model(); | 1366 TabStripModel* new_model = new_browser->tab_strip_model(); |
| 1367 EXPECT_TRUE(new_model->IsAppTab(0)); | 1367 EXPECT_TRUE(new_model->IsAppTab(0)); |
| 1368 EXPECT_FALSE(new_model->IsAppTab(1)); | 1368 EXPECT_FALSE(new_model->IsAppTab(1)); |
| 1369 EXPECT_FALSE(new_model->IsAppTab(2)); | 1369 EXPECT_FALSE(new_model->IsAppTab(2)); |
| 1370 | 1370 |
| 1371 EXPECT_TRUE(new_model->IsTabPinned(0)); | 1371 EXPECT_TRUE(new_model->IsTabPinned(0)); |
| 1372 EXPECT_TRUE(new_model->IsTabPinned(1)); | 1372 EXPECT_TRUE(new_model->IsTabPinned(1)); |
| 1373 EXPECT_FALSE(new_model->IsTabPinned(2)); | 1373 EXPECT_FALSE(new_model->IsTabPinned(2)); |
| 1374 | 1374 |
| 1375 EXPECT_TRUE(chrome::IsNTPURL(new_model->GetWebContentsAt(2)->GetURL(), | 1375 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
| 1376 browser()->profile())); | 1376 new_model->GetWebContentsAt(2)->GetURL()); |
| 1377 | 1377 |
| 1378 EXPECT_TRUE( | 1378 EXPECT_TRUE( |
| 1379 extensions::TabHelper::FromWebContents( | 1379 extensions::TabHelper::FromWebContents( |
| 1380 new_model->GetWebContentsAt(0))->extension_app() == extension_app); | 1380 new_model->GetWebContentsAt(0))->extension_app() == extension_app); |
| 1381 } | 1381 } |
| 1382 #endif // !defined(OS_CHROMEOS) | 1382 #endif // !defined(OS_CHROMEOS) |
| 1383 | 1383 |
| 1384 // This test verifies we don't crash when closing the last window and the app | 1384 // This test verifies we don't crash when closing the last window and the app |
| 1385 // menu is showing. | 1385 // menu is showing. |
| 1386 // TODO(linux_aura) http://crbug.com/163931 | 1386 // TODO(linux_aura) http://crbug.com/163931 |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2447 } | 2447 } |
| 2448 | 2448 |
| 2449 // Shift-middle-clicks open in a foreground tab. | 2449 // Shift-middle-clicks open in a foreground tab. |
| 2450 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) { | 2450 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) { |
| 2451 int modifiers = blink::WebInputEvent::ShiftKey; | 2451 int modifiers = blink::WebInputEvent::ShiftKey; |
| 2452 blink::WebMouseEvent::Button button = blink::WebMouseEvent::ButtonMiddle; | 2452 blink::WebMouseEvent::Button button = blink::WebMouseEvent::ButtonMiddle; |
| 2453 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB; | 2453 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB; |
| 2454 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); | 2454 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); |
| 2455 } | 2455 } |
| 2456 | 2456 |
| 2457 // TODO(sail): enable this for MAC when | 2457 // Does not work with Instant Extended. http://crbug.com/317760. |
| 2458 // BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar | 2458 // // TODO(sail): enable this for MAC when |
| 2459 // is fixed. | 2459 // // BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar |
| 2460 #if defined(OS_MACOSX) | 2460 // // is fixed. |
| 2461 #define MAYBE_GetSizeForNewRenderView DISABLED_GetSizeForNewRenderView | 2461 // #if defined(OS_MACOSX) |
| 2462 #else | 2462 // #define MAYBE_GetSizeForNewRenderView DISABLED_GetSizeForNewRenderView |
| 2463 #define MAYBE_GetSizeForNewRenderView GetSizeForNewRenderView | 2463 // #else |
| 2464 #endif | 2464 // #define MAYBE_GetSizeForNewRenderView GetSizeForNewRenderView |
| 2465 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_GetSizeForNewRenderView) { | 2465 // #endif |
| 2466 IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_GetSizeForNewRenderView) { |
| 2466 ASSERT_TRUE(test_server()->Start()); | 2467 ASSERT_TRUE(test_server()->Start()); |
| 2467 // Create an HTTPS server for cross-site transition. | 2468 // Create an HTTPS server for cross-site transition. |
| 2468 net::SpawnedTestServer https_test_server(net::SpawnedTestServer::TYPE_HTTPS, | 2469 net::SpawnedTestServer https_test_server(net::SpawnedTestServer::TYPE_HTTPS, |
| 2469 net::SpawnedTestServer::kLocalhost, | 2470 net::SpawnedTestServer::kLocalhost, |
| 2470 base::FilePath(kDocRoot)); | 2471 base::FilePath(kDocRoot)); |
| 2471 ASSERT_TRUE(https_test_server.Start()); | 2472 ASSERT_TRUE(https_test_server.Start()); |
| 2472 | 2473 |
| 2473 // Start with NTP. | 2474 // Start with NTP. |
| 2474 ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab")); | 2475 ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab")); |
| 2475 ASSERT_EQ(BookmarkBar::DETACHED, browser()->bookmark_bar_state()); | 2476 ASSERT_EQ(BookmarkBar::DETACHED, browser()->bookmark_bar_state()); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2550 exp_commit_size.Enlarge(wcv_resize_insets.width(), | 2551 exp_commit_size.Enlarge(wcv_resize_insets.width(), |
| 2551 wcv_resize_insets.height() + height_inset); | 2552 wcv_resize_insets.height() + height_inset); |
| 2552 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2553 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
| 2553 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2554 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
| 2554 // Sizes of RenderWidgetHostView and WebContentsView before and after | 2555 // Sizes of RenderWidgetHostView and WebContentsView before and after |
| 2555 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. | 2556 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. |
| 2556 EXPECT_EQ(rwhv_commit_size2, | 2557 EXPECT_EQ(rwhv_commit_size2, |
| 2557 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2558 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
| 2558 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); | 2559 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); |
| 2559 } | 2560 } |
| OLD | NEW |