Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: sync/js/js_test_util.cc

Issue 231013003: Remove Sync JS generic request/reply framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove js_reply_handler.h from gyp Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/js/js_test_util.h ('k') | sync/js/sync_js_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/js/js_test_util.cc
diff --git a/sync/js/js_test_util.cc b/sync/js/js_test_util.cc
index 7d40289ef932db7086307f8f8d1d105421100bdf..f596136a76c00e0e964382f2743a3fe826fada14 100644
--- a/sync/js/js_test_util.cc
+++ b/sync/js/js_test_util.cc
@@ -6,51 +6,16 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "sync/js/js_arg_list.h"
#include "sync/js/js_event_details.h"
namespace syncer {
-void PrintTo(const JsArgList& args, ::std::ostream* os) {
- *os << args.ToString();
-}
-
void PrintTo(const JsEventDetails& details, ::std::ostream* os) {
*os << details.ToString();
}
namespace {
-// Matcher implementation for HasArgs().
-class HasArgsMatcher
- : public ::testing::MatcherInterface<const JsArgList&> {
- public:
- explicit HasArgsMatcher(const JsArgList& expected_args)
- : expected_args_(expected_args) {}
-
- virtual ~HasArgsMatcher() {}
-
- virtual bool MatchAndExplain(
- const JsArgList& args,
- ::testing::MatchResultListener* listener) const {
- // No need to annotate listener since we already define PrintTo().
- return args.Get().Equals(&expected_args_.Get());
- }
-
- virtual void DescribeTo(::std::ostream* os) const {
- *os << "has args " << expected_args_.ToString();
- }
-
- virtual void DescribeNegationTo(::std::ostream* os) const {
- *os << "doesn't have args " << expected_args_.ToString();
- }
-
- private:
- const JsArgList expected_args_;
-
- DISALLOW_COPY_AND_ASSIGN(HasArgsMatcher);
-};
-
// Matcher implementation for HasDetails().
class HasDetailsMatcher
: public ::testing::MatcherInterface<const JsEventDetails&> {
@@ -83,10 +48,6 @@ class HasDetailsMatcher
} // namespace
-::testing::Matcher<const JsArgList&> HasArgs(const JsArgList& expected_args) {
- return ::testing::MakeMatcher(new HasArgsMatcher(expected_args));
-}
-
::testing::Matcher<const JsEventDetails&> HasDetails(
const JsEventDetails& expected_details) {
return ::testing::MakeMatcher(new HasDetailsMatcher(expected_details));
@@ -119,13 +80,5 @@ WeakHandle<JsEventHandler> MockJsEventHandler::AsWeakHandle() {
MockJsEventHandler::~MockJsEventHandler() {}
-MockJsReplyHandler::MockJsReplyHandler() {}
-
-MockJsReplyHandler::~MockJsReplyHandler() {}
-
-WeakHandle<JsReplyHandler> MockJsReplyHandler::AsWeakHandle() {
- return MakeWeakHandle(AsWeakPtr());
-}
-
} // namespace syncer
« no previous file with comments | « sync/js/js_test_util.h ('k') | sync/js/sync_js_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698