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 #ifndef COMPONENTS_SYNC_JS_JS_TEST_UTIL_H_ | 5 #ifndef COMPONENTS_SYNC_JS_JS_TEST_UTIL_H_ |
6 #define COMPONENTS_SYNC_JS_JS_TEST_UTIL_H_ | 6 #define COMPONENTS_SYNC_JS_JS_TEST_UTIL_H_ |
7 | 7 |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "components/sync/base/weak_handle.h" | 12 #include "components/sync/base/weak_handle.h" |
13 #include "components/sync/js/js_backend.h" | 13 #include "components/sync/js/js_backend.h" |
14 #include "components/sync/js/js_controller.h" | 14 #include "components/sync/js/js_controller.h" |
15 #include "components/sync/js/js_event_handler.h" | 15 #include "components/sync/js/js_event_handler.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class DictionaryValue; | 19 class DictionaryValue; |
20 class ListValue; | |
21 } | 20 } |
22 | 21 |
23 namespace syncer { | 22 namespace syncer { |
24 | 23 |
25 class JsEventDetails; | 24 class JsEventDetails; |
26 | 25 |
27 // Defined for googletest. Equivalent to "*os << args.ToString()". | 26 // Defined for googletest. Equivalent to "*os << args.ToString()". |
28 void PrintTo(const JsEventDetails& details, ::std::ostream* os); | 27 void PrintTo(const JsEventDetails& details, ::std::ostream* os); |
29 | 28 |
30 // A gmock matcher for JsEventDetails. Use like: | 29 // A gmock matcher for JsEventDetails. Use like: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 67 |
69 WeakHandle<JsEventHandler> AsWeakHandle(); | 68 WeakHandle<JsEventHandler> AsWeakHandle(); |
70 | 69 |
71 MOCK_METHOD2(HandleJsEvent, | 70 MOCK_METHOD2(HandleJsEvent, |
72 void(const ::std::string&, const JsEventDetails&)); | 71 void(const ::std::string&, const JsEventDetails&)); |
73 }; | 72 }; |
74 | 73 |
75 } // namespace syncer | 74 } // namespace syncer |
76 | 75 |
77 #endif // COMPONENTS_SYNC_JS_JS_TEST_UTIL_H_ | 76 #endif // COMPONENTS_SYNC_JS_JS_TEST_UTIL_H_ |
OLD | NEW |