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

Unified Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 10007043: Attempt to fix ChromeFrameTestWithWebServer tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move snapshot fn into ui_test_utils_win.cc Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/test/mock_ie_event_sink_test.cc ('k') | chrome_frame/test/test_with_web_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/net/fake_external_tab.cc
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index aa88758ef1f9061be59908cdd35856a7c11cf063..0655eded274b6a4abf4c6d273eb3960225dd97c2 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -720,32 +720,9 @@ void CFUrlRequestUnittestRunner::OnInitializationTimeout() {
}
void CFUrlRequestUnittestRunner::OverrideHttpHost() {
- net::NetworkInterfaceList nic_list;
- if (!net::GetNetworkList(&nic_list)) {
- LOG(ERROR) << "GetNetworkList failed to look up non-loopback adapters. "
- << "Tests will be run over the loopback adapter, which may "
- << "result in hangs.";
- return;
- }
-
- // GetNetworkList only returns 'Up' non-loopback adapters. Select the first
- // IPV4 address found - we should be able to bind/connect over it.
- for (size_t i = 0; i < nic_list.size(); ++i) {
- if (nic_list[i].address.size() != net::kIPv4AddressSize)
- continue;
- char* address_string =
- inet_ntoa(*reinterpret_cast<in_addr*>(&nic_list[i].address[0]));
- DCHECK(address_string != NULL);
- if (address_string == NULL)
- continue;
- LOG(INFO) << "HTTP tests will run over " << address_string << ".";
- override_http_host_.reset(
- new ScopedCustomUrlRequestTestHttpHost(address_string));
- return;
- }
-
- LOG(ERROR) << "Failed to find a non-loopback IP_V4 address. Tests will be "
- << "run over the loopback adapter, which may result in hangs.";
+ override_http_host_.reset(
+ new ScopedCustomUrlRequestTestHttpHost(
+ chrome_frame_test::GetLocalIPv4Address()));
}
void CFUrlRequestUnittestRunner::PreEarlyInitialization() {
« no previous file with comments | « chrome_frame/test/mock_ie_event_sink_test.cc ('k') | chrome_frame/test/test_with_web_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698