OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/base64.h" | 5 #include "base/base64.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 std::string GetTlsChannelIdFromSendMessage(const Extension* extension, | 271 std::string GetTlsChannelIdFromSendMessage(const Extension* extension, |
272 bool include_tls_channel_id, | 272 bool include_tls_channel_id, |
273 const char* message = NULL) { | 273 const char* message = NULL) { |
274 return GetTlsChannelIdFromAssertion("getTlsChannelIdFromSendMessage", | 274 return GetTlsChannelIdFromAssertion("getTlsChannelIdFromSendMessage", |
275 extension, | 275 extension, |
276 include_tls_channel_id, | 276 include_tls_channel_id, |
277 message); | 277 message); |
278 } | 278 } |
279 | 279 |
280 GURL GetURLForPath(const std::string& host, const std::string& path) { | 280 GURL GetURLForPath(const std::string& host, const std::string& path) { |
281 std::string port = base::IntToString(embedded_test_server()->port()); | 281 std::string port = base::UintToString(embedded_test_server()->port()); |
282 GURL::Replacements replacements; | 282 GURL::Replacements replacements; |
283 replacements.SetHostStr(host); | 283 replacements.SetHostStr(host); |
284 replacements.SetPortStr(port); | 284 replacements.SetPortStr(port); |
285 return embedded_test_server()->GetURL(path).ReplaceComponents(replacements); | 285 return embedded_test_server()->GetURL(path).ReplaceComponents(replacements); |
286 } | 286 } |
287 | 287 |
288 GURL chromium_org_url() { | 288 GURL chromium_org_url() { |
289 return GetURLForPath("www.chromium.org", "/chromium.org.html"); | 289 return GetURLForPath("www.chromium.org", "/chromium.org.html"); |
290 } | 290 } |
291 | 291 |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); | 1192 ui_test_utils::NavigateToURL(browser(), chromium_org_url()); |
1193 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, | 1193 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, |
1194 CanConnectAndSendMessagesToMainFrame(invalid.get())); | 1194 CanConnectAndSendMessagesToMainFrame(invalid.get())); |
1195 } | 1195 } |
1196 | 1196 |
1197 #endif // !defined(OS_WIN) - http://crbug.com/350517. | 1197 #endif // !defined(OS_WIN) - http://crbug.com/350517. |
1198 | 1198 |
1199 } // namespace | 1199 } // namespace |
1200 | 1200 |
1201 }; // namespace extensions | 1201 }; // namespace extensions |
OLD | NEW |