| Index: mojo/common/common_custom_types_unittest.cc
|
| diff --git a/mojo/common/common_custom_types_unittest.cc b/mojo/common/common_custom_types_unittest.cc
|
| index 7e8252dbc613a33b6c0acc69c0730a3041837d69..6c836dadc6efc10268f29af520efa6c1670e6138 100644
|
| --- a/mojo/common/common_custom_types_unittest.cc
|
| +++ b/mojo/common/common_custom_types_unittest.cc
|
| @@ -90,6 +90,21 @@ class TestFilePathImpl : public TestFilePath {
|
| mojo::Binding<TestFilePath> binding_;
|
| };
|
|
|
| +class TestNonceImpl : public TestNonce {
|
| + public:
|
| + explicit TestNonceImpl(TestNonceRequest request)
|
| + : binding_(this, std::move(request)) {}
|
| +
|
| + // TestNonce implementation:
|
| + void BounceNonce(const base::Nonce& in,
|
| + const BounceNonceCallback& callback) override {
|
| + callback.Run(in);
|
| + }
|
| +
|
| + private:
|
| + mojo::Binding<TestNonce> binding_;
|
| +};
|
| +
|
| class TestTimeImpl : public TestTime {
|
| public:
|
| explicit TestTimeImpl(TestTimeRequest request)
|
| @@ -176,6 +191,19 @@ TEST_F(CommonCustomTypesTest, FilePath) {
|
| run_loop.Run();
|
| }
|
|
|
| +TEST_F(CommonCustomTypesTest, Nonce) {
|
| + base::RunLoop run_loop;
|
| +
|
| + TestNoncePtr ptr;
|
| + TestNonceImpl impl(GetProxy(&ptr));
|
| +
|
| + base::Nonce nonce = base::Nonce::Generate();
|
| +
|
| + ptr->BounceNonce(nonce, ExpectResponse(&nonce, run_loop.QuitClosure()));
|
| +
|
| + run_loop.Run();
|
| +}
|
| +
|
| TEST_F(CommonCustomTypesTest, Time) {
|
| base::RunLoop run_loop;
|
|
|
|
|