| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "extensions/browser/stash_backend.h" | 8 #include "extensions/browser/mojo/stash_backend.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 | 12 |
| 13 class StashServiceTest : public testing::Test, public mojo::ErrorHandler { | 13 class StashServiceTest : public testing::Test, public mojo::ErrorHandler { |
| 14 public: | 14 public: |
| 15 enum Event { | 15 enum Event { |
| 16 EVENT_NONE, | 16 EVENT_NONE, |
| 17 EVENT_STASH_RETRIEVED, | 17 EVENT_STASH_RETRIEVED, |
| 18 }; | 18 }; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 ASSERT_EQ(0u, stashed_objects.size()); | 165 ASSERT_EQ(0u, stashed_objects.size()); |
| 166 // Check that the stashed handle has been closed. | 166 // Check that the stashed handle has been closed. |
| 167 MojoResult result = | 167 MojoResult result = |
| 168 mojo::Wait(message_pipe.handle1.get(), | 168 mojo::Wait(message_pipe.handle1.get(), |
| 169 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_READABLE, | 169 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_READABLE, |
| 170 MOJO_DEADLINE_INDEFINITE); | 170 MOJO_DEADLINE_INDEFINITE); |
| 171 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result); | 171 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace extensions | 174 } // namespace extensions |
| OLD | NEW |