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

Side by Side Diff: mojo/public/cpp/bindings/tests/report_bad_message_unittest.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "mojo/edk/embedder/embedder.h" 10 #include "mojo/edk/embedder/embedder.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 class ReportBadMessageTest : public testing::Test { 60 class ReportBadMessageTest : public testing::Test {
61 public: 61 public:
62 ReportBadMessageTest() {} 62 ReportBadMessageTest() {}
63 63
64 void SetUp() override { 64 void SetUp() override {
65 mojo::edk::SetDefaultProcessErrorCallback( 65 mojo::edk::SetDefaultProcessErrorCallback(
66 base::Bind(&ReportBadMessageTest::OnProcessError, 66 base::Bind(&ReportBadMessageTest::OnProcessError,
67 base::Unretained(this))); 67 base::Unretained(this)));
68 68
69 impl_.BindImpl(GetProxy(&proxy_)); 69 impl_.BindImpl(MakeRequest(&proxy_));
70 } 70 }
71 71
72 void TearDown() override { 72 void TearDown() override {
73 mojo::edk::SetDefaultProcessErrorCallback( 73 mojo::edk::SetDefaultProcessErrorCallback(
74 mojo::edk::ProcessErrorCallback()); 74 mojo::edk::ProcessErrorCallback());
75 } 75 }
76 76
77 TestBadMessages* proxy() { return proxy_.get(); } 77 TestBadMessages* proxy() { return proxy_.get(); }
78 78
79 TestBadMessagesImpl* impl() { return &impl_; } 79 TestBadMessagesImpl* impl() { return &impl_; }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 EXPECT_FALSE(error); 187 EXPECT_FALSE(error);
188 bad_message_callback.Run("nope nope nope"); 188 bad_message_callback.Run("nope nope nope");
189 EXPECT_TRUE(error); 189 EXPECT_TRUE(error);
190 } 190 }
191 191
192 } // namespace 192 } // namespace
193 } // namespace test 193 } // namespace test
194 } // namespace mojo 194 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/pickle_unittest.cc ('k') | mojo/public/cpp/bindings/tests/request_response_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698