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

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

Issue 99853005: Revert of https://codereview.chromium.org/68713009/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 // to an anchor in javascript body.onload handler. 1132 // to an anchor in javascript body.onload handler.
1133 IN_PROC_BROWSER_TEST_F(BrowserTest, 1133 IN_PROC_BROWSER_TEST_F(BrowserTest,
1134 DISABLED_FaviconOfOnloadRedirectToAnchorPage) { 1134 DISABLED_FaviconOfOnloadRedirectToAnchorPage) {
1135 ASSERT_TRUE(test_server()->Start()); 1135 ASSERT_TRUE(test_server()->Start());
1136 GURL url(test_server()->GetURL("files/onload_redirect_to_anchor.html")); 1136 GURL url(test_server()->GetURL("files/onload_redirect_to_anchor.html"));
1137 GURL expected_favicon_url(test_server()->GetURL("files/test.png")); 1137 GURL expected_favicon_url(test_server()->GetURL("files/test.png"));
1138 1138
1139 ui_test_utils::NavigateToURL(browser(), url); 1139 ui_test_utils::NavigateToURL(browser(), url);
1140 1140
1141 NavigationEntry* entry = browser()->tab_strip_model()-> 1141 NavigationEntry* entry = browser()->tab_strip_model()->
1142 GetActiveWebContents()->GetController().GetVisibleEntry(); 1142 GetActiveWebContents()->GetController().GetActiveEntry();
1143 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); 1143 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec());
1144 } 1144 }
1145 1145
1146 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined (OS_WIN) 1146 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined (OS_WIN)
1147 // http://crbug.com/83828. On Mac 10.6, the failure rate is 14% 1147 // http://crbug.com/83828. On Mac 10.6, the failure rate is 14%
1148 #define MAYBE_FaviconChange DISABLED_FaviconChange 1148 #define MAYBE_FaviconChange DISABLED_FaviconChange
1149 #else 1149 #else
1150 #define MAYBE_FaviconChange FaviconChange 1150 #define MAYBE_FaviconChange FaviconChange
1151 #endif 1151 #endif
1152 // Test that an icon can be changed from JS. 1152 // Test that an icon can be changed from JS.
1153 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { 1153 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) {
1154 static const base::FilePath::CharType* kFile = 1154 static const base::FilePath::CharType* kFile =
1155 FILE_PATH_LITERAL("onload_change_favicon.html"); 1155 FILE_PATH_LITERAL("onload_change_favicon.html");
1156 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( 1156 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath(
1157 base::FilePath::kCurrentDirectory), base::FilePath(kFile))); 1157 base::FilePath::kCurrentDirectory), base::FilePath(kFile)));
1158 ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme)); 1158 ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme));
1159 ui_test_utils::NavigateToURL(browser(), file_url); 1159 ui_test_utils::NavigateToURL(browser(), file_url);
1160 1160
1161 NavigationEntry* entry = browser()->tab_strip_model()-> 1161 NavigationEntry* entry = browser()->tab_strip_model()->
1162 GetActiveWebContents()->GetController().GetVisibleEntry(); 1162 GetActiveWebContents()->GetController().GetActiveEntry();
1163 static const base::FilePath::CharType* kIcon = 1163 static const base::FilePath::CharType* kIcon =
1164 FILE_PATH_LITERAL("test1.png"); 1164 FILE_PATH_LITERAL("test1.png");
1165 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath( 1165 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath(
1166 base::FilePath::kCurrentDirectory), base::FilePath(kIcon))); 1166 base::FilePath::kCurrentDirectory), base::FilePath(kIcon)));
1167 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); 1167 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec());
1168 } 1168 }
1169 1169
1170 // http://crbug.com/172336 1170 // http://crbug.com/172336
1171 #if defined(OS_WIN) 1171 #if defined(OS_WIN)
1172 #define MAYBE_TabClosingWhenRemovingExtension \ 1172 #define MAYBE_TabClosingWhenRemovingExtension \
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 exp_commit_size.Enlarge(wcv_resize_insets.width(), 2553 exp_commit_size.Enlarge(wcv_resize_insets.width(),
2554 wcv_resize_insets.height() + height_inset); 2554 wcv_resize_insets.height() + height_inset);
2555 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2555 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2556 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2556 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2557 // Sizes of RenderWidgetHostView and WebContentsView before and after 2557 // Sizes of RenderWidgetHostView and WebContentsView before and after
2558 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. 2558 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same.
2559 EXPECT_EQ(rwhv_commit_size2, 2559 EXPECT_EQ(rwhv_commit_size2,
2560 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2560 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2561 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); 2561 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize());
2562 } 2562 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698