summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser_focus_uitest.cc30
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc10
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc56
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc62
-rw-r--r--chrome/browser/find_bar_host_browsertest.cc78
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc4
-rw-r--r--chrome/browser/history/redirect_uitest.cc47
-rw-r--r--chrome/browser/login_prompt_uitest.cc34
-rw-r--r--chrome/browser/notifications/notifications_interactive_uitest.cc8
-rw-r--r--chrome/browser/printing/printing_layout_uitest.cc12
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc20
-rw-r--r--chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc12
-rw-r--r--chrome/browser/repost_form_warning_uitest.cc10
-rw-r--r--chrome/browser/sessions/session_restore_uitest.cc2
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc114
-rw-r--r--chrome/browser/tab_contents/view_source_uitest.cc13
-rw-r--r--chrome/browser/tab_restore_uitest.cc8
-rw-r--r--chrome/browser/views/find_bar_host_interactive_uitest.cc6
-rw-r--r--chrome/browser/views/find_bar_host_uitest.cc4
-rw-r--r--chrome/test/interactive_ui/infobars_uitest.cc4
-rw-r--r--chrome_frame/test/http_server.cc6
-rw-r--r--net/url_request/url_request_unittest.cc40
-rw-r--r--net/url_request/url_request_unittest.h9
23 files changed, 291 insertions, 298 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 5d03a5f..a24e1b6 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -50,9 +50,9 @@ namespace {
// action we take.
const int kActionDelayMs = 500;
-const wchar_t kSimplePage[] = L"files/focus/page_with_focus.html";
-const wchar_t kStealFocusPage[] = L"files/focus/page_steals_focus.html";
-const wchar_t kTypicalPage[] = L"files/focus/typical_page.html";
+const char kSimplePage[] = "files/focus/page_with_focus.html";
+const char kStealFocusPage[] = "files/focus/page_steals_focus.html";
+const char kTypicalPage[] = "files/focus/typical_page.html";
const char kTypicalPageName[] = "typical_page.html";
class BrowserFocusTest : public InProcessBrowserTest {
@@ -192,7 +192,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BrowsersRememberFocus) {
HTTPTestServer* server = StartHTTPServer();
// First we navigate to our test page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
gfx::NativeWindow window = browser()->window()->GetNativeHandle();
@@ -255,7 +255,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, TabsRememberFocus) {
HTTPTestServer* server = StartHTTPServer();
// First we navigate to our test page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
// Create several tabs.
@@ -329,7 +329,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_TabsRememberFocusFindInPage) {
HTTPTestServer* server = StartHTTPServer();
// First we navigate to our test page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
browser()->Find();
@@ -367,7 +367,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) {
HTTPTestServer* server = StartHTTPServer();
// First we navigate to our test page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
// Open a new browser window.
@@ -395,7 +395,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) {
unfocused_browser = browser2;
#endif
- GURL steal_focus_url = server->TestServerPageW(kStealFocusPage);
+ GURL steal_focus_url = server->TestServerPage(kStealFocusPage);
ui_test_utils::NavigateToURL(unfocused_browser, steal_focus_url);
// Activate the first browser.
@@ -418,7 +418,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, LocationBarLockFocus) {
HTTPTestServer* server = StartHTTPServer();
// Open the page that steals focus.
- GURL url = server->TestServerPageW(kStealFocusPage);
+ GURL url = server->TestServerPage(kStealFocusPage);
ui_test_utils::NavigateToURL(browser(), url);
browser()->FocusLocationBar();
@@ -439,7 +439,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusTraversal) {
HTTPTestServer* server = StartHTTPServer();
// First we navigate to our test page.
- GURL url = server->TestServerPageW(kTypicalPage);
+ GURL url = server->TestServerPage(kTypicalPage);
ui_test_utils::NavigateToURL(browser(), url);
browser()->FocusLocationBar();
@@ -531,7 +531,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
HTTPTestServer* server = StartHTTPServer();
// First we navigate to our test page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
// Focus should be on the page.
@@ -621,7 +621,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, InterstitialFocus) {
HTTPTestServer* server = StartHTTPServer();
// First we navigate to our test page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
// Page should have focus.
@@ -656,7 +656,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) {
HTTPTestServer* server = StartHTTPServer();
// Open some page (any page that doesn't steal focus).
- GURL url = server->TestServerPageW(kTypicalPage);
+ GURL url = server->TestServerPage(kTypicalPage);
ui_test_utils::NavigateToURL(browser(), url);
gfx::NativeWindow window = browser()->window()->GetNativeHandle();
@@ -744,7 +744,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) {
ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR));
// Open a regular page, focus the location bar, reload.
- ui_test_utils::NavigateToURL(browser(), server->TestServerPageW(kSimplePage));
+ ui_test_utils::NavigateToURL(browser(), server->TestServerPage(kSimplePage));
browser()->FocusLocationBar();
ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR));
browser()->Reload();
@@ -759,7 +759,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReloadCrashedTab) {
HTTPTestServer* server = StartHTTPServer();
// Open a regular page, crash, reload.
- ui_test_utils::NavigateToURL(browser(), server->TestServerPageW(kSimplePage));
+ ui_test_utils::NavigateToURL(browser(), server->TestServerPage(kSimplePage));
ui_test_utils::CrashTab(browser()->GetSelectedTabContents());
browser()->Reload();
ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 227f77f..f38230d 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -27,7 +27,7 @@
namespace {
-const wchar_t kTestingPage[] = L"files/keyevents_test.html";
+const char kTestingPage[] = "files/keyevents_test.html";
const wchar_t kSuppressEventJS[] =
L"window.domAutomationController.send(setDefaultAction('%ls', %ls));";
const wchar_t kGetResultJS[] =
@@ -351,7 +351,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) {
HTTPTestServer* server = StartHTTPServer();
- GURL url = server->TestServerPageW(kTestingPage);
+ GURL url = server->TestServerPage(kTestingPage);
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
@@ -425,7 +425,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CtrlKeyEvents) {
HTTPTestServer* server = StartHTTPServer();
- GURL url = server->TestServerPageW(kTestingPage);
+ GURL url = server->TestServerPage(kTestingPage);
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
@@ -493,7 +493,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_AccessKeys) {
HTTPTestServer* server = StartHTTPServer();
- GURL url = server->TestServerPageW(kTestingPage);
+ GURL url = server->TestServerPage(kTestingPage);
ui_test_utils::NavigateToURL(browser(), url);
ui_test_utils::RunAllPendingInMessageLoop();
@@ -548,7 +548,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_AccessKeys) {
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, ReservedAccelerators) {
HTTPTestServer* server = StartHTTPServer();
- GURL url = server->TestServerPageW(kTestingPage);
+ GURL url = server->TestServerPage(kTestingPage);
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index b7fa693..dc9e1d5 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -52,31 +52,31 @@ class BrowserClosedObserver : public NotificationObserver {
// action we take.
const int kActionDelayMs = 500;
-const wchar_t kConsoleTestPage[] = L"files/devtools/console_test_page.html";
-const wchar_t kDebuggerTestPage[] = L"files/devtools/debugger_test_page.html";
-const wchar_t kEvalTestPage[] = L"files/devtools/eval_test_page.html";
-const wchar_t kJsPage[] = L"files/devtools/js_page.html";
-const wchar_t kPauseOnExceptionTestPage[] =
- L"files/devtools/pause_on_exception.html";
-const wchar_t kPauseWhenLoadingDevTools[] =
- L"files/devtools/pause_when_loading_devtools.html";
-const wchar_t kPauseWhenScriptIsRunning[] =
- L"files/devtools/pause_when_script_is_running.html";
-const wchar_t kResourceContentLengthTestPage[] = L"files/devtools/image.html";
-const wchar_t kResourceTestPage[] = L"files/devtools/resource_test_page.html";
-const wchar_t kSimplePage[] = L"files/devtools/simple_page.html";
-const wchar_t kSyntaxErrorTestPage[] =
- L"files/devtools/script_syntax_error.html";
-const wchar_t kDebuggerStepTestPage[] =
- L"files/devtools/debugger_step.html";
-const wchar_t kDebuggerClosurePage[] =
- L"files/devtools/debugger_closure.html";
-const wchar_t kDebuggerIntrinsicPropertiesPage[] =
- L"files/devtools/debugger_intrinsic_properties.html";
-const wchar_t kCompletionOnPause[] =
- L"files/devtools/completion_on_pause.html";
-const wchar_t kPageWithContentScript[] =
- L"files/devtools/page_with_content_script.html";
+const char kConsoleTestPage[] = "files/devtools/console_test_page.html";
+const char kDebuggerTestPage[] = "files/devtools/debugger_test_page.html";
+const char kEvalTestPage[] = "files/devtools/eval_test_page.html";
+const char kJsPage[] = "files/devtools/js_page.html";
+const char kPauseOnExceptionTestPage[] =
+ "files/devtools/pause_on_exception.html";
+const char kPauseWhenLoadingDevTools[] =
+ "files/devtools/pause_when_loading_devtools.html";
+const char kPauseWhenScriptIsRunning[] =
+ "files/devtools/pause_when_script_is_running.html";
+const char kResourceContentLengthTestPage[] = "files/devtools/image.html";
+const char kResourceTestPage[] = "files/devtools/resource_test_page.html";
+const char kSimplePage[] = "files/devtools/simple_page.html";
+const char kSyntaxErrorTestPage[] =
+ "files/devtools/script_syntax_error.html";
+const char kDebuggerStepTestPage[] =
+ "files/devtools/debugger_step.html";
+const char kDebuggerClosurePage[] =
+ "files/devtools/debugger_closure.html";
+const char kDebuggerIntrinsicPropertiesPage[] =
+ "files/devtools/debugger_intrinsic_properties.html";
+const char kCompletionOnPause[] =
+ "files/devtools/completion_on_pause.html";
+const char kPageWithContentScript[] =
+ "files/devtools/page_with_content_script.html";
class DevToolsSanityTest : public InProcessBrowserTest {
@@ -87,7 +87,7 @@ class DevToolsSanityTest : public InProcessBrowserTest {
}
protected:
- void RunTest(const std::string& test_name, const std::wstring& test_page) {
+ void RunTest(const std::string& test_name, const std::string& test_page) {
OpenDevToolsWindow(test_page);
std::string result;
@@ -117,9 +117,9 @@ class DevToolsSanityTest : public InProcessBrowserTest {
CloseDevToolsWindow();
}
- void OpenDevToolsWindow(const std::wstring& test_page) {
+ void OpenDevToolsWindow(const std::string& test_page) {
HTTPTestServer* server = StartHTTPServer();
- GURL url = server->TestServerPageW(test_page);
+ GURL url = server->TestServerPage(test_page);
ui_test_utils::NavigateToURL(browser(), url);
inspected_rvh_ = GetInspectedTab()->render_view_host();
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index 2789569..a8209c3 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -29,25 +29,25 @@
#include "net/base/net_util.h"
const std::string kSubscribePage = "/subscribe.html";
-const std::wstring kFeedPage = L"files/feeds/feed.html";
-const std::wstring kFeedPageMultiRel = L"files/feeds/feed_multi_rel.html";
-const std::wstring kNoFeedPage = L"files/feeds/no_feed.html";
-const std::wstring kValidFeed0 = L"files/feeds/feed_script.xml";
-const std::wstring kValidFeed1 = L"files/feeds/feed1.xml";
-const std::wstring kValidFeed2 = L"files/feeds/feed2.xml";
-const std::wstring kValidFeed3 = L"files/feeds/feed3.xml";
-const std::wstring kValidFeed4 = L"files/feeds/feed4.xml";
-const std::wstring kValidFeed5 = L"files/feeds/feed5.xml";
-const std::wstring kValidFeedNoLinks = L"files/feeds/feed_nolinks.xml";
-const std::wstring kInvalidFeed1 = L"files/feeds/feed_invalid1.xml";
-const std::wstring kInvalidFeed2 = L"files/feeds/feed_invalid2.xml";
-const std::wstring kLocalization =
- L"files/extensions/browsertest/title_localized_pa/simple.html";
-const std::wstring kHashPageA =
- L"files/extensions/api_test/page_action/hash_change/test_page_A.html";
-const std::wstring kHashPageAHash = kHashPageA + L"#asdf";
-const std::wstring kHashPageB =
- L"files/extensions/api_test/page_action/hash_change/test_page_B.html";
+const std::string kFeedPage = "files/feeds/feed.html";
+const std::string kFeedPageMultiRel = "files/feeds/feed_multi_rel.html";
+const std::string kNoFeedPage = "files/feeds/no_feed.html";
+const std::string kValidFeed0 = "files/feeds/feed_script.xml";
+const std::string kValidFeed1 = "files/feeds/feed1.xml";
+const std::string kValidFeed2 = "files/feeds/feed2.xml";
+const std::string kValidFeed3 = "files/feeds/feed3.xml";
+const std::string kValidFeed4 = "files/feeds/feed4.xml";
+const std::string kValidFeed5 = "files/feeds/feed5.xml";
+const std::string kValidFeedNoLinks = "files/feeds/feed_nolinks.xml";
+const std::string kInvalidFeed1 = "files/feeds/feed_invalid1.xml";
+const std::string kInvalidFeed2 = "files/feeds/feed_invalid2.xml";
+const std::string kLocalization =
+ "files/extensions/browsertest/title_localized_pa/simple.html";
+const std::string kHashPageA =
+ "files/extensions/api_test/page_action/hash_change/test_page_A.html";
+const std::string kHashPageAHash = kHashPageA + "#asdf";
+const std::string kHashPageB =
+ "files/extensions/api_test/page_action/hash_change/test_page_B.html";
// Looks for an ExtensionHost whose URL has the given path component (including
// leading slash). Also verifies that the expected number of hosts are loaded.
@@ -219,13 +219,13 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageAction) {
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0));
// Navigate to the feed page.
- GURL feed_url = server->TestServerPageW(kFeedPage);
+ GURL feed_url = server->TestServerPage(kFeedPage);
ui_test_utils::NavigateToURL(browser(), feed_url);
// We should now have one page action ready to go in the LocationBar.
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1));
// Navigate to a page with no feed.
- GURL no_feed = server->TestServerPageW(kNoFeedPage);
+ GURL no_feed = server->TestServerPage(kNoFeedPage);
ui_test_utils::NavigateToURL(browser(), no_feed);
// Make sure the page action goes away.
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0));
@@ -241,17 +241,17 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageActionInPageNavigation) {
ASSERT_TRUE(LoadExtension(extension_path));
// Page action should become visible when we navigate here.
- GURL feed_url = server->TestServerPageW(kHashPageA);
+ GURL feed_url = server->TestServerPage(kHashPageA);
ui_test_utils::NavigateToURL(browser(), feed_url);
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1));
// In-page navigation, page action should remain.
- feed_url = server->TestServerPageW(kHashPageAHash);
+ feed_url = server->TestServerPage(kHashPageAHash);
ui_test_utils::NavigateToURL(browser(), feed_url);
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1));
// Not an in-page navigation, page action should go away.
- feed_url = server->TestServerPageW(kHashPageB);
+ feed_url = server->TestServerPage(kHashPageB);
ui_test_utils::NavigateToURL(browser(), feed_url);
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0));
}
@@ -264,7 +264,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, UnloadPageAction) {
ASSERT_TRUE(LoadExtension(extension_path));
// Navigation prompts the location bar to load page actions.
- GURL feed_url = server->TestServerPageW(kFeedPage);
+ GURL feed_url = server->TestServerPage(kFeedPage);
ui_test_utils::NavigateToURL(browser(), feed_url);
ASSERT_TRUE(WaitForPageActionCountChangeTo(1));
@@ -285,7 +285,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, RSSMultiRelLink) {
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(0));
// Navigate to the feed page.
- GURL feed_url = server->TestServerPageW(kFeedPageMultiRel);
+ GURL feed_url = server->TestServerPage(kFeedPageMultiRel);
ui_test_utils::NavigateToURL(browser(), feed_url);
// We should now have one page action ready to go in the LocationBar.
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1));
@@ -325,7 +325,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationPageAction) {
ASSERT_TRUE(LoadExtension(extension_path));
// Any navigation prompts the location bar to load the page action.
- GURL url = server->TestServerPageW(kLocalization);
+ GURL url = server->TestServerPage(kLocalization);
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1));
@@ -341,9 +341,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationPageAction) {
extension->page_action()->GetTitle(tab_id).c_str());
}
-GURL GetFeedUrl(HTTPTestServer* server, const std::wstring& feed_page,
+GURL GetFeedUrl(HTTPTestServer* server, const std::string& feed_page,
bool direct_url, std::string extension_id) {
- GURL feed_url = server->TestServerPageW(feed_page);
+ GURL feed_url = server->TestServerPage(feed_page);
if (direct_url) {
// We navigate directly to the subscribe page for feeds where the feed
// sniffing won't work, in other words, as is the case for malformed feeds.
@@ -405,7 +405,7 @@ bool ValidatePageElement(TabContents* tab,
// |sniff_xml_type| is generally set to true if the feed is sniffable and false
// for invalid feeds.
void NavigateToFeedAndValidate(HTTPTestServer* server,
- const std::wstring& url,
+ const std::string& url,
Browser* browser,
bool sniff_xml_type,
const std::string& expected_feed_title,
@@ -558,7 +558,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedInvalidFeed3) {
test_data_dir_.AppendASCII("subscribe_page_action")));
// Try a feed that doesn't exist.
- NavigateToFeedAndValidate(server, L"foo.xml", browser(), false,
+ NavigateToFeedAndValidate(server, "foo.xml", browser(), false,
"Feed for Unknown feed name",
"element 'anchor_0' not found",
"element 'desc_0' not found",
diff --git a/chrome/browser/find_bar_host_browsertest.cc b/chrome/browser/find_bar_host_browsertest.cc
index d11794e..bdcf4ce 100644
--- a/chrome/browser/find_bar_host_browsertest.cc
+++ b/chrome/browser/find_bar_host_browsertest.cc
@@ -26,20 +26,20 @@
#include "chrome/browser/cocoa/find_bar_bridge.h"
#endif
-const std::wstring kSimplePage = L"404_is_enough_for_us.html";
-const std::wstring kFramePage = L"files/find_in_page/frames.html";
-const std::wstring kFrameData = L"files/find_in_page/framedata_general.html";
-const std::wstring kUserSelectPage = L"files/find_in_page/user-select.html";
-const std::wstring kCrashPage = L"files/find_in_page/crash_1341577.html";
-const std::wstring kTooFewMatchesPage = L"files/find_in_page/bug_1155639.html";
-const std::wstring kEndState = L"files/find_in_page/end_state.html";
-const std::wstring kPrematureEnd = L"files/find_in_page/premature_end.html";
-const std::wstring kMoveIfOver = L"files/find_in_page/move_if_obscuring.html";
-const std::wstring kBitstackCrash = L"files/find_in_page/crash_14491.html";
-const std::wstring kSelectChangesOrdinal =
- L"files/find_in_page/select_changes_ordinal.html";
-const std::wstring kSimple = L"files/find_in_page/simple.html";
-const std::wstring kLinkPage = L"files/find_in_page/link.html";
+const std::string kSimplePage = "404_is_enough_for_us.html";
+const std::string kFramePage = "files/find_in_page/frames.html";
+const std::string kFrameData = "files/find_in_page/framedata_general.html";
+const std::string kUserSelectPage = "files/find_in_page/user-select.html";
+const std::string kCrashPage = "files/find_in_page/crash_1341577.html";
+const std::string kTooFewMatchesPage = "files/find_in_page/bug_1155639.html";
+const std::string kEndState = "files/find_in_page/end_state.html";
+const std::string kPrematureEnd = "files/find_in_page/premature_end.html";
+const std::string kMoveIfOver = "files/find_in_page/move_if_obscuring.html";
+const std::string kBitstackCrash = "files/find_in_page/crash_14491.html";
+const std::string kSelectChangesOrdinal =
+ "files/find_in_page/select_changes_ordinal.html";
+const std::string kSimple = "files/find_in_page/simple.html";
+const std::string kLinkPage = "files/find_in_page/link.html";
const bool kBack = false;
const bool kFwd = true;
@@ -117,7 +117,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageFrames) {
ASSERT_TRUE(server);
// First we navigate to our frames page.
- GURL url = server->TestServerPageW(kFramePage);
+ GURL url = server->TestServerPage(kFramePage);
ui_test_utils::NavigateToURL(browser(), url);
// Try incremental search (mimicking user typing in).
@@ -210,7 +210,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
ASSERT_TRUE(server);
// First we navigate to our special focus tracking page.
- GURL url = server->TestServerPageW(kEndState);
+ GURL url = server->TestServerPage(kEndState);
ui_test_utils::NavigateToURL(browser(), url);
TabContents* tab_contents = browser()->GetSelectedTabContents();
@@ -258,7 +258,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageOrdinal) {
ASSERT_TRUE(server);
// First we navigate to our page.
- GURL url = server->TestServerPageW(kFrameData);
+ GURL url = server->TestServerPage(kFrameData);
ui_test_utils::NavigateToURL(browser(), url);
// Search for 'o', which should make the first item active and return
@@ -298,7 +298,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
ASSERT_TRUE(server);
// First we navigate to our test content.
- GURL url = server->TestServerPageW(kSelectChangesOrdinal);
+ GURL url = server->TestServerPage(kSelectChangesOrdinal);
ui_test_utils::NavigateToURL(browser(), url);
TabContents* tab_contents = browser()->GetSelectedTabContents();
@@ -338,7 +338,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageMultiFramesOrdinal) {
ASSERT_TRUE(server);
// First we navigate to our page.
- GURL url = server->TestServerPageW(kFramePage);
+ GURL url = server->TestServerPage(kFramePage);
ui_test_utils::NavigateToURL(browser(), url);
// Search for 'a', which should make the first item active and return
@@ -390,7 +390,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPage_Issue5132) {
ASSERT_TRUE(server);
// First we navigate to our page.
- GURL url = server->TestServerPageW(kFramePage);
+ GURL url = server->TestServerPage(kFramePage);
ui_test_utils::NavigateToURL(browser(), url);
// Search for 'goa' three times (6 matches on page).
@@ -421,7 +421,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindUnSelectableText) {
ASSERT_TRUE(server);
// First we navigate to our page.
- GURL url = server->TestServerPageW(kUserSelectPage);
+ GURL url = server->TestServerPage(kUserSelectPage);
ui_test_utils::NavigateToURL(browser(), url);
int ordinal = 0;
@@ -440,7 +440,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindCrash_Issue1341577) {
ASSERT_TRUE(server);
// First we navigate to our page.
- GURL url = server->TestServerPageW(kCrashPage);
+ GURL url = server->TestServerPage(kCrashPage);
ui_test_utils::NavigateToURL(browser(), url);
// This would crash the tab. These must be the first two find requests issued
@@ -473,7 +473,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindCrash_Issue14491) {
ASSERT_TRUE(server);
// First we navigate to our page.
- GURL url = server->TestServerPageW(kBitstackCrash);
+ GURL url = server->TestServerPage(kBitstackCrash);
ui_test_utils::NavigateToURL(browser(), url);
// This used to crash the tab.
@@ -496,7 +496,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindRestarts_Issue1155639) {
ASSERT_TRUE(server);
// First we navigate to our page.
- GURL url = server->TestServerPageW(kTooFewMatchesPage);
+ GURL url = server->TestServerPage(kTooFewMatchesPage);
ui_test_utils::NavigateToURL(browser(), url);
// This string appears 5 times at the bottom of a long page. If Find restarts
@@ -516,7 +516,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
ASSERT_TRUE(server);
// First we navigate to our special focus tracking page.
- GURL url = server->TestServerPageW(kPrematureEnd);
+ GURL url = server->TestServerPage(kPrematureEnd);
ui_test_utils::NavigateToURL(browser(), url);
TabContents* tab_contents = browser()->GetSelectedTabContents();
@@ -534,8 +534,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
ASSERT_TRUE(server);
// First we navigate to our special focus tracking page.
- GURL url = server->TestServerPageW(kSimplePage);
- GURL url2 = server->TestServerPageW(kFramePage);
+ GURL url = server->TestServerPage(kSimplePage);
+ GURL url2 = server->TestServerPage(kFramePage);
ui_test_utils::NavigateToURL(browser(), url);
browser()->ShowFindBar();
@@ -569,7 +569,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
ASSERT_TRUE(server);
// First we navigate to our special focus tracking page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
browser()->ShowFindBar();
@@ -619,7 +619,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_FindMovesWhenObscuring) {
HTTPTestServer* server = StartHTTPServer();
ASSERT_TRUE(server);
- GURL url = server->TestServerPageW(kMoveIfOver);
+ GURL url = server->TestServerPage(kMoveIfOver);
ui_test_utils::NavigateToURL(browser(), url);
browser()->ShowFindBar();
@@ -673,7 +673,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
ASSERT_TRUE(server);
// First we navigate to any page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
// Search for 'no_match'. No matches should be found.
@@ -720,7 +720,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
ASSERT_TRUE(server);
// First we navigate to any page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
#if defined(OS_WIN)
@@ -773,7 +773,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, StayActive) {
ASSERT_TRUE(server);
// First we navigate to any page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
browser()->ShowFindBar();
@@ -798,7 +798,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, RestartSearchFromF3) {
ASSERT_TRUE(server);
// First we navigate to a simple page.
- GURL url = server->TestServerPageW(kSimple);
+ GURL url = server->TestServerPage(kSimple);
ui_test_utils::NavigateToURL(browser(), url);
// Search for 'page'. Should have 1 match.
@@ -833,7 +833,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PreferPreviousSearch) {
ASSERT_TRUE(server);
// First we navigate to any page.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
// Find "Default".
@@ -872,7 +872,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PrepopulateSameTab) {
ASSERT_TRUE(server);
// First we navigate to any page.
- GURL url = server->TestServerPageW(kSimple);
+ GURL url = server->TestServerPage(kSimple);
ui_test_utils::NavigateToURL(browser(), url);
// Search for the word "page".
@@ -910,7 +910,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PrepopulateInNewTab) {
ASSERT_TRUE(server);
// First we navigate to any page.
- GURL url = server->TestServerPageW(kSimple);
+ GURL url = server->TestServerPage(kSimple);
ui_test_utils::NavigateToURL(browser(), url);
// Search for the word "page".
@@ -946,7 +946,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PrepopulatePreserveLast) {
ASSERT_TRUE(server);
// First we navigate to any page.
- GURL url = server->TestServerPageW(kSimple);
+ GURL url = server->TestServerPage(kSimple);
ui_test_utils::NavigateToURL(browser(), url);
// Search for the word "page".
@@ -1019,7 +1019,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) {
ASSERT_TRUE(server);
// First we navigate to the "simple" test page.
- GURL url = server->TestServerPageW(kSimple);
+ GURL url = server->TestServerPage(kSimple);
ui_test_utils::NavigateToURL(browser(), url);
// Search for the word "page" in the normal browser tab.
@@ -1077,7 +1077,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, ActivateLinkNavigatesPage) {
ASSERT_TRUE(server);
// First we navigate to our test content.
- GURL url = server->TestServerPageW(kLinkPage);
+ GURL url = server->TestServerPage(kLinkPage);
ui_test_utils::NavigateToURL(browser(), url);
TabContents* tab = browser()->GetSelectedTabContents();
diff --git a/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc b/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc
index 7b0f1f2..8550ee1 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc
@@ -13,7 +13,7 @@
namespace {
const wchar_t kDocRoot[] = L"chrome/test/data";
-const wchar_t kSimplePage[] = L"404_is_enough_for_us.html";
+const char kSimplePage[] = "404_is_enough_for_us.html";
void OnClicked(GtkWidget* widget, bool* clicked_bit) {
*clicked_bit = true;
@@ -36,7 +36,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkBarGtkBrowserTest, FindBarTest) {
browser()->Find();
// Create new tab with an arbitrary URL.
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, -1,
Browser::ADD_SELECTED, NULL, std::string());
diff --git a/chrome/browser/history/redirect_uitest.cc b/chrome/browser/history/redirect_uitest.cc
index c2df04f..a94000e 100644
--- a/chrome/browser/history/redirect_uitest.cc
+++ b/chrome/browser/history/redirect_uitest.cc
@@ -28,9 +28,9 @@ TEST_F(RedirectTest, Server) {
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL final_url = server->TestServerPageW(std::wstring());
- GURL first_url = server->TestServerPageW(
- std::wstring(L"server-redirect?") + UTF8ToWide(final_url.spec()));
+ GURL final_url = server->TestServerPage(std::string());
+ GURL first_url = server->TestServerPage(
+ "server-redirect?" + final_url.spec());
NavigateToURL(first_url);
@@ -50,9 +50,9 @@ TEST_F(RedirectTest, Client) {
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL final_url = server->TestServerPageW(std::wstring());
- GURL first_url = server->TestServerPageW(
- std::wstring(L"client-redirect?") + UTF8ToWide(final_url.spec()));
+ GURL final_url = server->TestServerPage(std::string());
+ GURL first_url = server->TestServerPage(
+ "client-redirect?" + final_url.spec());
// The client redirect appears as two page visits in the browser.
NavigateToURLBlockUntilNavigationsComplete(first_url, 2);
@@ -84,7 +84,7 @@ TEST_F(RedirectTest, ClientEmptyReferer) {
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL final_url = server->TestServerPageW(std::wstring());
+ GURL final_url = server->TestServerPage(std::string());
FilePath test_file(test_data_directory_);
test_file = test_file.AppendASCII("file_client_redirect.html");
GURL first_url = net::FilePathToFileURL(test_file);
@@ -145,13 +145,13 @@ TEST_F(RedirectTest, DISABLED_ClientServerServer) {
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL final_url = server->TestServerPageW(std::wstring());
- GURL next_to_last = server->TestServerPageW(
- std::wstring(L"server-redirect?") + UTF8ToWide(final_url.spec()));
- GURL second_url = server->TestServerPageW(
- std::wstring(L"server-redirect?") + UTF8ToWide(next_to_last.spec()));
- GURL first_url = server->TestServerPageW(
- std::wstring(L"client-redirect?") + UTF8ToWide(second_url.spec()));
+ GURL final_url = server->TestServerPage(std::string());
+ GURL next_to_last = server->TestServerPage(
+ "server-redirect?" + final_url.spec());
+ GURL second_url = server->TestServerPage(
+ "server-redirect?" + next_to_last.spec());
+ GURL first_url = server->TestServerPage(
+ "client-redirect?" + second_url.spec());
std::vector<GURL> redirects;
// We need the sleep for the client redirects, because it appears as two
@@ -181,10 +181,9 @@ TEST_F(RedirectTest, ServerReference) {
const std::string ref("reference");
- GURL final_url = server->TestServerPageW(std::wstring());
- GURL initial_url = server->TestServerPageW(
- std::wstring(L"server-redirect?") + UTF8ToWide(final_url.spec()) +
- L"#" + UTF8ToWide(ref));
+ GURL final_url = server->TestServerPage(std::string());
+ GURL initial_url = server->TestServerPage(
+ "server-redirect?" + final_url.spec() + "#" + ref);
NavigateToURL(initial_url);
@@ -203,8 +202,8 @@ TEST_F(RedirectTest, NoHttpToFile) {
test_file = test_file.AppendASCII("http_to_file.html");
GURL file_url = net::FilePathToFileURL(test_file);
- GURL initial_url = server->TestServerPageW(
- std::wstring(L"client-redirect?") + UTF8ToWide(file_url.spec()));
+ GURL initial_url = server->TestServerPage(
+ "client-redirect?" + file_url.spec());
NavigateToURL(initial_url);
// UITest will check for crashes. We make sure the title doesn't match the
@@ -256,10 +255,10 @@ TEST_F(RedirectTest,
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL final_url = server->TestServerPageW(std::wstring(L"files/title2.html"));
- GURL slow = server->TestServerPageW(std::wstring(L"slow?60"));
- GURL first_url = server->TestServerPageW(
- std::wstring(L"client-redirect?") + UTF8ToWide(slow.spec()));
+ GURL final_url = server->TestServerPage("files/title2.html");
+ GURL slow = server->TestServerPage("slow?60");
+ GURL first_url = server->TestServerPage(
+ "client-redirect?" + slow.spec());
std::vector<GURL> redirects;
NavigateToURL(first_url);
diff --git a/chrome/browser/login_prompt_uitest.cc b/chrome/browser/login_prompt_uitest.cc
index c260181..24cf8f3 100644
--- a/chrome/browser/login_prompt_uitest.cc
+++ b/chrome/browser/login_prompt_uitest.cc
@@ -56,7 +56,7 @@ TEST_F(LoginPromptTest, TestBasicAuth) {
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic")));
EXPECT_TRUE(tab->NeedsAuth());
EXPECT_FALSE(tab->SetAuth(username_basic_, password_bad_));
@@ -64,7 +64,7 @@ TEST_F(LoginPromptTest, TestBasicAuth) {
EXPECT_TRUE(tab->CancelAuth());
EXPECT_EQ(L"Denied: wrong password", GetActiveTabTitle());
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic")));
EXPECT_TRUE(tab->NeedsAuth());
EXPECT_TRUE(tab->SetAuth(username_basic_, password_));
@@ -79,14 +79,14 @@ TEST_F(LoginPromptTest, TestDigestAuth) {
ASSERT_TRUE(NULL != server.get());
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-digest")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-digest")));
EXPECT_TRUE(tab->NeedsAuth());
EXPECT_FALSE(tab->SetAuth(username_digest_, password_bad_));
EXPECT_TRUE(tab->CancelAuth());
EXPECT_EQ(L"Denied: wrong password", GetActiveTabTitle());
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-digest")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-digest")));
EXPECT_TRUE(tab->NeedsAuth());
EXPECT_TRUE(tab->SetAuth(username_digest_, password_));
@@ -102,13 +102,13 @@ TEST_F(LoginPromptTest, TestTwoAuths) {
scoped_refptr<TabProxy> basic_tab(GetActiveTab());
ASSERT_TRUE(basic_tab.get());
- ASSERT_TRUE(basic_tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(basic_tab->NavigateToURL(server->TestServerPage("auth-basic")));
AppendTab(GURL(chrome::kAboutBlankURL));
scoped_refptr<TabProxy> digest_tab(GetActiveTab());
ASSERT_TRUE(digest_tab.get());
ASSERT_TRUE(
- digest_tab->NavigateToURL(server->TestServerPageW(L"auth-digest")));
+ digest_tab->NavigateToURL(server->TestServerPage("auth-digest")));
// TODO(devint): http://b/1158262 basic_tab is not active, so this logs in to
// a page whose tab isn't active, which isn't actually possible for the user
@@ -136,30 +136,30 @@ TEST_F(LoginPromptTest, TestCancelAuth) {
ASSERT_TRUE(tab.get());
// First navigate to a test server page so we have something to go back to.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"a")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("a")));
// Navigating while auth is requested is the same as cancelling.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic")));
EXPECT_TRUE(tab->NeedsAuth());
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"b")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("b")));
EXPECT_FALSE(tab->NeedsAuth());
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic")));
EXPECT_TRUE(tab->NeedsAuth());
EXPECT_TRUE(tab->GoBack()); // should bring us back to 'a'
EXPECT_FALSE(tab->NeedsAuth());
// Now add a page and go back, so we have something to go forward to.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"c")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("c")));
EXPECT_TRUE(tab->GoBack()); // should bring us back to 'a'
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic")));
EXPECT_TRUE(tab->NeedsAuth());
EXPECT_TRUE(tab->GoForward()); // should bring us to 'c'
EXPECT_FALSE(tab->NeedsAuth());
// Now test that cancelling works as expected.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic")));
EXPECT_TRUE(tab->NeedsAuth());
EXPECT_TRUE(tab->CancelAuth());
EXPECT_FALSE(tab->NeedsAuth());
@@ -176,14 +176,14 @@ TEST_F(LoginPromptTest, SupplyRedundantAuths) {
scoped_refptr<TabProxy> basic_tab1(GetActiveTab());
ASSERT_TRUE(basic_tab1.get());
ASSERT_TRUE(
- basic_tab1->NavigateToURL(server->TestServerPageW(L"auth-basic/1")));
+ basic_tab1->NavigateToURL(server->TestServerPage("auth-basic/1")));
EXPECT_TRUE(basic_tab1->NeedsAuth());
AppendTab(GURL(chrome::kAboutBlankURL));
scoped_refptr<TabProxy> basic_tab2(GetActiveTab());
ASSERT_TRUE(basic_tab2.get());
ASSERT_TRUE(
- basic_tab2->NavigateToURL(server->TestServerPageW(L"auth-basic/2")));
+ basic_tab2->NavigateToURL(server->TestServerPage("auth-basic/2")));
EXPECT_TRUE(basic_tab2->NeedsAuth());
// Set the auth in only one of the tabs (but wait for the other to load).
@@ -211,14 +211,14 @@ TEST_F(LoginPromptTest, CancelRedundantAuths) {
scoped_refptr<TabProxy> basic_tab1(GetActiveTab());
ASSERT_TRUE(basic_tab1.get());
ASSERT_TRUE(
- basic_tab1->NavigateToURL(server->TestServerPageW(L"auth-basic/1")));
+ basic_tab1->NavigateToURL(server->TestServerPage("auth-basic/1")));
EXPECT_TRUE(basic_tab1->NeedsAuth());
AppendTab(GURL(chrome::kAboutBlankURL));
scoped_refptr<TabProxy> basic_tab2(GetActiveTab());
ASSERT_TRUE(basic_tab2.get());
ASSERT_TRUE(
- basic_tab2->NavigateToURL(server->TestServerPageW(L"auth-basic/2")));
+ basic_tab2->NavigateToURL(server->TestServerPage("auth-basic/2")));
EXPECT_TRUE(basic_tab2->NeedsAuth());
// Cancel the auth in only one of the tabs (but wait for the other to load).
diff --git a/chrome/browser/notifications/notifications_interactive_uitest.cc b/chrome/browser/notifications/notifications_interactive_uitest.cc
index 64ad27a..d8e4b27 100644
--- a/chrome/browser/notifications/notifications_interactive_uitest.cc
+++ b/chrome/browser/notifications/notifications_interactive_uitest.cc
@@ -29,8 +29,8 @@ TEST_F(NotificationsPermissionTest, TestUserGestureInfobar) {
scoped_refptr<TabProxy> tab(browser->GetActiveTab());
ASSERT_TRUE(tab.get());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(server->TestServerPageW(
- L"files/notifications/notifications_request_function.html")));
+ tab->NavigateToURL(server->TestServerPage(
+ "files/notifications/notifications_request_function.html")));
WaitUntilTabCount(1);
// Request permission by calling request() while eval'ing an inline script;
@@ -59,8 +59,8 @@ TEST_F(NotificationsPermissionTest, TestNoUserGestureInfobar) {
// Load a page which just does a request; no user gesture should result
// in no infobar.
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(server->TestServerPageW(
- L"files/notifications/notifications_request_inline.html")));
+ tab->NavigateToURL(server->TestServerPage(
+ "files/notifications/notifications_request_inline.html")));
WaitUntilTabCount(1);
int info_bar_count;
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc
index d205f7b..5cfe387 100644
--- a/chrome/browser/printing/printing_layout_uitest.cc
+++ b/chrome/browser/printing/printing_layout_uitest.cc
@@ -304,19 +304,19 @@ TEST_F(PrintingLayoutTextTest, DISABLED_Complex) {
}
struct TestPool {
- const wchar_t* source;
+ const char* source;
const wchar_t* result;
};
const TestPool kTestPool[] = {
// ImagesB&W
- L"files/printing/test2.html", L"test2",
+ "files/printing/test2.html", L"test2",
// ImagesTransparent
- L"files/printing/test3.html", L"test3",
+ "files/printing/test3.html", L"test3",
// ImageColor
- L"files/printing/test4.html", L"test4",
+ "files/printing/test4.html", L"test4",
// TODO(maruel): http://b/1171450 Transparent overlays are drawn opaque
- // L"files/printing/test5.html", L"test5",
+ // "files/printing/test5.html", L"test5",
};
// TODO(maruel:) http://code.google.com/p/chromium/issues/detail?id=7721
@@ -334,7 +334,7 @@ TEST_F(PrintingLayoutTestHidden, DISABLED_ManyTimes) {
if (i)
CleanupDumpDirectory();
const TestPool& test = kTestPool[i % arraysize(kTestPool)];
- NavigateToURL(server->TestServerPageW(test.source));
+ NavigateToURL(server->TestServerPage(test.source));
base::DelegateSimpleThread close_printdlg_thread1(&dismisser,
"close_printdlg_thread");
EXPECT_EQ(NULL, FindDialogWindow(dismisser.owner_process()));
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
index eedf252..5deea27 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
@@ -88,8 +88,8 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest) {
scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab());
ASSERT_TRUE(tab.get());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(server->TestServerPageW(
- L"files/sync_xmlhttprequest.html")));
+ tab->NavigateToURL(server->TestServerPage(
+ "files/sync_xmlhttprequest.html")));
// Let's check the XMLHttpRequest ran successfully.
bool success = false;
@@ -110,8 +110,8 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_Disallowed) {
scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab());
ASSERT_TRUE(tab.get());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(server->TestServerPageW(
- L"files/sync_xmlhttprequest_disallowed.html")));
+ tab->NavigateToURL(server->TestServerPage(
+ "files/sync_xmlhttprequest_disallowed.html")));
// Let's check the XMLHttpRequest ran successfully.
bool success = false;
@@ -136,8 +136,8 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_DuringUnload) {
ASSERT_TRUE(tab.get());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(server->TestServerPageW(
- L"files/sync_xmlhttprequest_during_unload.html")));
+ tab->NavigateToURL(server->TestServerPage(
+ "files/sync_xmlhttprequest_during_unload.html")));
// Confirm that the page has loaded (since it changes its title during load).
std::wstring tab_title;
@@ -147,7 +147,7 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_DuringUnload) {
// Navigate to a new page, to dispatch unload event and trigger xhr.
// (the bug would make this step hang the renderer).
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(server->TestServerPageW(L"files/title2.html")));
+ tab->NavigateToURL(server->TestServerPage("files/title2.html")));
// Check that the new page got loaded, and that no download was triggered.
EXPECT_TRUE(tab->GetTabTitle(&tab_title));
@@ -172,7 +172,7 @@ TEST_F(ResourceDispatcherTest, CrossSiteOnunloadCookie) {
scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab());
ASSERT_TRUE(tab.get());
- GURL url(server->TestServerPageW(L"files/onunload_cookie.html"));
+ GURL url(server->TestServerPage("files/onunload_cookie.html"));
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(url));
// Confirm that the page has loaded (since it changes its title during load).
@@ -267,7 +267,7 @@ TEST_F(ResourceDispatcherTest, CrossSiteNavigationErrorPage) {
scoped_refptr<TabProxy> tab(browser_proxy->GetActiveTab());
ASSERT_TRUE(tab.get());
- GURL url(server->TestServerPageW(L"files/onunload_cookie.html"));
+ GURL url(server->TestServerPage("files/onunload_cookie.html"));
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(url));
// Confirm that the page has loaded (since it changes its title during load).
@@ -296,7 +296,7 @@ TEST_F(ResourceDispatcherTest, CrossSiteNavigationErrorPage) {
// TabContents was in the NORMAL state, it would ignore the attempt to run
// the onunload handler, and the navigation would fail.
// (Test by redirecting to javascript:window.location='someURL'.)
- GURL test_url(server->TestServerPageW(L"files/title2.html"));
+ GURL test_url(server->TestServerPage("files/title2.html"));
std::string redirect_url = "javascript:window.location='" +
test_url.possibly_invalid_spec() + "'";
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
diff --git a/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc b/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
index fb6e16c..8ad6d06 100644
--- a/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
+++ b/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
@@ -38,8 +38,8 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
HTTPSTestServer::CreateGoodServer(kDocRoot);
// Load a page with links that open in a new window.
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/click-noreferrer-links.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/click-noreferrer-links.html"));
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
@@ -81,8 +81,8 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
HTTPSTestServer::CreateGoodServer(kDocRoot);
// Load a page with links that open in a new window.
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/click-noreferrer-links.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/click-noreferrer-links.html"));
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
@@ -124,8 +124,8 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
HTTPSTestServer::CreateGoodServer(kDocRoot);
// Load a page with links that open in a new window.
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/click-noreferrer-links.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/click-noreferrer-links.html"));
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
diff --git a/chrome/browser/repost_form_warning_uitest.cc b/chrome/browser/repost_form_warning_uitest.cc
index b17e588..4f61292 100644
--- a/chrome/browser/repost_form_warning_uitest.cc
+++ b/chrome/browser/repost_form_warning_uitest.cc
@@ -32,7 +32,7 @@ TEST_F(RepostFormWarningTest, TestDoubleReload) {
ASSERT_TRUE(tab.get());
// Load a form.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"files/form.html")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("files/form.html")));
// Submit it.
ASSERT_TRUE(tab->NavigateToURL(GURL(
"javascript:document.getElementById('form').submit()")));
@@ -42,7 +42,7 @@ TEST_F(RepostFormWarningTest, TestDoubleReload) {
tab->ReloadAsync();
// Navigate away from the page (this is when the test usually crashes).
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"bar")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("bar")));
}
TEST_F(RepostFormWarningTest, TestLoginAfterRepost) {
@@ -56,7 +56,7 @@ TEST_F(RepostFormWarningTest, TestLoginAfterRepost) {
ASSERT_TRUE(tab.get());
// Load a form.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"files/form.html")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("files/form.html")));
// Submit it.
ASSERT_TRUE(tab->NavigateToURL(GURL(
"javascript:document.getElementById('form').submit()")));
@@ -66,11 +66,11 @@ TEST_F(RepostFormWarningTest, TestLoginAfterRepost) {
// Navigate to a page that requires authentication, bringing up another
// tab-modal sheet.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"auth-basic")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic")));
// Try to reload it again.
tab->ReloadAsync();
// Navigate away from the page.
- ASSERT_TRUE(tab->NavigateToURL(server->TestServerPageW(L"bar")));
+ ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("bar")));
}
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc
index 94d2a06..1071306 100644
--- a/chrome/browser/sessions/session_restore_uitest.cc
+++ b/chrome/browser/sessions/session_restore_uitest.cc
@@ -145,7 +145,7 @@ TEST_F(SessionRestoreUITest, RestoresCrossSiteForwardAndBackwardNavs) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL cross_site_url(server->TestServerPageW(L"files/title2.html"));
+ GURL cross_site_url(server->TestServerPage("files/title2.html"));
// Visit URLs on different sites.
NavigateToURL(url1_);
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index d158ac2..8311e91 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -123,7 +123,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTP) {
ASSERT_TRUE(server.get() != NULL);
ui_test_utils::NavigateToURL(browser(),
- server->TestServerPageW(L"files/ssl/google.html"));
+ server->TestServerPage("files/ssl/google.html"));
CheckUnauthenticatedState(browser()->GetSelectedTabContents());
}
@@ -138,8 +138,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPWithBrokenHTTPSResource) {
scoped_refptr<HTTPSTestServer> bad_https_server = BadCertServer();
ASSERT_TRUE(bad_https_server.get() != NULL);
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/page_with_unsafe_contents.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/page_with_unsafe_contents.html"));
CheckUnauthenticatedState(browser()->GetSelectedTabContents());
}
@@ -150,7 +150,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestOKHTTPS) {
ASSERT_TRUE(https_server.get() != NULL);
ui_test_utils::NavigateToURL(browser(),
- https_server->TestServerPageW(L"files/ssl/google.html"));
+ https_server->TestServerPage("files/ssl/google.html"));
CheckAuthenticatedState(browser()->GetSelectedTabContents(),
false, false); // No mixed/unsafe content.
@@ -162,7 +162,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSExpiredCertAndProceed) {
ASSERT_TRUE(bad_https_server.get() != NULL);
ui_test_utils::NavigateToURL(browser(),
- bad_https_server->TestServerPageW(L"files/ssl/google.html"));
+ bad_https_server->TestServerPage("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
@@ -186,15 +186,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndDontProceed) {
ASSERT_TRUE(bad_https_server.get() != NULL);
// First navigate to an OK page.
- ui_test_utils::NavigateToURL(browser(), good_https_server->TestServerPageW(
- L"files/ssl/google.html"));
+ ui_test_utils::NavigateToURL(browser(), good_https_server->TestServerPage(
+ "files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
NavigationEntry* entry = tab->controller().GetActiveEntry();
ASSERT_TRUE(entry);
GURL cross_site_url =
- bad_https_server->TestServerPageW(L"files/ssl/google.html");
+ bad_https_server->TestServerPage("files/ssl/google.html");
// Change the host name from 127.0.0.1 to localhost so it triggers a
// cross-site navigation so we can test http://crbug.com/5800 is gone.
ASSERT_EQ("127.0.0.1", cross_site_url.host());
@@ -220,7 +220,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndDontProceed) {
// Try to navigate to a new page. (to make sure bug 5800 is fixed).
ui_test_utils::NavigateToURL(browser(),
- http_server->TestServerPageW(L"files/ssl/google.html"));
+ http_server->TestServerPage("files/ssl/google.html"));
CheckUnauthenticatedState(tab);
}
@@ -232,15 +232,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSExpiredCertAndGoBackViaButton) {
ASSERT_TRUE(bad_https_server.get() != NULL);
// First navigate to an HTTP page.
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/google.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
NavigationEntry* entry = tab->controller().GetActiveEntry();
ASSERT_TRUE(entry);
// Now go to a bad HTTPS page that shows an interstitial.
ui_test_utils::NavigateToURL(browser(),
- bad_https_server->TestServerPageW(L"files/ssl/google.html"));
+ bad_https_server->TestServerPage("files/ssl/google.html"));
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
true); // Interstitial showing
@@ -261,15 +261,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoBackViaMenu) {
ASSERT_TRUE(bad_https_server.get() != NULL);
// First navigate to an HTTP page.
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/google.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
NavigationEntry* entry = tab->controller().GetActiveEntry();
ASSERT_TRUE(entry);
// Now go to a bad HTTPS page that shows an interstitial.
ui_test_utils::NavigateToURL(browser(),
- bad_https_server->TestServerPageW(L"files/ssl/google.html"));
+ bad_https_server->TestServerPage("files/ssl/google.html"));
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
true); // Interstitial showing
@@ -290,13 +290,13 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
ASSERT_TRUE(bad_https_server.get() != NULL);
// First navigate to two HTTP pages.
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/google.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
NavigationEntry* entry1 = tab->controller().GetActiveEntry();
ASSERT_TRUE(entry1);
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/blank_page.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/blank_page.html"));
NavigationEntry* entry2 = tab->controller().GetActiveEntry();
ASSERT_TRUE(entry2);
@@ -309,7 +309,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
// Now go to a bad HTTPS page that shows an interstitial.
ui_test_utils::NavigateToURL(browser(),
- bad_https_server->TestServerPageW(L"files/ssl/google.html"));
+ bad_https_server->TestServerPage("files/ssl/google.html"));
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
true); // Interstitial showing
@@ -337,8 +337,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorWithNoNavEntry) {
// Load a page with a link that opens a new window (therefore with no history
// and no navigation entries).
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/page_with_blank_target.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/page_with_blank_target.html"));
bool success = false;
@@ -381,8 +381,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestMixedContents) {
// Load a page with mixed-content, the default behavior is to show the mixed
// content.
- ui_test_utils::NavigateToURL(browser(), https_server->TestServerPageW(
- L"files/ssl/page_with_mixed_contents.html"));
+ ui_test_utils::NavigateToURL(browser(), https_server->TestServerPage(
+ "files/ssl/page_with_mixed_contents.html"));
CheckAuthenticatedState(browser()->GetSelectedTabContents(),
true /* mixed-content */, false);
@@ -397,8 +397,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestMixedContentsRandomizeHash) {
scoped_refptr<HTTPTestServer> http_server = PlainServer();
ASSERT_TRUE(http_server.get() != NULL);
- ui_test_utils::NavigateToURL(browser(), https_server->TestServerPageW(
- L"files/ssl/page_with_http_script.html"));
+ ui_test_utils::NavigateToURL(browser(), https_server->TestServerPage(
+ "files/ssl/page_with_http_script.html"));
CheckAuthenticatedState(browser()->GetSelectedTabContents(),
true /* mixed-content */, false);
@@ -414,8 +414,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestUnsafeContents) {
scoped_refptr<HTTPSTestServer> bad_https_server = BadCertServer();
ASSERT_TRUE(bad_https_server.get() != NULL);
- ui_test_utils::NavigateToURL(browser(), good_https_server->TestServerPageW(
- L"files/ssl/page_with_unsafe_contents.html"));
+ ui_test_utils::NavigateToURL(browser(), good_https_server->TestServerPage(
+ "files/ssl/page_with_unsafe_contents.html"));
TabContents* tab = browser()->GetSelectedTabContents();
// When the bad content is filtered, the state is expected to be
@@ -452,8 +452,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestMixedContentsLoadedFromJS) {
scoped_refptr<HTTPTestServer> http_server = PlainServer();
ASSERT_TRUE(http_server.get() != NULL);
- ui_test_utils::NavigateToURL(browser(), https_server->TestServerPageW(
- L"files/ssl/page_with_dynamic_mixed_contents.html"));
+ ui_test_utils::NavigateToURL(browser(), https_server->TestServerPage(
+ "files/ssl/page_with_dynamic_mixed_contents.html"));
TabContents* tab = browser()->GetSelectedTabContents();
CheckAuthenticatedState(tab, false, false);
@@ -479,7 +479,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestMixedContentsTwoTabs) {
ASSERT_TRUE(http_server.get() != NULL);
ui_test_utils::NavigateToURL(browser(),
- https_server->TestServerPageW(L"files/ssl/blank_page.html"));
+ https_server->TestServerPage("files/ssl/blank_page.html"));
TabContents* tab1 = browser()->GetSelectedTabContents();
@@ -488,7 +488,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestMixedContentsTwoTabs) {
// Create a new tab.
GURL url =
- https_server->TestServerPageW(L"files/ssl/page_with_http_script.html");
+ https_server->TestServerPage("files/ssl/page_with_http_script.html");
TabContents* tab2 = browser()->AddTabWithURL(
url, GURL(), PageTransition::TYPED, 0, Browser::ADD_SELECTED,
NULL, std::string());
@@ -511,15 +511,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestCachedMixedContents) {
scoped_refptr<HTTPTestServer> http_server = PlainServer();
ASSERT_TRUE(http_server.get() != NULL);
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/page_with_mixed_contents.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/page_with_mixed_contents.html"));
TabContents* tab = browser()->GetSelectedTabContents();
CheckUnauthenticatedState(tab);
// Load again but over SSL. It should have mixed-contents (even though the
// image comes from the WebCore memory cache).
- ui_test_utils::NavigateToURL(browser(), https_server->TestServerPageW(
- L"files/ssl/page_with_mixed_contents.html"));
+ ui_test_utils::NavigateToURL(browser(), https_server->TestServerPage(
+ "files/ssl/page_with_mixed_contents.html"));
CheckAuthenticatedState(tab, true /* mixed-content */, false);
}
@@ -534,7 +534,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestCNInvalidStickiness) {
// First we hit the server with hostname, this generates an invalid policy
// error.
ui_test_utils::NavigateToURL(browser(),
- https_server->TestServerPageW(L"files/ssl/google.html"));
+ https_server->TestServerPage("files/ssl/google.html"));
// We get an interstitial page as a result.
TabContents* tab = browser()->GetSelectedTabContents();
@@ -549,7 +549,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestCNInvalidStickiness) {
// Now we try again with the right host name this time.
// Let's change the host-name in the url.
- GURL url = https_server->TestServerPageW(L"files/ssl/google.html");
+ GURL url = https_server->TestServerPage("files/ssl/google.html");
std::string::size_type hostname_index = url.spec().find(kLocalHost);
ASSERT_TRUE(hostname_index != std::string::npos); // Test sanity check.
std::string new_url;
@@ -564,7 +564,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestCNInvalidStickiness) {
// Now try again the broken one to make sure it is still broken.
ui_test_utils::NavigateToURL(browser(),
- https_server->TestServerPageW(L"files/ssl/google.html"));
+ https_server->TestServerPage("files/ssl/google.html"));
// Since we OKed the interstitial last time, we get right to the page.
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_COMMON_NAME_INVALID,
@@ -577,7 +577,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRefNavigation) {
ASSERT_TRUE(bad_https_server.get() != NULL);
ui_test_utils::NavigateToURL(browser(),
- bad_https_server->TestServerPageW(L"files/ssl/page_with_refs.html"));
+ bad_https_server->TestServerPage("files/ssl/page_with_refs.html"));
TabContents* tab = browser()->GetSelectedTabContents();
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
@@ -591,7 +591,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRefNavigation) {
// Now navigate to a ref in the page, the security state should not have
// changed.
ui_test_utils::NavigateToURL(browser(),
- bad_https_server->TestServerPageW(L"files/ssl/page_with_refs.html#jp"));
+ bad_https_server->TestServerPage("files/ssl/page_with_refs.html#jp"));
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
false); // No interstitial showing.
@@ -607,8 +607,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestCloseTabWithUnsafePopup) {
scoped_refptr<HTTPSTestServer> bad_https_server = BadCertServer();
ASSERT_TRUE(bad_https_server.get() != NULL);
- ui_test_utils::NavigateToURL(browser(), http_server->TestServerPageW(
- L"files/ssl/page_with_unsafe_popup.html"));
+ ui_test_utils::NavigateToURL(browser(), http_server->TestServerPage(
+ "files/ssl/page_with_unsafe_popup.html"));
TabContents* tab1 = browser()->GetSelectedTabContents();
// It is probably overkill to add a notification for a popup-opening, let's
@@ -624,7 +624,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestCloseTabWithUnsafePopup) {
// Let's add another tab to make sure the browser does not exit when we close
// the first tab.
- GURL url = http_server->TestServerPageW(L"files/ssl/google.html");
+ GURL url = http_server->TestServerPage("files/ssl/google.html");
TabContents* tab2 = browser()->AddTabWithURL(
url, GURL(), PageTransition::TYPED, 0, Browser::ADD_SELECTED, NULL,
std::string());
@@ -642,8 +642,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestRedirectBadToGoodHTTPS) {
scoped_refptr<HTTPSTestServer> bad_https_server = BadCertServer();
ASSERT_TRUE(bad_https_server.get() != NULL);
- GURL url1 = bad_https_server->TestServerPageW(L"server-redirect?");
- GURL url2 = good_https_server->TestServerPageW(L"files/ssl/google.html");
+ GURL url1 = bad_https_server->TestServerPage("server-redirect?");
+ GURL url2 = good_https_server->TestServerPage("files/ssl/google.html");
ui_test_utils::NavigateToURL(browser(), GURL(url1.spec() + url2.spec()));
@@ -666,8 +666,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestRedirectGoodToBadHTTPS) {
scoped_refptr<HTTPSTestServer> bad_https_server = BadCertServer();
ASSERT_TRUE(bad_https_server.get() != NULL);
- GURL url1 = good_https_server->TestServerPageW(L"server-redirect?");
- GURL url2 = bad_https_server->TestServerPageW(L"files/ssl/google.html");
+ GURL url1 = good_https_server->TestServerPage("server-redirect?");
+ GURL url2 = bad_https_server->TestServerPage("files/ssl/google.html");
ui_test_utils::NavigateToURL(browser(), GURL(url1.spec() + url2.spec()));
TabContents* tab = browser()->GetSelectedTabContents();
@@ -690,9 +690,9 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRedirectHTTPToGoodHTTPS) {
TabContents* tab = browser()->GetSelectedTabContents();
// HTTP redirects to good HTTPS.
- GURL http_url = http_server->TestServerPageW(L"server-redirect?");
+ GURL http_url = http_server->TestServerPage("server-redirect?");
GURL good_https_url =
- good_https_server->TestServerPageW(L"files/ssl/google.html");
+ good_https_server->TestServerPage("files/ssl/google.html");
ui_test_utils::NavigateToURL(browser(),
GURL(http_url.spec() + good_https_url.spec()));
@@ -708,9 +708,9 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestRedirectHTTPToBadHTTPS) {
TabContents* tab = browser()->GetSelectedTabContents();
- GURL http_url = http_server->TestServerPageW(L"server-redirect?");
+ GURL http_url = http_server->TestServerPage("server-redirect?");
GURL bad_https_url =
- bad_https_server->TestServerPageW(L"files/ssl/google.html");
+ bad_https_server->TestServerPage("files/ssl/google.html");
ui_test_utils::NavigateToURL(browser(),
GURL(http_url.spec() + bad_https_url.spec()));
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
@@ -731,8 +731,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestRedirectHTTPSToHTTP) {
scoped_refptr<HTTPSTestServer> https_server = GoodCertServer();
ASSERT_TRUE(https_server.get() != NULL);
- GURL https_url = https_server->TestServerPageW(L"server-redirect?");
- GURL http_url = http_server->TestServerPageW(L"files/ssl/google.html");
+ GURL https_url = https_server->TestServerPage("server-redirect?");
+ GURL http_url = http_server->TestServerPage("files/ssl/google.html");
ui_test_utils::NavigateToURL(browser(),
GURL(https_url.spec() + http_url.spec()));
@@ -770,7 +770,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
TabContents* tab = browser()->GetSelectedTabContents();
ui_test_utils::NavigateToURL(
browser(),
- good_https_server->TestServerPageW(L"files/ssl/top_frame.html"));
+ good_https_server->TestServerPage("files/ssl/top_frame.html"));
CheckAuthenticatedState(tab, false, false);
@@ -845,7 +845,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestBadFrameNavigation) {
TabContents* tab = browser()->GetSelectedTabContents();
ui_test_utils::NavigateToURL(
browser(),
- bad_https_server->TestServerPageW(L"files/ssl/top_frame.html"));
+ bad_https_server->TestServerPage("files/ssl/top_frame.html"));
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
true); // Interstitial showing
@@ -879,7 +879,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestUnauthenticatedFrameNavigation) {
TabContents* tab = browser()->GetSelectedTabContents();
ui_test_utils::NavigateToURL(
browser(),
- http_server->TestServerPageW(L"files/ssl/top_frame.html"));
+ http_server->TestServerPage("files/ssl/top_frame.html"));
CheckUnauthenticatedState(tab);
// Now navigate inside the frame to a secure HTTPS frame.
diff --git a/chrome/browser/tab_contents/view_source_uitest.cc b/chrome/browser/tab_contents/view_source_uitest.cc
index aec2b25..9a19ac4 100644
--- a/chrome/browser/tab_contents/view_source_uitest.cc
+++ b/chrome/browser/tab_contents/view_source_uitest.cc
@@ -14,8 +14,7 @@ const wchar_t kDocRoot[] = L"chrome/test/data";
class ViewSourceTest : public UITest {
protected:
- ViewSourceTest() : UITest() {
- test_html_ = L"files/viewsource/test.html";
+ ViewSourceTest() : test_html_("files/viewsource/test.html") {
}
bool IsPageMenuCommandEnabled(int command) {
@@ -30,7 +29,7 @@ class ViewSourceTest : public UITest {
}
protected:
- std::wstring test_html_;
+ std::string test_html_;
};
// This test renders a page in view-source and then checks to see if a cookie
@@ -44,7 +43,7 @@ TEST_F(ViewSourceTest, DoesBrowserRenderInViewSource) {
std::string cookie_data = "foo";
// First we navigate to our view-source test page
- GURL url = server->TestServerPageW(test_html_);
+ GURL url = server->TestServerPage(test_html_);
url = GURL("view-source:" + url.spec());
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
@@ -67,7 +66,7 @@ TEST_F(ViewSourceTest, DoesBrowserConsumeViewSourcePrefix) {
ASSERT_TRUE(NULL != server.get());
// First we navigate to google.html
- GURL url = server->TestServerPageW(test_html_);
+ GURL url = server->TestServerPage(test_html_);
NavigateToURL(url);
// Then we navigate to the SAME url but with the view-source: prefix
@@ -86,7 +85,7 @@ TEST_F(ViewSourceTest, ViewSourceInPageMenuEnabledOnANormalPage) {
ASSERT_TRUE(NULL != server.get());
// First we navigate to google.html
- GURL url = server->TestServerPageW(test_html_);
+ GURL url = server->TestServerPage(test_html_);
NavigateToURL(url);
EXPECT_TRUE(IsPageMenuCommandEnabled(IDC_VIEW_SOURCE));
@@ -100,7 +99,7 @@ TEST_F(ViewSourceTest, ViewSourceInPageMenuDisabledWhileViewingSource) {
ASSERT_TRUE(NULL != server.get());
// First we navigate to google.html
- GURL url = server->TestServerPageW(test_html_);
+ GURL url = server->TestServerPage(test_html_);
GURL url_viewsource = GURL("view-source:" + url.spec());
NavigateToURL(url_viewsource);
diff --git a/chrome/browser/tab_restore_uitest.cc b/chrome/browser/tab_restore_uitest.cc
index 4f7011b..d5743a7 100644
--- a/chrome/browser/tab_restore_uitest.cc
+++ b/chrome/browser/tab_restore_uitest.cc
@@ -456,8 +456,8 @@ TEST_F(TabRestoreUITest, RestoreWithExistingSiteInstance) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL http_url1(server->TestServerPageW(L"files/title1.html"));
- GURL http_url2(server->TestServerPageW(L"files/title2.html"));
+ GURL http_url1(server->TestServerPage("files/title1.html"));
+ GURL http_url2(server->TestServerPage("files/title2.html"));
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser_proxy.get());
@@ -503,8 +503,8 @@ TEST_F(TabRestoreUITest, RestoreCrossSiteWithExistingSiteInstance) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL http_url1(server->TestServerPageW(L"files/title1.html"));
- GURL http_url2(server->TestServerPageW(L"files/title2.html"));
+ GURL http_url1(server->TestServerPage("files/title1.html"));
+ GURL http_url2(server->TestServerPage("files/title2.html"));
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser_proxy.get());
diff --git a/chrome/browser/views/find_bar_host_interactive_uitest.cc b/chrome/browser/views/find_bar_host_interactive_uitest.cc
index f38ba01..2933ad39 100644
--- a/chrome/browser/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/views/find_bar_host_interactive_uitest.cc
@@ -23,7 +23,7 @@ namespace {
// The delay waited after sending an OS simulated event.
static const int kActionDelayMs = 500;
static const wchar_t kDocRoot[] = L"chrome/test/data";
-static const wchar_t kSimplePage[] = L"404_is_enough_for_us.html";
+static const char kSimplePage[] = "404_is_enough_for_us.html";
class FindInPageTest : public InProcessBrowserTest {
public:
@@ -86,7 +86,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) {
ASSERT_TRUE(NULL != server.get());
// First we navigate to our test page (tab A).
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
browser()->Find();
@@ -123,7 +123,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestore) {
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- GURL url = server->TestServerPageW(L"title1.html");
+ GURL url = server->TestServerPage("title1.html");
ui_test_utils::NavigateToURL(browser(), url);
// Focus the location bar, open and close the find-in-page, focus should
diff --git a/chrome/browser/views/find_bar_host_uitest.cc b/chrome/browser/views/find_bar_host_uitest.cc
index 9a4ea78..0cae5ab 100644
--- a/chrome/browser/views/find_bar_host_uitest.cc
+++ b/chrome/browser/views/find_bar_host_uitest.cc
@@ -15,7 +15,7 @@ class FindInPageControllerTest : public UITest {
}
};
-const std::wstring kSimplePage = L"404_is_enough_for_us.html";
+const std::string kSimplePage = "404_is_enough_for_us.html";
// The find window should not change its location just because we open and close
// a new tab.
@@ -24,7 +24,7 @@ TEST_F(FindInPageControllerTest, FindMovesOnTabClose_Issue1343052) {
HTTPTestServer::CreateServer(L"chrome/test/data", NULL);
ASSERT_TRUE(NULL != server.get());
- GURL url = server->TestServerPageW(kSimplePage);
+ GURL url = server->TestServerPage(kSimplePage);
scoped_refptr<TabProxy> tabA(GetActiveTab());
ASSERT_TRUE(tabA.get());
ASSERT_TRUE(tabA->NavigateToURL(url));
diff --git a/chrome/test/interactive_ui/infobars_uitest.cc b/chrome/test/interactive_ui/infobars_uitest.cc
index 4670ad6..9968c03 100644
--- a/chrome/test/interactive_ui/infobars_uitest.cc
+++ b/chrome/test/interactive_ui/infobars_uitest.cc
@@ -26,7 +26,7 @@ TEST_F(InfoBarsUITest, TestInfoBarsCloseOnNewTheme) {
scoped_refptr<TabProxy> tab_1(browser->GetActiveTab());
ASSERT_TRUE(tab_1.get());
EXPECT_TRUE(tab_1->NavigateToURL(
- server->TestServerPageW(L"files/simple.html")));
+ server->TestServerPage("files/simple.html")));
scoped_refptr<ExtensionProxy> theme = automation()->InstallExtension(
test_data_directory_.AppendASCII("extensions").AppendASCII("theme.crx"),
true);
@@ -34,7 +34,7 @@ TEST_F(InfoBarsUITest, TestInfoBarsCloseOnNewTheme) {
EXPECT_TRUE(tab_1->WaitForInfoBarCount(1, action_max_timeout_ms()));
EXPECT_TRUE(browser->AppendTab(
- server->TestServerPageW(L"files/simple.html")));
+ server->TestServerPage("files/simple.html")));
WaitUntilTabCount(2);
scoped_refptr<TabProxy> tab_2(browser->GetActiveTab());
ASSERT_TRUE(tab_2.get());
diff --git a/chrome_frame/test/http_server.cc b/chrome_frame/test/http_server.cc
index d8223f2..ae71c0b 100644
--- a/chrome_frame/test/http_server.cc
+++ b/chrome_frame/test/http_server.cc
@@ -1,8 +1,11 @@
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
#include "chrome_frame/test/http_server.h"
+#include "base/string_util.h"
+
const wchar_t kDocRoot[] = L"chrome_frame\\test\\data";
void ChromeFrameHTTPServer::SetUp() {
@@ -62,8 +65,9 @@ bool ChromeFrameHTTPServer::WaitToFinish(int milliseconds) {
return server_->WaitToFinish(milliseconds);
}
+// TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers.
GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) {
- return server_->TestServerPageW(relative_url);
+ return server_->TestServerPage(WideToUTF8(relative_url));
}
std::wstring ChromeFrameHTTPServer::GetDataDir() {
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 439851b..2cddb64 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -122,7 +122,7 @@ class URLRequestTestHTTP : public URLRequestTest {
}
uploadBytes[kMsgSize] = '\0';
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
for (int i = 0; i < kIterations; ++i) {
TestDelegate d;
@@ -484,7 +484,7 @@ TEST_F(URLRequestTestHTTP, CancelTest4) {
TEST_F(URLRequestTestHTTP, CancelTest5) {
ASSERT_TRUE(NULL != server_.get());
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
// populate cache
{
@@ -1085,7 +1085,7 @@ TEST_F(URLRequestTestHTTP, CancelDeferredRedirect) {
TEST_F(URLRequestTestHTTP, VaryHeader) {
ASSERT_TRUE(NULL != server_.get());
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
// populate the cache
{
@@ -1123,7 +1123,7 @@ TEST_F(URLRequestTestHTTP, VaryHeader) {
}
TEST_F(URLRequestTestHTTP, BasicAuth) {
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
ASSERT_TRUE(NULL != server_.get());
// populate the cache
@@ -1174,7 +1174,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) {
// Request a page that will give a 401 containing a Set-Cookie header.
// Verify that when the transaction is restarted, it includes the new cookie.
{
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
TestDelegate d;
d.set_username(L"user");
d.set_password(L"secret");
@@ -1195,7 +1195,7 @@ TEST_F(URLRequestTestHTTP, BasicAuthWithCookies) {
// Same test as above, except this time the restart is initiated earlier
// (without user intervention since identity is embedded in the URL).
{
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
TestDelegate d;
GURL::Replacements replacements;
@@ -1223,7 +1223,7 @@ TEST_F(URLRequestTest, DoNotSendCookies) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
// Set up a cookie.
{
@@ -1272,7 +1272,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestContext> context = new URLRequestTestContext();
+ scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
// Set up a cookie.
{
@@ -1325,7 +1325,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
// Set up a cookie.
{
@@ -1379,7 +1379,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
// Set up a cookie.
{
@@ -1436,7 +1436,7 @@ TEST_F(URLRequestTest, DoNotSendCookies_ViaPolicy_Async) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
// Set up a cookie.
{
@@ -1491,7 +1491,7 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
// Set up a cookie.
{
@@ -1548,7 +1548,7 @@ TEST_F(URLRequestTest, CancelTest_During_CookiePolicy) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
TestCookiePolicy cookie_policy(TestCookiePolicy::ASYNC);
context->set_cookie_policy(&cookie_policy);
@@ -1579,7 +1579,7 @@ TEST_F(URLRequestTest, CancelTest_During_OnGetCookiesBlocked) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
TestCookiePolicy cookie_policy(TestCookiePolicy::NO_GET_COOKIES);
context->set_cookie_policy(&cookie_policy);
@@ -1608,7 +1608,7 @@ TEST_F(URLRequestTest, CancelTest_During_OnSetCookieBlocked) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
TestCookiePolicy cookie_policy(TestCookiePolicy::NO_SET_COOKIE);
context->set_cookie_policy(&cookie_policy);
@@ -1642,7 +1642,7 @@ TEST_F(URLRequestTest, CookiePolicy_ForceSession) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"", NULL);
ASSERT_TRUE(NULL != server.get());
- scoped_refptr<URLRequestTestContext> context = new URLRequestTestContext();
+ scoped_refptr<TestURLRequestContext> context = new TestURLRequestContext();
TestCookiePolicy cookie_policy(TestCookiePolicy::FORCE_SESSION);
context->set_cookie_policy(&cookie_policy);
@@ -2478,7 +2478,7 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptLanguage) {
ASSERT_TRUE(NULL != server_.get());
TestDelegate d;
TestURLRequest req(server_->TestServerPage("echoheader?Accept-Language"), &d);
- req.set_context(new URLRequestTestContext());
+ req.set_context(new TestURLRequestContext());
req.Start();
MessageLoop::current()->Run();
EXPECT_EQ(req.context()->accept_language(), d.data_received());
@@ -2491,7 +2491,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptLanguage) {
TestDelegate d;
TestURLRequest
req(server_->TestServerPage("echoheaderoverride?Accept-Language"), &d);
- req.set_context(new URLRequestTestContext());
+ req.set_context(new TestURLRequestContext());
req.SetExtraRequestHeaders("Accept-Language: ru");
req.Start();
MessageLoop::current()->Run();
@@ -2503,7 +2503,7 @@ TEST_F(URLRequestTestHTTP, DefaultAcceptCharset) {
ASSERT_TRUE(NULL != server_.get());
TestDelegate d;
TestURLRequest req(server_->TestServerPage("echoheader?Accept-Charset"), &d);
- req.set_context(new URLRequestTestContext());
+ req.set_context(new TestURLRequestContext());
req.Start();
MessageLoop::current()->Run();
EXPECT_EQ(req.context()->accept_charset(), d.data_received());
@@ -2516,7 +2516,7 @@ TEST_F(URLRequestTestHTTP, OverrideAcceptCharset) {
TestDelegate d;
TestURLRequest
req(server_->TestServerPage("echoheaderoverride?Accept-Charset"), &d);
- req.set_context(new URLRequestTestContext());
+ req.set_context(new TestURLRequestContext());
req.SetExtraRequestHeaders("Accept-Charset: koi-8r");
req.Start();
MessageLoop::current()->Run();
diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h
index 8b496f8b..4861046 100644
--- a/net/url_request/url_request_unittest.h
+++ b/net/url_request/url_request_unittest.h
@@ -174,9 +174,6 @@ class TestURLRequestContext : public URLRequestContext {
}
};
-// TODO(phajdan.jr): Migrate callers to the new name and remove the typedef.
-typedef TestURLRequestContext URLRequestTestContext;
-
//-----------------------------------------------------------------------------
class TestURLRequest : public URLRequest {
@@ -431,12 +428,6 @@ class BaseTestServer : public base::RefCounted<BaseTestServer> {
"@" + host_name_ + ":" + port_str_ + "/" + path);
}
- // Deprecated in favor of TestServerPage.
- // TODO(phajdan.jr): Remove TestServerPageW.
- GURL TestServerPageW(const std::wstring& path) {
- return TestServerPage(WideToUTF8(path));
- }
-
virtual bool MakeGETRequest(const std::string& page_name) = 0;
FilePath GetDataDirectory() {