| 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 SYNC_JS_JS_TEST_UTIL_H_ | 5 #ifndef SYNC_JS_JS_TEST_UTIL_H_ |
| 6 #define SYNC_JS_JS_TEST_UTIL_H_ | 6 #define SYNC_JS_JS_TEST_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "sync/internal_api/public/util/weak_handle.h" | 13 #include "sync/internal_api/public/util/weak_handle.h" |
| 14 #include "sync/js/js_backend.h" | 14 #include "sync/js/js_backend.h" |
| 15 #include "sync/js/js_controller.h" | 15 #include "sync/js/js_controller.h" |
| 16 #include "sync/js/js_event_handler.h" | 16 #include "sync/js/js_event_handler.h" |
| 17 #include "sync/js/js_reply_handler.h" | 17 #include "sync/js/js_reply_handler.h" |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 class DictionaryValue; | 21 class DictionaryValue; |
| 22 class ListValue; | 22 class ListValue; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace csync { | 25 namespace syncer { |
| 26 | 26 |
| 27 class JsArgList; | 27 class JsArgList; |
| 28 class JsEventDetails; | 28 class JsEventDetails; |
| 29 | 29 |
| 30 // Defined for googletest. Equivalent to "*os << args.ToString()". | 30 // Defined for googletest. Equivalent to "*os << args.ToString()". |
| 31 void PrintTo(const JsArgList& args, ::std::ostream* os); | 31 void PrintTo(const JsArgList& args, ::std::ostream* os); |
| 32 void PrintTo(const JsEventDetails& details, ::std::ostream* os); | 32 void PrintTo(const JsEventDetails& details, ::std::ostream* os); |
| 33 | 33 |
| 34 // A gmock matcher for JsArgList. Use like: | 34 // A gmock matcher for JsArgList. Use like: |
| 35 // | 35 // |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 public: | 97 public: |
| 98 MockJsReplyHandler(); | 98 MockJsReplyHandler(); |
| 99 virtual ~MockJsReplyHandler(); | 99 virtual ~MockJsReplyHandler(); |
| 100 | 100 |
| 101 WeakHandle<JsReplyHandler> AsWeakHandle(); | 101 WeakHandle<JsReplyHandler> AsWeakHandle(); |
| 102 | 102 |
| 103 MOCK_METHOD2(HandleJsReply, | 103 MOCK_METHOD2(HandleJsReply, |
| 104 void(const ::std::string&, const JsArgList&)); | 104 void(const ::std::string&, const JsArgList&)); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace csync | 107 } // namespace syncer |
| 108 | 108 |
| 109 #endif // SYNC_JS_JS_TEST_UTIL_H_ | 109 #endif // SYNC_JS_JS_TEST_UTIL_H_ |
| OLD | NEW |