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

Side by Side Diff: mojo/public/cpp/test_support/lib/test_utils.cc

Issue 830593003: Update mojo sdk to rev 9fbbc4f0fef1187312316c0ed992342474e139f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick mojo 9d3b8dd17f12d20035a14737fdc38dd926890ff8 Created 5 years, 11 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/public/cpp/system/tests/core_unittest.cc ('k') | mojo/public/dart/bindings.dart » ('j') | 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 #include "mojo/public/cpp/test_support/test_utils.h" 5 #include "mojo/public/cpp/test_support/test_utils.h"
6 6
7 #include "mojo/public/cpp/system/core.h" 7 #include "mojo/public/cpp/system/core.h"
8 #include "mojo/public/cpp/test_support/test_support.h" 8 #include "mojo/public/cpp/test_support/test_support.h"
9 9
10 namespace mojo { 10 namespace mojo {
(...skipping 20 matching lines...) Expand all
31 nullptr, 31 nullptr,
32 &num_bytes, 32 &num_bytes,
33 nullptr, 33 nullptr,
34 &num_handles, 34 &num_handles,
35 MOJO_READ_MESSAGE_FLAG_NONE); 35 MOJO_READ_MESSAGE_FLAG_NONE);
36 if (rv == MOJO_RESULT_SHOULD_WAIT) { 36 if (rv == MOJO_RESULT_SHOULD_WAIT) {
37 if (did_wait) { 37 if (did_wait) {
38 assert(false); // Looping endlessly!? 38 assert(false); // Looping endlessly!?
39 return false; 39 return false;
40 } 40 }
41 rv = Wait(handle, MOJO_HANDLE_SIGNAL_READABLE, MOJO_DEADLINE_INDEFINITE); 41 rv = Wait(handle, MOJO_HANDLE_SIGNAL_READABLE, MOJO_DEADLINE_INDEFINITE,
42 nullptr);
42 if (rv != MOJO_RESULT_OK) 43 if (rv != MOJO_RESULT_OK)
43 return false; 44 return false;
44 did_wait = true; 45 did_wait = true;
45 } else { 46 } else {
46 assert(!num_handles); 47 assert(!num_handles);
47 break; 48 break;
48 } 49 }
49 } 50 }
50 51
51 text->resize(num_bytes); 52 text->resize(num_bytes);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 end_time = GetTimeTicksNow(); 88 end_time = GetTimeTicksNow();
88 } while (end_time - start_time < kPerftestTimeMicroseconds); 89 } while (end_time - start_time < kPerftestTimeMicroseconds);
89 90
90 MojoTestSupportLogPerfResult(test_name, sub_test_name, 91 MojoTestSupportLogPerfResult(test_name, sub_test_name,
91 1000000.0 * iterations / (end_time - start_time), 92 1000000.0 * iterations / (end_time - start_time),
92 "iterations/second"); 93 "iterations/second");
93 } 94 }
94 95
95 } // namespace test 96 } // namespace test
96 } // namespace mojo 97 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/system/tests/core_unittest.cc ('k') | mojo/public/dart/bindings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698