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

Side by Side Diff: mojo/edk/system/awakable_list_unittest.cc

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup Created 5 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a 5 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a
6 // heavily-loaded system). Sorry. |test::EpsilonDeadline()| may be increased to 6 // heavily-loaded system). Sorry. |test::EpsilonDeadline()| may be increased to
7 // increase tolerance and reduce observed flakiness (though doing so reduces the 7 // increase tolerance and reduce observed flakiness (though doing so reduces the
8 // meaningfulness of the test). 8 // meaningfulness of the test).
9 9
10 #include "third_party/mojo/src/mojo/edk/system/awakable_list.h" 10 #include "mojo/edk/system/awakable_list.h"
11 11
12 #include "mojo/edk/system/handle_signals_state.h"
13 #include "mojo/edk/system/test_utils.h"
14 #include "mojo/edk/system/waiter.h"
15 #include "mojo/edk/system/waiter_test_utils.h"
12 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/mojo/src/mojo/edk/system/handle_signals_state.h"
14 #include "third_party/mojo/src/mojo/edk/system/test_utils.h"
15 #include "third_party/mojo/src/mojo/edk/system/waiter.h"
16 #include "third_party/mojo/src/mojo/edk/system/waiter_test_utils.h"
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace system { 19 namespace edk {
20 namespace { 20 namespace {
21 21
22 TEST(AwakableListTest, BasicCancel) { 22 TEST(AwakableListTest, BasicCancel) {
23 MojoResult result; 23 MojoResult result;
24 uint32_t context; 24 uint32_t context;
25 25
26 // Cancel immediately after thread start. 26 // Cancel immediately after thread start.
27 { 27 {
28 AwakableList awakable_list; 28 AwakableList awakable_list;
29 test::SimpleWaiterThread thread(&result, &context); 29 test::SimpleWaiterThread thread(&result, &context);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 remove_first.AwakeForStateChange(hss); 345 remove_first.AwakeForStateChange(hss);
346 EXPECT_EQ(keep0.awake_count, 2); 346 EXPECT_EQ(keep0.awake_count, 2);
347 EXPECT_EQ(keep1.awake_count, 2); 347 EXPECT_EQ(keep1.awake_count, 2);
348 EXPECT_EQ(remove2.awake_count, 1); 348 EXPECT_EQ(remove2.awake_count, 1);
349 349
350 remove_first.Remove(&keep0); 350 remove_first.Remove(&keep0);
351 remove_first.Remove(&keep1); 351 remove_first.Remove(&keep1);
352 } 352 }
353 353
354 } // namespace 354 } // namespace
355 } // namespace system 355 } // namespace edk
356 } // namespace mojo 356 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698