OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #if defined(BROWSER_SYNC) | |
6 | |
7 #include "base/thread.h" | 5 #include "base/thread.h" |
8 #include "chrome/browser/chrome_thread.h" | 6 #include "chrome/browser/chrome_thread.h" |
9 #include "chrome/browser/sync/glue/http_bridge.h" | 7 #include "chrome/browser/sync/glue/http_bridge.h" |
10 #include "net/url_request/url_request_unittest.h" | 8 #include "net/url_request/url_request_unittest.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
12 | 10 |
13 using browser_sync::HttpBridge; | 11 using browser_sync::HttpBridge; |
14 | 12 |
15 namespace { | 13 namespace { |
16 // TODO(timsteele): Should use PathService here. See Chromium Issue 3113. | 14 // TODO(timsteele): Should use PathService here. See Chromium Issue 3113. |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 EXPECT_TRUE(success); | 215 EXPECT_TRUE(success); |
218 EXPECT_EQ(200, response_code); | 216 EXPECT_EQ(200, response_code); |
219 EXPECT_EQ(0, os_error); | 217 EXPECT_EQ(0, os_error); |
220 | 218 |
221 std::string response(http_bridge->GetResponseContent(), | 219 std::string response(http_bridge->GetResponseContent(), |
222 http_bridge->GetResponseContentLength()); | 220 http_bridge->GetResponseContentLength()); |
223 | 221 |
224 EXPECT_NE(std::string::npos, response.find("fnord")); | 222 EXPECT_NE(std::string::npos, response.find("fnord")); |
225 EXPECT_NE(std::string::npos, response.find(test_payload.c_str())); | 223 EXPECT_NE(std::string::npos, response.find(test_payload.c_str())); |
226 } | 224 } |
227 | |
228 #endif // defined(BROWSER_SYNC) | |
OLD | NEW |