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

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

Issue 6354005: Remove action_max_timeout_ms and fix all the callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/test/automation/automation_proxy_uitest.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) 2010 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/test/test_timeouts.h"
5 #include "chrome/app/chrome_command_ids.h" 6 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/common/chrome_switches.h" 7 #include "chrome/common/chrome_switches.h"
7 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
8 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
9 #include "chrome/test/ui/ui_layout_test.h" 10 #include "chrome/test/ui/ui_layout_test.h"
10 #include "chrome/test/ui_test_utils.h" 11 #include "chrome/test/ui_test_utils.h"
11 #include "net/base/escape.h" 12 #include "net/base/escape.h"
12 #include "net/test/test_server.h" 13 #include "net/test/test_server.h"
13 14
14 struct IsSearchProviderTestData; 15 struct IsSearchProviderTestData;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Bundle up information needed to verify the result. 101 // Bundle up information needed to verify the result.
101 return IsSearchProviderTestData(tab, host, test_url); 102 return IsSearchProviderTestData(tab, host, test_url);
102 } 103 }
103 104
104 void SearchProviderTest::FinishIsSearchProviderInstalledTest( 105 void SearchProviderTest::FinishIsSearchProviderInstalledTest(
105 const IsSearchProviderTestData& data) { 106 const IsSearchProviderTestData& data) {
106 ASSERT_TRUE(data.tab.get()); 107 ASSERT_TRUE(data.tab.get());
107 108
108 std::string cookie_name = data.host + "testResult"; 109 std::string cookie_name = data.host + "testResult";
109 std::string escaped_value = 110 std::string escaped_value =
110 WaitUntilCookieNonEmpty(data.tab, data.test_url, 111 WaitUntilCookieNonEmpty(data.tab,
111 cookie_name.c_str(), action_max_timeout_ms()); 112 data.test_url,
113 cookie_name.c_str(),
114 TestTimeouts::action_max_timeout_ms());
112 115
113 // Unescapes and normalizes the actual result. 116 // Unescapes and normalizes the actual result.
114 std::string value = UnescapeURLComponent( 117 std::string value = UnescapeURLComponent(
115 escaped_value, 118 escaped_value,
116 UnescapeRule::NORMAL | UnescapeRule::SPACES | 119 UnescapeRule::NORMAL | UnescapeRule::SPACES |
117 UnescapeRule::URL_SPECIAL_CHARS | UnescapeRule::CONTROL_CHARS); 120 UnescapeRule::URL_SPECIAL_CHARS | UnescapeRule::CONTROL_CHARS);
118 value += "\n"; 121 value += "\n";
119 ReplaceSubstringsAfterOffset(&value, 0, "\r", ""); 122 ReplaceSubstringsAfterOffset(&value, 0, "\r", "");
120 EXPECT_STREQ("1\n", value.c_str()); 123 EXPECT_STREQ("1\n", value.c_str());
121 } 124 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 #if 0 165 #if 0
163 // Remove the calls to FinishIsSearchProviderInstalledTest above when 166 // Remove the calls to FinishIsSearchProviderInstalledTest above when
164 // re-enabling this code. 167 // re-enabling this code.
165 168
166 // Do the verification. 169 // Do the verification.
167 for (size_t i = 0; i < arraysize(test_data); ++i) { 170 for (size_t i = 0; i < arraysize(test_data); ++i) {
168 FinishIsSearchProviderInstalledTest(test_data[i]); 171 FinishIsSearchProviderInstalledTest(test_data[i]);
169 } 172 }
170 #endif 173 #endif
171 } 174 }
OLDNEW
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/test/automation/automation_proxy_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698