| 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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 // to an anchor in javascript body.onload handler. | 1131 // to an anchor in javascript body.onload handler. |
| 1132 IN_PROC_BROWSER_TEST_F(BrowserTest, | 1132 IN_PROC_BROWSER_TEST_F(BrowserTest, |
| 1133 DISABLED_FaviconOfOnloadRedirectToAnchorPage) { | 1133 DISABLED_FaviconOfOnloadRedirectToAnchorPage) { |
| 1134 ASSERT_TRUE(test_server()->Start()); | 1134 ASSERT_TRUE(test_server()->Start()); |
| 1135 GURL url(test_server()->GetURL("files/onload_redirect_to_anchor.html")); | 1135 GURL url(test_server()->GetURL("files/onload_redirect_to_anchor.html")); |
| 1136 GURL expected_favicon_url(test_server()->GetURL("files/test.png")); | 1136 GURL expected_favicon_url(test_server()->GetURL("files/test.png")); |
| 1137 | 1137 |
| 1138 ui_test_utils::NavigateToURL(browser(), url); | 1138 ui_test_utils::NavigateToURL(browser(), url); |
| 1139 | 1139 |
| 1140 NavigationEntry* entry = browser()->tab_strip_model()-> | 1140 NavigationEntry* entry = browser()->tab_strip_model()-> |
| 1141 GetActiveWebContents()->GetController().GetActiveEntry(); | 1141 GetActiveWebContents()->GetController().GetVisibleEntry(); |
| 1142 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); | 1142 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined (OS_WIN) | 1145 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined (OS_WIN) |
| 1146 // http://crbug.com/83828. On Mac 10.6, the failure rate is 14% | 1146 // http://crbug.com/83828. On Mac 10.6, the failure rate is 14% |
| 1147 #define MAYBE_FaviconChange DISABLED_FaviconChange | 1147 #define MAYBE_FaviconChange DISABLED_FaviconChange |
| 1148 #else | 1148 #else |
| 1149 #define MAYBE_FaviconChange FaviconChange | 1149 #define MAYBE_FaviconChange FaviconChange |
| 1150 #endif | 1150 #endif |
| 1151 // Test that an icon can be changed from JS. | 1151 // Test that an icon can be changed from JS. |
| 1152 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { | 1152 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { |
| 1153 static const base::FilePath::CharType* kFile = | 1153 static const base::FilePath::CharType* kFile = |
| 1154 FILE_PATH_LITERAL("onload_change_favicon.html"); | 1154 FILE_PATH_LITERAL("onload_change_favicon.html"); |
| 1155 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( | 1155 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( |
| 1156 base::FilePath::kCurrentDirectory), base::FilePath(kFile))); | 1156 base::FilePath::kCurrentDirectory), base::FilePath(kFile))); |
| 1157 ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme)); | 1157 ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme)); |
| 1158 ui_test_utils::NavigateToURL(browser(), file_url); | 1158 ui_test_utils::NavigateToURL(browser(), file_url); |
| 1159 | 1159 |
| 1160 NavigationEntry* entry = browser()->tab_strip_model()-> | 1160 NavigationEntry* entry = browser()->tab_strip_model()-> |
| 1161 GetActiveWebContents()->GetController().GetActiveEntry(); | 1161 GetActiveWebContents()->GetController().GetVisibleEntry(); |
| 1162 static const base::FilePath::CharType* kIcon = | 1162 static const base::FilePath::CharType* kIcon = |
| 1163 FILE_PATH_LITERAL("test1.png"); | 1163 FILE_PATH_LITERAL("test1.png"); |
| 1164 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath( | 1164 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath( |
| 1165 base::FilePath::kCurrentDirectory), base::FilePath(kIcon))); | 1165 base::FilePath::kCurrentDirectory), base::FilePath(kIcon))); |
| 1166 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); | 1166 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 // http://crbug.com/172336 | 1169 // http://crbug.com/172336 |
| 1170 #if defined(OS_WIN) | 1170 #if defined(OS_WIN) |
| 1171 #define MAYBE_TabClosingWhenRemovingExtension \ | 1171 #define MAYBE_TabClosingWhenRemovingExtension \ |
| (...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2550 exp_commit_size.Enlarge(wcv_resize_insets.width(), | 2550 exp_commit_size.Enlarge(wcv_resize_insets.width(), |
| 2551 wcv_resize_insets.height() + height_inset); | 2551 wcv_resize_insets.height() + height_inset); |
| 2552 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2552 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
| 2553 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2553 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
| 2554 // Sizes of RenderWidgetHostView and WebContentsView before and after | 2554 // Sizes of RenderWidgetHostView and WebContentsView before and after |
| 2555 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. | 2555 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. |
| 2556 EXPECT_EQ(rwhv_commit_size2, | 2556 EXPECT_EQ(rwhv_commit_size2, |
| 2557 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2557 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
| 2558 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); | 2558 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); |
| 2559 } | 2559 } |
| OLD | NEW |