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

Side by Side Diff: services/util/cpp/test/incident_test.cc

Issue 2024953003: Motown: Move framework/util/incident* so other services can use it (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698