| 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 "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" | 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 double expire_days_from_now; | 210 double expire_days_from_now; |
| 211 ASSERT_TRUE(list_value->GetString(0, &hostname)); | 211 ASSERT_TRUE(list_value->GetString(0, &hostname)); |
| 212 ASSERT_TRUE(list_value->GetString(1, &ip_literal)); | 212 ASSERT_TRUE(list_value->GetString(1, &ip_literal)); |
| 213 ASSERT_TRUE(list_value->GetDouble(2, &net_error)); | 213 ASSERT_TRUE(list_value->GetDouble(2, &net_error)); |
| 214 ASSERT_TRUE(list_value->GetDouble(3, &expire_days_from_now)); | 214 ASSERT_TRUE(list_value->GetDouble(3, &expire_days_from_now)); |
| 215 ASSERT_TRUE(browser()); | 215 ASSERT_TRUE(browser()); |
| 216 | 216 |
| 217 BrowserThread::PostTask( | 217 BrowserThread::PostTask( |
| 218 BrowserThread::IO, FROM_HERE, | 218 BrowserThread::IO, FROM_HERE, |
| 219 base::Bind(&AddCacheEntryOnIOThread, | 219 base::Bind(&AddCacheEntryOnIOThread, |
| 220 make_scoped_refptr(browser()->profile()->GetRequestContext()), | 220 base::RetainedRef(browser()->profile()->GetRequestContext()), |
| 221 hostname, | 221 hostname, ip_literal, static_cast<int>(net_error), |
| 222 ip_literal, | |
| 223 static_cast<int>(net_error), | |
| 224 static_cast<int>(expire_days_from_now))); | 222 static_cast<int>(expire_days_from_now))); |
| 225 } | 223 } |
| 226 | 224 |
| 227 void NetInternalsTest::MessageHandler::LoadPage( | 225 void NetInternalsTest::MessageHandler::LoadPage( |
| 228 const base::ListValue* list_value) { | 226 const base::ListValue* list_value) { |
| 229 std::string url; | 227 std::string url; |
| 230 ASSERT_TRUE(list_value->GetString(0, &url)); | 228 ASSERT_TRUE(list_value->GetString(0, &url)); |
| 231 LOG(WARNING) << "url: [" << url << "]"; | 229 LOG(WARNING) << "url: [" << url << "]"; |
| 232 ui_test_utils::NavigateToURLWithDisposition( | 230 ui_test_utils::NavigateToURLWithDisposition( |
| 233 browser(), | 231 browser(), |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 if (test_server_started_) | 370 if (test_server_started_) |
| 373 return true; | 371 return true; |
| 374 test_server_started_ = embedded_test_server()->Start(); | 372 test_server_started_ = embedded_test_server()->Start(); |
| 375 | 373 |
| 376 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1 | 374 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1 |
| 377 // are forbidden. | 375 // are forbidden. |
| 378 host_resolver()->AddRule("testdomain.com", "127.0.0.1"); | 376 host_resolver()->AddRule("testdomain.com", "127.0.0.1"); |
| 379 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1"); | 377 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1"); |
| 380 return test_server_started_; | 378 return test_server_started_; |
| 381 } | 379 } |
| OLD | NEW |