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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/google_apis/gdata_operations.h" | 8 #include "chrome/browser/google_apis/gdata_operations.h" |
9 #include "chrome/browser/google_apis/gdata_test_util.h" | 9 #include "chrome/browser/google_apis/gdata_test_util.h" |
10 #include "chrome/browser/google_apis/operation_runner.h" | 10 #include "chrome/browser/google_apis/operation_runner.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 void NotifyStart() { | 30 void NotifyStart() { |
31 NotifyStartToOperationRegistry(); | 31 NotifyStartToOperationRegistry(); |
32 } | 32 } |
33 | 33 |
34 void NotifySuccess() { | 34 void NotifySuccess() { |
35 NotifySuccessToOperationRegistry(); | 35 NotifySuccessToOperationRegistry(); |
36 } | 36 } |
37 | 37 |
38 void NotifyFailure() { | 38 void NotifyFailure() { |
39 NotifyFinish(OperationRegistry::OPERATION_FAILED); | 39 NotifyFinish(OPERATION_FAILED); |
40 } | 40 } |
41 | 41 |
42 protected: | 42 protected: |
43 // GetDataOperation overrides: | 43 // GetDataOperation overrides: |
44 virtual GURL GetURL() const OVERRIDE { | 44 virtual GURL GetURL() const OVERRIDE { |
45 // This method is never called because this test does not fetch json from | 45 // This method is never called because this test does not fetch json from |
46 // network. | 46 // network. |
47 NOTREACHED(); | 47 NOTREACHED(); |
48 return GURL(); | 48 return GURL(); |
49 } | 49 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 getData->ParseResponse(HTTP_SUCCESS, invalid_json_str); | 173 getData->ParseResponse(HTTP_SUCCESS, invalid_json_str); |
174 test_util::RunBlockingPoolTask(); | 174 test_util::RunBlockingPoolTask(); |
175 | 175 |
176 EXPECT_EQ(GDATA_PARSE_ERROR, error); | 176 EXPECT_EQ(GDATA_PARSE_ERROR, error); |
177 ASSERT_TRUE(value.get() == NULL); | 177 ASSERT_TRUE(value.get() == NULL); |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 } // namespace gdata | 181 } // namespace gdata |
OLD | NEW |