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

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

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 6 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 (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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 // on the Mac. http://crbug.com/13148 1102 // on the Mac. http://crbug.com/13148
1103 #if !defined(OS_MACOSX) 1103 #if !defined(OS_MACOSX)
1104 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFile) { 1104 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFile) {
1105 CommandUpdater* command_updater = 1105 CommandUpdater* command_updater =
1106 browser()->command_controller()->command_updater(); 1106 browser()->command_controller()->command_updater();
1107 1107
1108 static const base::FilePath::CharType* kEmptyFile = 1108 static const base::FilePath::CharType* kEmptyFile =
1109 FILE_PATH_LITERAL("empty.html"); 1109 FILE_PATH_LITERAL("empty.html");
1110 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( 1110 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath(
1111 base::FilePath::kCurrentDirectory), base::FilePath(kEmptyFile))); 1111 base::FilePath::kCurrentDirectory), base::FilePath(kEmptyFile)));
1112 ASSERT_TRUE(file_url.SchemeIs(content::kFileScheme)); 1112 ASSERT_TRUE(file_url.SchemeIs(url::kFileScheme));
1113 ui_test_utils::NavigateToURL(browser(), file_url); 1113 ui_test_utils::NavigateToURL(browser(), file_url);
1114 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); 1114 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
1115 } 1115 }
1116 1116
1117 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttp) { 1117 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttp) {
1118 CommandUpdater* command_updater = 1118 CommandUpdater* command_updater =
1119 browser()->command_controller()->command_updater(); 1119 browser()->command_controller()->command_updater();
1120 1120
1121 ASSERT_TRUE(test_server()->Start()); 1121 ASSERT_TRUE(test_server()->Start());
1122 GURL http_url(test_server()->GetURL(std::string())); 1122 GURL http_url(test_server()->GetURL(std::string()));
(...skipping 18 matching lines...) Expand all
1141 1141
1142 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFtp) { 1142 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFtp) {
1143 CommandUpdater* command_updater = 1143 CommandUpdater* command_updater =
1144 browser()->command_controller()->command_updater(); 1144 browser()->command_controller()->command_updater();
1145 1145
1146 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_FTP, 1146 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_FTP,
1147 net::SpawnedTestServer::kLocalhost, 1147 net::SpawnedTestServer::kLocalhost,
1148 base::FilePath(kDocRoot)); 1148 base::FilePath(kDocRoot));
1149 ASSERT_TRUE(test_server.Start()); 1149 ASSERT_TRUE(test_server.Start());
1150 GURL ftp_url(test_server.GetURL(std::string())); 1150 GURL ftp_url(test_server.GetURL(std::string()));
1151 ASSERT_TRUE(ftp_url.SchemeIs(content::kFtpScheme)); 1151 ASSERT_TRUE(ftp_url.SchemeIs(url::kFtpScheme));
1152 ui_test_utils::NavigateToURL(browser(), ftp_url); 1152 ui_test_utils::NavigateToURL(browser(), ftp_url);
1153 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); 1153 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
1154 } 1154 }
1155 1155
1156 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutInvalid) { 1156 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutInvalid) {
1157 CommandUpdater* command_updater = 1157 CommandUpdater* command_updater =
1158 browser()->command_controller()->command_updater(); 1158 browser()->command_controller()->command_updater();
1159 1159
1160 // Urls that should not have shortcuts. 1160 // Urls that should not have shortcuts.
1161 GURL new_tab_url(chrome::kChromeUINewTabURL); 1161 GURL new_tab_url(chrome::kChromeUINewTabURL);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 #define MAYBE_FaviconChange DISABLED_FaviconChange 1247 #define MAYBE_FaviconChange DISABLED_FaviconChange
1248 #else 1248 #else
1249 #define MAYBE_FaviconChange FaviconChange 1249 #define MAYBE_FaviconChange FaviconChange
1250 #endif 1250 #endif
1251 // Test that an icon can be changed from JS. 1251 // Test that an icon can be changed from JS.
1252 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { 1252 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) {
1253 static const base::FilePath::CharType* kFile = 1253 static const base::FilePath::CharType* kFile =
1254 FILE_PATH_LITERAL("onload_change_favicon.html"); 1254 FILE_PATH_LITERAL("onload_change_favicon.html");
1255 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( 1255 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath(
1256 base::FilePath::kCurrentDirectory), base::FilePath(kFile))); 1256 base::FilePath::kCurrentDirectory), base::FilePath(kFile)));
1257 ASSERT_TRUE(file_url.SchemeIs(content::kFileScheme)); 1257 ASSERT_TRUE(file_url.SchemeIs(url::kFileScheme));
1258 ui_test_utils::NavigateToURL(browser(), file_url); 1258 ui_test_utils::NavigateToURL(browser(), file_url);
1259 1259
1260 NavigationEntry* entry = browser()->tab_strip_model()-> 1260 NavigationEntry* entry = browser()->tab_strip_model()->
1261 GetActiveWebContents()->GetController().GetActiveEntry(); 1261 GetActiveWebContents()->GetController().GetActiveEntry();
1262 static const base::FilePath::CharType* kIcon = 1262 static const base::FilePath::CharType* kIcon =
1263 FILE_PATH_LITERAL("test1.png"); 1263 FILE_PATH_LITERAL("test1.png");
1264 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath( 1264 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath(
1265 base::FilePath::kCurrentDirectory), base::FilePath(kIcon))); 1265 base::FilePath::kCurrentDirectory), base::FilePath(kIcon)));
1266 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); 1266 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec());
1267 } 1267 }
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 #endif 2686 #endif
2687 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2687 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2688 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2688 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2689 gfx::Size exp_final_size(initial_wcv_size); 2689 gfx::Size exp_final_size(initial_wcv_size);
2690 exp_final_size.Enlarge(wcv_resize_insets.width(), 2690 exp_final_size.Enlarge(wcv_resize_insets.width(),
2691 wcv_resize_insets.height() + height_inset); 2691 wcv_resize_insets.height() + height_inset);
2692 EXPECT_EQ(exp_final_size, 2692 EXPECT_EQ(exp_final_size,
2693 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2693 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2694 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); 2694 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size());
2695 } 2695 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/common/webservice_search_provider.cc ('k') | chrome/browser/ui/cocoa/drag_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698