| OLD | NEW |
| 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/message_loop_proxy.h" | 5 #include "base/message_loop_proxy.h" |
| 6 #include "base/threading/thread.h" | 6 #include "base/threading/thread.h" |
| 7 #include "chrome/browser/sync/glue/http_bridge.h" | 7 #include "chrome/browser/sync/glue/http_bridge.h" |
| 8 #include "chrome/test/test_url_request_context_getter.h" | 8 #include "chrome/test/base/test_url_request_context_getter.h" |
| 9 #include "content/browser/browser_thread.h" | 9 #include "content/browser/browser_thread.h" |
| 10 #include "content/test/test_url_fetcher_factory.h" | 10 #include "content/test/test_url_fetcher_factory.h" |
| 11 #include "net/test/test_server.h" | 11 #include "net/test/test_server.h" |
| 12 #include "net/url_request/url_request_test_util.h" | 12 #include "net/url_request/url_request_test_util.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 using browser_sync::HttpBridge; | 15 using browser_sync::HttpBridge; |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 // TODO(timsteele): Should use PathService here. See Chromium Issue 3113. | 18 // TODO(timsteele): Should use PathService here. See Chromium Issue 3113. |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 http_bridge->SetPostPayload("text/plain", 2, " "); | 301 http_bridge->SetPostPayload("text/plain", 2, " "); |
| 302 | 302 |
| 303 int os_error = 0; | 303 int os_error = 0; |
| 304 int response_code = 0; | 304 int response_code = 0; |
| 305 | 305 |
| 306 bool success = http_bridge->MakeSynchronousPost(&os_error, &response_code); | 306 bool success = http_bridge->MakeSynchronousPost(&os_error, &response_code); |
| 307 ASSERT_TRUE(success); | 307 ASSERT_TRUE(success); |
| 308 http_bridge->Abort(); | 308 http_bridge->Abort(); |
| 309 // Ensures no double-free of URLFetcher, etc. | 309 // Ensures no double-free of URLFetcher, etc. |
| 310 } | 310 } |
| OLD | NEW |