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

Side by Side Diff: chrome/renderer/external_extension_uitest.cc

Issue 8552002: net: Move UnescapeRule into the net namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/string_util.h" 5 #include "base/string_util.h"
6 #include "base/test/test_timeouts.h" 6 #include "base/test/test_timeouts.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/test/automation/automation_proxy.h" 10 #include "chrome/test/automation/automation_proxy.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 std::string cookie_name = data.host + "testResult"; 113 std::string cookie_name = data.host + "testResult";
114 std::string escaped_value = 114 std::string escaped_value =
115 WaitUntilCookieNonEmpty(data.tab, 115 WaitUntilCookieNonEmpty(data.tab,
116 data.test_url, 116 data.test_url,
117 cookie_name.c_str(), 117 cookie_name.c_str(),
118 TestTimeouts::action_max_timeout_ms()); 118 TestTimeouts::action_max_timeout_ms());
119 119
120 // Unescapes and normalizes the actual result. 120 // Unescapes and normalizes the actual result.
121 std::string value = net::UnescapeURLComponent( 121 std::string value = net::UnescapeURLComponent(
122 escaped_value, 122 escaped_value,
123 UnescapeRule::NORMAL | UnescapeRule::SPACES | 123 net::UnescapeRule::NORMAL | net::UnescapeRule::SPACES |
124 UnescapeRule::URL_SPECIAL_CHARS | UnescapeRule::CONTROL_CHARS); 124 net::UnescapeRule::URL_SPECIAL_CHARS | net::UnescapeRule::CONTROL_CHARS);
125 value += "\n"; 125 value += "\n";
126 ReplaceSubstringsAfterOffset(&value, 0, "\r", ""); 126 ReplaceSubstringsAfterOffset(&value, 0, "\r", "");
127 EXPECT_STREQ("1\n", value.c_str()); 127 EXPECT_STREQ("1\n", value.c_str());
128 EXPECT_TRUE(data.tab->Close(true)); 128 EXPECT_TRUE(data.tab->Close(true));
129 } 129 }
130 130
131 // Flaky on XP debug. http://crbug.com/62777 131 // Flaky on XP debug. http://crbug.com/62777
132 #if defined(OS_WIN) 132 #if defined(OS_WIN)
133 #define MAYBE_TestIsSearchProviderInstalled FLAKY_TestIsSearchProviderInstalled 133 #define MAYBE_TestIsSearchProviderInstalled FLAKY_TestIsSearchProviderInstalled
134 #else 134 #else
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 TEST_F(SearchProviderTest, TestIsSearchProviderInstalledWithException) { 186 TEST_F(SearchProviderTest, TestIsSearchProviderInstalledWithException) {
187 // Change the url for the test page to one that throws an exception when 187 // Change the url for the test page to one that throws an exception when
188 // toString is called on the argument given to isSearchProviderInstalled. 188 // toString is called on the argument given to isSearchProviderInstalled.
189 search_provider_test_url_ = test_server_.GetURL( 189 search_provider_test_url_ = test_server_.GetURL(
190 "files/is_search_provider_installed_with_exception.html"); 190 "files/is_search_provider_installed_with_exception.html");
191 191
192 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 192 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
193 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest( 193 FinishIsSearchProviderInstalledTest(StartIsSearchProviderInstalledTest(
194 browser, "www.google.com", "")); 194 browser, "www.google.com", ""));
195 } 195 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698