OLD | NEW |
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 "services/media/framework/test/test_base.h" | 5 #include "services/util/cpp/incident.h" |
6 #include "services/media/framework/util/incident.h" | 6 #include "services/util/cpp/test/test_base.h" |
7 | 7 |
8 namespace mojo { | 8 namespace mojo { |
9 namespace media { | |
10 namespace { | 9 namespace { |
11 | 10 |
12 class IncidentTest : public TestBase {}; | 11 class IncidentTest : public TestBase {}; |
13 | 12 |
14 // Tests whether Incident::Occur and Incident::Reset have the right effect on | 13 // Tests whether Incident::Occur and Incident::Reset have the right effect on |
15 // Incident::occurred. | 14 // Incident::occurred. |
16 TEST_F(IncidentTest, Basics) { | 15 TEST_F(IncidentTest, Basics) { |
17 Incident under_test; | 16 Incident under_test; |
18 | 17 |
19 EXPECT_FALSE(under_test.occurred()); | 18 EXPECT_FALSE(under_test.occurred()); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 208 |
210 { | 209 { |
211 ThreadsafeIncident under_test; | 210 ThreadsafeIncident under_test; |
212 under_test.When([&consequence_ran]() { consequence_ran = true; }); | 211 under_test.When([&consequence_ran]() { consequence_ran = true; }); |
213 } | 212 } |
214 | 213 |
215 EXPECT_FALSE(consequence_ran); | 214 EXPECT_FALSE(consequence_ran); |
216 } | 215 } |
217 | 216 |
218 } // namespace | 217 } // namespace |
219 } // namespace media | |
220 } // namespace mojo | 218 } // namespace mojo |
OLD | NEW |