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

Side by Side Diff: ipc/ipc_tests.cc

Issue 9148039: Convert use of int ms to TimeDelta in files owned by jeremy. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove static class initialization. Created 8 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 | « ipc/ipc_sync_channel_unittest.cc ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 TEST_F(IPCChannelTest, Performance) { 494 TEST_F(IPCChannelTest, Performance) {
495 // setup IPC channel 495 // setup IPC channel
496 IPC::Channel chan(kReflectorChannel, IPC::Channel::MODE_SERVER, NULL); 496 IPC::Channel chan(kReflectorChannel, IPC::Channel::MODE_SERVER, NULL);
497 ChannelPerfListener perf_listener(&chan, 10000, 100000); 497 ChannelPerfListener perf_listener(&chan, 10000, 100000);
498 chan.set_listener(&perf_listener); 498 chan.set_listener(&perf_listener);
499 ASSERT_TRUE(chan.Connect()); 499 ASSERT_TRUE(chan.Connect());
500 500
501 HANDLE process = SpawnChild(TEST_REFLECTOR, &chan); 501 HANDLE process = SpawnChild(TEST_REFLECTOR, &chan);
502 ASSERT_TRUE(process); 502 ASSERT_TRUE(process);
503 503
504 PlatformThread::Sleep(1000); 504 PlatformThread::Sleep(base::TimeDelta::FromSeconds(1));
505 505
506 PerfTimeLogger logger("IPC_Perf"); 506 PerfTimeLogger logger("IPC_Perf");
507 507
508 // this initial message will kick-start the ping-pong of messages 508 // this initial message will kick-start the ping-pong of messages
509 IPC::Message* message = new IPC::Message(0, 509 IPC::Message* message = new IPC::Message(0,
510 2, 510 2,
511 IPC::Message::PRIORITY_NORMAL); 511 IPC::Message::PRIORITY_NORMAL);
512 message->WriteInt(GetTickCount()); 512 message->WriteInt(GetTickCount());
513 message->WriteInt(-1); 513 message->WriteInt(-1);
514 message->WriteString("Hello"); 514 message->WriteString("Hello");
(...skipping 22 matching lines...) Expand all
537 #endif // PERFORMANCE_TEST 537 #endif // PERFORMANCE_TEST
538 538
539 int main(int argc, char** argv) { 539 int main(int argc, char** argv) {
540 #ifdef PERFORMANCE_TEST 540 #ifdef PERFORMANCE_TEST
541 int retval = base::PerfTestSuite(argc, argv).Run(); 541 int retval = base::PerfTestSuite(argc, argv).Run();
542 #else 542 #else
543 int retval = base::TestSuite(argc, argv).Run(); 543 int retval = base::TestSuite(argc, argv).Run();
544 #endif 544 #endif
545 return retval; 545 return retval;
546 } 546 }
OLDNEW
« no previous file with comments | « ipc/ipc_sync_channel_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698