summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_test_base.cc
Commit message (Collapse)AuthorAgeFilesLines
* IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windowsmorrita2014-09-231-15/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ChannelMojo doesn't work on Windows with existing implementaion and this CL fixes it. On Windows, ChannelHandle isn't immediately usable: The handle has to be activated through ConnectNamedPipe() windows API, which is done in its own Connect() handlshaking phase. ChannelMojo didn't Connect() underlying channel and took the ChannelHandle over so the handle wasn't activated. Instead of hijacking underlying ChannelHandle, this CL actually Connect()s underlying channel, creates a pipe on the server side, send one side of the pipe to the client process, and use the pipe for the MessagePipe initialization. These initialization task is encapsulated behind new MojoBootstrap class. ChannelMojo creates MojoBootstrap class to get the PlatformHandle which is already activated and usable. BUG=377980 TEST=ipc_mojo_bootstrap_unittest.cc, ipc_channel_mojo_unittest.cc R=viettrungluu@chromium.org, darin@chromium.org, yzshen@chromium.org Review URL: https://codereview.chromium.org/553283002 Cr-Commit-Position: refs/heads/master@{#296248}
* Add ipc_mojo_perftestsmorrita2014-09-091-7/+15
| | | | | | | | | | | | | | | | This change adds ipc_mojo_perftests that runs the same benchmark as of ipc_perftests. Now head-to-head comparison becomes possible. For this change, whole ipc_perftests logic is extracted to ipc_perftest_support.cc to make it reusable by ipc_mojo_perftests. TEST=none BUG=none R=jam@chromium.org, darin@chromium.org, yuzhu@chromium.org Review URL: https://codereview.chromium.org/536213002 Cr-Commit-Position: refs/heads/master@{#293988}
* Fix a DCHECK violation in ipc_perftestsyzshen2014-09-051-13/+11
| | | | | | | | | | | | | | | | | We only allow one MessageLoop instance alive at any given time on a thread. If we use IPCTestBase::set_message_loop(), we need to do it in two steps: first set the message loop to NULL, and then set it to a newly-created message loop. Therefore, I changed the interface of IPCTestBase to make it a little more friendly. BUG=None TEST=ipc_perftests should not crash in debug build. Review URL: https://codereview.chromium.org/538593002 Cr-Commit-Position: refs/heads/master@{#293439}
* ipc/ fixups for scoped_refptr operator T* removal.dcheng2014-09-031-1/+1
| | | | | | | | BUG=110610 Review URL: https://codereview.chromium.org/535723002 Cr-Commit-Position: refs/heads/master@{#293170}
* Add ChannelProxy benchmark to ipc_perftests.morrita2014-08-291-2/+6
| | | | | | | | | | | | | | | | This CL add a ChannelProxy equivalent of the Channel benchmark to ipc_perftests. To use it in the benchmark, TestIOThread is extracted from mojo/system/ to base/test TEST=IPChannelPerfTest.ChannelProxyPingPong R=viettrungluu@chromium.org,brettw@chromium.org,darin@chromium.org BUG=none Review URL: https://codereview.chromium.org/488003003 Cr-Commit-Position: refs/heads/master@{#292518}
* Introduce ChannelMojomorrita@chromium.org2014-08-041-0/+13
| | | | | | | | | | | | | | | | | | This CL introduces ChannelMojo IPC::Channel implementation and optionally applies it for renderer-browser IPC channel. Current stability is like 5-seconds browser and There are rough edges. It often closes the channel so needs to be more robust. Even though the level of stability, having it in the tree will helps team to try and improve it. BUG=377980 R=darin@chromium.org,jam@chromium.org,viettrungluu@chromium.org TEST=ipc_channel_mojo_unittest.cc Review URL: https://codereview.chromium.org/382333002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287402 0039d316-1c4b-4281-b951-d872f2087c98
* Make IPC::Channel polymorphicmorrita@chromium.org2014-06-061-2/+3
| | | | | | | | | | | | | | This change makes each platform specific ChannelImpl into a subclass of Channel: ChannelPosix, ChannelWin, ChannelNacl. delegated functions are now virtual. TEST=none BUG=377980 R=darin@chromium.org, jam@chromium.org Review URL: https://codereview.chromium.org/310293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275505 0039d316-1c4b-4281-b951-d872f2087c98
* Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create()morrita@chromium.org2014-06-051-2/+2
| | | | | | | | | | | | | | | | | | | This change replaces constructors with Create() methods of ChannelProxy and SyncChannel. This open the possibility to introduce polymorphism to these classes. This is a revision of r274310 (https://codereview.chromium.org/301973003/) in which I added bunch of Create*() method variants. The chagne was reverted. This change no longer does it and just keeps using Channel::Mode to specify the channel type. TEST=none BUG=377980 R=darin@chromium.org,jam@chromium.org Review URL: https://codereview.chromium.org/310853003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275140 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 274310 "Introduce IPC::ChannelProxy::Create*() and IPC::S..."lambroslambrou@chromium.org2014-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke Windows compile: http://build.chromium.org/p/chromium.win/buildstatus?builder=Win%20x64%20Builder&number=180 FAILED: ninja -t msvc -e environment.x64 -- C:\b\build\goma/gomacc "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64\cl.exe" /nologo /showIncludes /FC @obj\remoting\host\win\remoting_core.wts_session_process_delegate.obj.rsp /c ..\..\remoting\host\win\wts_session_process_delegate.cc /Foobj\remoting\host\win\remoting_core.wts_session_process_delegate.obj /Fdobj\remoting\remoting_core.cc.pdb c:\b\build\slave\win_x64_builder\build\src\remoting\host\win\wts_session_process_delegate.cc(386) : error C2661: 'IPC::ChannelProxy::ChannelProxy' : no overloaded function takes 4 arguments ninja: build stopped: subcommand failed. > Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*() > > This change hides constructors of these classes so that we can turn > them polymorphic classes. > > Note that having almost identical ChannelProxy::Init*() isn't great > and they will be replaced by a factory-like abstraction in coming > changes. > > TEST=none > R=darin,cpu > BUG=377980 > > Review URL: https://codereview.chromium.org/301973003 TBR=morrita@chromium.org Review URL: https://codereview.chromium.org/312553004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274315 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*()morrita@chromium.org2014-06-021-4/+4
| | | | | | | | | | | | | | | | | This change hides constructors of these classes so that we can turn them polymorphic classes. Note that having almost identical ChannelProxy::Init*() isn't great and they will be replaced by a factory-like abstraction in coming changes. TEST=none R=darin,cpu BUG=377980 Review URL: https://codereview.chromium.org/301973003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274310 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce IPC::Channel::Create*() to ensure it being heap-allocated.morrita@chromium.org2014-05-301-3/+1
| | | | | | | | | | | | | | | | | | | | | This change introduces IPC::Channel::Create*() API to turn IPC::Channel into a heap allocated object. This will allow us to make Channel a polymorphic class. This change also tries to hide Channel::Mode from public API so that we can simplify channel creation code paths cleaner in following changes. ChannelProxy has to follow same pattern to finish this cleanup. Such changes will follow. TEST=none BUG=377980 R=darin@chromium.org,cpu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273575 Review URL: https://codereview.chromium.org/307653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273713 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 273575 "Introduce IPC::Channel::Create*() to ensure it be..."mattm@chromium.org2014-05-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke win compile. > Introduce IPC::Channel::Create*() to ensure it being heap-allocated. > > This change introduces IPC::Channel::Create*() API to turn > IPC::Channel into a heap allocated object. This will allow us to > make Channel a polymorphic class. > > This change also tries to hide Channel::Mode from public API > so that we can simplify channel creation code paths cleaner in > following changes. ChannelProxy has to follow same pattern to > finish this cleanup. Such changes will follow. > > TEST=none > BUG=377980 > R=darin@chromium.org,cpu@chromium.org > > Review URL: https://codereview.chromium.org/307653003 TBR=morrita@chromium.org Review URL: https://codereview.chromium.org/304153005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273596 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce IPC::Channel::Create*() to ensure it being heap-allocated.morrita@chromium.org2014-05-291-3/+1
| | | | | | | | | | | | | | | | | | | This change introduces IPC::Channel::Create*() API to turn IPC::Channel into a heap allocated object. This will allow us to make Channel a polymorphic class. This change also tries to hide Channel::Mode from public API so that we can simplify channel creation code paths cleaner in following changes. ChannelProxy has to follow same pattern to finish this cleanup. Such changes will follow. TEST=none BUG=377980 R=darin@chromium.org,cpu@chromium.org Review URL: https://codereview.chromium.org/307653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273575 0039d316-1c4b-4281-b951-d872f2087c98
* Remove --debug-on-start and --debug-children.pkasting@chromium.org2014-04-171-1/+0
| | | | | | | | | | | | | | | | | debug_on_start_win.cc also had some code to support --wait-for-debugger, but I don't think it's important to preserve it. This would only have any effect in modules which included debug_on_start.h, which was basically just test code; and it also wouldn't have any effect when the component build is enabled, which I suspect is true for most developers trying to run tests. I didn't remove any of the other pieces of --wait-for-debugger elsewhere. BUG=359822 TEST=none R=darin@chromium.org Review URL: https://codereview.chromium.org/227723008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264671 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of multiprocess_test's debug_on_start arguments.viettrungluu@chromium.org2014-03-091-5/+2
| | | | | | | | | | | (It was only ever given a "true" value once, and even that seemed dubious.) R=phajdan.jr@chromium.org TBR=darin@chromium.org, jeremy@chromium.org Review URL: https://codereview.chromium.org/191483002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255801 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the MultiProcessTest::SpawnChild() that as an fds_to_map argument.viettrungluu@chromium.org2014-03-061-5/+4
| | | | | | | | | | | It's POSIX-only and redundant. R=phajdan.jr@chromium.org TBR=brettw@chromium.org,jam@chromium.org,gene@chromium.org Review URL: https://codereview.chromium.org/187993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255289 0039d316-1c4b-4281-b951-d872f2087c98
* Use base::GlobalDescriptors::kBaseDescriptor instead of magic number 3.dongseong.hwang@intel.com2013-09-061-1/+6
| | | | | | Review URL: https://chromiumcodereview.appspot.com/23814006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221809 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths in ipc for base/process changes.rsesek@chromium.org2013-07-241-0/+1
| | | | | | | | | BUG=242290 R=cpu@chromium.org Review URL: https://chromiumcodereview.appspot.com/19525007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213349 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of time headers in courgette/, crypto/, dbus/, device/, ↵avi@chromium.org2013-06-281-1/+1
| | | | | | | | | | | | google_apis/, gpu/, ipc/, jingle/. BUG=254986 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/18156002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209149 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Use base::MessageLoop.xhwang@chromium.org2013-04-301-1/+1
| | | | | | | | | BUG=236029 R=agl@chromium.org Review URL: https://chromiumcodereview.appspot.com/14383024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197465 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor (many) IPC tests, notably most of the multiprocess tests.viettrungluu@chromium.org2013-01-251-86/+88
| | | | | | | | | | | This factors out common code and, more importantly/usefully, makes test-specific code more local, and thus easier to add new tests and maintain existing ones. In particular, this allows you to add a new test "client" (running in another process) without modifying ipc_test_base.*. Review URL: https://codereview.chromium.org/12051048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178901 0039d316-1c4b-4281-b951-d872f2087c98
* More IPC test header cleanup.viettrungluu@chromium.org2013-01-151-1/+0
| | | | | | Review URL: https://codereview.chromium.org/11858023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176983 0039d316-1c4b-4281-b951-d872f2087c98
* Trim #includes in ipc tests.viettrungluu@chromium.org2013-01-111-12/+2
| | | | | | Review URL: https://codereview.chromium.org/11858018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176438 0039d316-1c4b-4281-b951-d872f2087c98
* Make ipc_tests file structure a little saner and add an ipc_perftests target.viettrungluu@chromium.org2013-01-111-0/+131
This means that the (one, semi-manual) IPC perf test that we have will build without manual hackery (and do so separately from the ipc_tests target). Review URL: https://chromiumcodereview.appspot.com/11819041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176341 0039d316-1c4b-4281-b951-d872f2087c98