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

Side by Side Diff: mojo/system/waiter_unittest.cc

Issue 611733002: Mojo: Convert OVERRIDE -> override in mojo/{embedder,system}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « mojo/system/waiter_test_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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::EpsilonTimeout()| may be increased to 6 // heavily-loaded system). Sorry. |test::EpsilonTimeout()| 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 "mojo/system/waiter.h" 10 #include "mojo/system/waiter.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 base::PlatformThread::Sleep( 56 base::PlatformThread::Sleep(
57 base::TimeDelta::FromMicroseconds(kPollTimeMicros)); 57 base::TimeDelta::FromMicroseconds(kPollTimeMicros));
58 } 58 }
59 } 59 }
60 60
61 Waiter* waiter() { return &waiter_; } 61 Waiter* waiter() { return &waiter_; }
62 62
63 private: 63 private:
64 virtual void Run() OVERRIDE { 64 virtual void Run() override {
65 test::Stopwatch stopwatch; 65 test::Stopwatch stopwatch;
66 MojoResult result; 66 MojoResult result;
67 uint32_t context = static_cast<uint32_t>(-1); 67 uint32_t context = static_cast<uint32_t>(-1);
68 base::TimeDelta elapsed; 68 base::TimeDelta elapsed;
69 69
70 stopwatch.Start(); 70 stopwatch.Start();
71 result = waiter_.Wait(deadline_, &context); 71 result = waiter_.Wait(deadline_, &context);
72 elapsed = stopwatch.Elapsed(); 72 elapsed = stopwatch.Elapsed();
73 73
74 { 74 {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result); 293 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, result);
294 EXPECT_EQ(7u, context); 294 EXPECT_EQ(7u, context);
295 EXPECT_GT(elapsed, (1 - 1) * test::EpsilonTimeout()); 295 EXPECT_GT(elapsed, (1 - 1) * test::EpsilonTimeout());
296 EXPECT_LT(elapsed, (1 + 1) * test::EpsilonTimeout()); 296 EXPECT_LT(elapsed, (1 + 1) * test::EpsilonTimeout());
297 } 297 }
298 } 298 }
299 299
300 } // namespace 300 } // namespace
301 } // namespace system 301 } // namespace system
302 } // namespace mojo 302 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/waiter_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698