summaryrefslogtreecommitdiffstats
path: root/net/base/run_all_unittests.cc
Commit message (Collapse)AuthorAgeFilesLines
* net: move test files out of net/basephajdan.jr@chromium.org2013-03-181-53/+0
| | | | | | | | BUG=70818 Review URL: https://codereview.chromium.org/12811011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188822 0039d316-1c4b-4281-b951-d872f2087c98
* Invoke the iOS hook from TestSuite so each run_all_unittests.cc file does notlliabraa@chromium.org2013-03-151-3/+0
| | | | | | | | | | | | have to remember to install MainHook. BUG=None Review URL: https://chromiumcodereview.appspot.com/12321117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188376 0039d316-1c4b-4281-b951-d872f2087c98
* Make the v8 Isolate used in the proxy resolver explicit.jochen@chromium.org2013-02-011-0/+9
| | | | | | | | | | | | | | | For conceptual and performance reasons, the v8 API will require explicit passing of Isolates in the future instead of relying on the retrieval of one out of thin air (= either TLS or an evil global variable in v8). This CL makes the Isolate explicit in ProxyResolverV8::Context. The default Isolate is retrieved and remembered in the main browser thread and then passed down to the Context where it is needed in different threads. Review URL: https://codereview.chromium.org/11959029 Patch from Sven Panne <svenpanne@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180134 0039d316-1c4b-4281-b951-d872f2087c98
* Add MainHook to net unittests.droger@chromium.org2012-08-281-0/+3
| | | | | | | | | | | | MainHooks are in particular used on iOS to prevent the system from killing the test application at startup. See https://chromiumcodereview.appspot.com/10690161/. BUG=b/6785946 Review URL: https://chromiumcodereview.appspot.com/10880069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153650 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize StatisticsRecorder in Child Process to holdrtenneti@chromium.org2012-07-191-1/+1
| | | | | | | | | | | | | | all histograms in child processes. Made StatisticsRecorder a leaky lazy singleton. R=jar@chromium.org, jam@chromium.org BUG=114013 TEST=renderer histograms should still work. Review URL: https://chromiumcodereview.appspot.com/10779040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147501 0039d316-1c4b-4281-b951-d872f2087c98
* Move StatisticsRecorder out of histogram.cc/h for further refactoring.kaiwang@chromium.org2012-07-131-1/+1
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10703037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146659 0039d316-1c4b-4281-b951-d872f2087c98
* Register JNI methods before running unittests on android.nileshagrawal@chromium.org2012-06-271-0/+12
| | | | | | | | | | | | | A better way to implement: http://codereview.chromium.org/10658017/ BUG=125059 TEST= Review URL: https://chromiumcodereview.appspot.com/10668047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144374 0039d316-1c4b-4281-b951-d872f2087c98
* Add an explicit function to init NSS for SSL server socketsrsleevi@chromium.org2012-06-131-0/+5
| | | | | | | | | | BUG=131622 TEST=tsan goes green for existing tests Review URL: https://chromiumcodereview.appspot.com/10543106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141955 0039d316-1c4b-4281-b951-d872f2087c98
* Created a new class SpdyTestStateHelper to serve as a helper to manage the ↵rch@chromium.org2012-03-221-2/+1
| | | | | | | | state of a number of SPDY global variables. Review URL: http://codereview.chromium.org/9817014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128163 0039d316-1c4b-4281-b951-d872f2087c98
* Send PING to check the status of the SPDY connection.rtenneti@chromium.org2011-10-161-0/+3
| | | | | | | | | | | | Make SpdySessions more resilient to connections dying. BUG=89725,34752 R=willchan,jar TEST=network unit tests Review URL: http://codereview.chromium.org/8230037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105723 0039d316-1c4b-4281-b951-d872f2087c98
* Move crypto files out of base, to a top level directory.rvargas@google.com2011-04-141-2/+2
| | | | | | | | | | | | | src/crypto is now an independent project that contains our cryptographic primitives (except md5 and sha1). This removes the base dependency from nss, openssl and sqlite. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6805019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81611 0039d316-1c4b-4281-b951-d872f2087c98
* Turn off backup sockets for most tests in net_unittests.willchan@chromium.org2011-04-081-1/+5
| | | | | | | | | | BUG=78303 TEST=net_unittests Review URL: http://codereview.chromium.org/6814017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80972 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the workaround for bug 43461. Use a g_use_system_sslwtc@chromium.org2011-02-231-7/+0
| | | | | | | | | | | | | | boolean flag in DefaultClientSocketFactory::CreateSSLClientSocket. Based on rch's code in http://codereview.chromium.org/6487012. R=rch BUG=43461 TEST=no ChromeFrame test program build failures. Review URL: http://codereview.chromium.org/6561003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75791 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61897 - Do not use Alternate-Protocol for establishing new SpdySessions.mbelshe@chromium.org2010-10-161-3/+0
| | | | | | | | | | | | | | | | | | | | | Only use Alternate-Protocol for latching onto existing SpdySessions. This is a temporary change until SSL improvements are made, so we can begin sending http over spdy when available. Note that we have to do proxy resolution one time to figure out how to check for the appropriate existing SpdySession. If no SpdySession exists, we fallback again and have to redo proxy resolution (since the alternate protocol of npn-spdy requires rewriting the URI from http:// to https://). So we may end up doing two proxy resolutions in the fallback case. I had to disable all the tests that test establishing a new SpdySession for http:// URIs, since we don't do that for now. BUG=none TEST=none Review URL: http://codereview.chromium.org/3573013 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3751009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62873 0039d316-1c4b-4281-b951-d872f2087c98
* Move Stats, histograms, and field trial into a metrics subdirectory of base andbrettw@chromium.org2010-10-141-2/+2
| | | | | | | | | put them in the base namespace. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62510 0039d316-1c4b-4281-b951-d872f2087c98
* Do not use Alternate-Protocol for establishing new SpdySessions.willchan@chromium.org2010-10-081-0/+3
| | | | | | | | | | | | | | | | | | Only use Alternate-Protocol for latching onto existing SpdySessions. This is a temporary change until SSL improvements are made, so we can begin sending http over spdy when available. Note that we have to do proxy resolution one time to figure out how to check for the appropriate existing SpdySession. If no SpdySession exists, we fallback again and have to redo proxy resolution (since the alternate protocol of npn-spdy requires rewriting the URI from http:// to https://). So we may end up doing two proxy resolutions in the fallback case. I had to disable all the tests that test establishing a new SpdySession for http:// URIs, since we don't do that for now. BUG=none TEST=none Review URL: http://codereview.chromium.org/3573013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61897 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land part of r55416, minus actually moving the test_suite.h contents to a ↵brettw@chromium.org2010-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | .cc file. Cleanup in base. This moves the implementation (and a bunch of header file dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56399 0039d316-1c4b-4281-b951-d872f2087c98
* Remove test isolation enforcement code.phajdan.jr@chromium.org2010-08-161-1/+0
| | | | | | | | | | | | | | | | | | | I think it was a failed experiment, and it only ever worked for base_unittests. This removes some potentially risky code from LazyInstance that was only needed for the test isolation. The lesson from this experiment is that removing singletons works better than trying to make tests work fine even when singletons are overused. TEST=none BUG=12710 Review URL: http://codereview.chromium.org/3127012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56229 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 55400 - Cleanup in base. This moves the implementation (and a bunch ↵nsylvain@chromium.org2010-08-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | of header file dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/3035062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55416 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in base. This moves the implementation (and a bunch of header filebrettw@chromium.org2010-08-091-0/+1
| | | | | | | | | | | | | | | | | | | dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55400 0039d316-1c4b-4281-b951-d872f2087c98
* Include "build/build_config.h" explicitly because we test thewtc@chromium.org2010-05-041-0/+1
| | | | | | | | | | | OS_WIN macro. R=willchan BUG=43142 TEST=No compilation error. Review URL: http://codereview.chromium.org/1929005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46367 0039d316-1c4b-4281-b951-d872f2087c98
* Always use NSS for SSL on Windows in net_unittests.exe.wtc@chromium.org2010-05-041-28/+16
| | | | | | | | | R=agl,willchan BUG=43142 TEST=All unit tests should pass on Windows. Review URL: http://codereview.chromium.org/1942002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46361 0039d316-1c4b-4281-b951-d872f2087c98
* Add tests for SocketStreamMetrics.satorux@chromium.org2009-12-151-0/+3
| | | | | | | | | | | | | | Tests for SocketStreamMetrics were missing, which is not great. Note that the tests became a bit more complex than I originally thought as the global histograms are shared by other tests in other files. TEST=net_unittests BUG=none Review URL: http://codereview.chromium.org/491045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34536 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily disable enforcing test isolation for net_unittests.phajdan.jr@chromium.org2009-12-041-1/+1
| | | | | | | | | | | | It exposed problems with some tests which manifest as flakiness. Will debug offline. BUG=12710 TBR=wtc Review URL: http://codereview.chromium.org/465066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33852 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Apply test isolation goodness to net_unittests.phajdan.jr@chromium.org2009-12-021-1/+3
| | | | | | | | | TEST=Covered by net_unittests and test_shell_tests. BUG=12710 Review URL: http://codereview.chromium.org/460014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33594 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Apply test isolation goodness to net_unittests."phajdan.jr@chromium.org2009-11-261-3/+1
| | | | | | | | | | | | | Revert "Fix a memory leak in DnsReloadTimer" Valgrind test_shell_tests still fails, will investigate offline. :( TBR=wtc BUG=12710 Review URL: http://codereview.chromium.org/434115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33205 0039d316-1c4b-4281-b951-d872f2087c98
* Apply test isolation goodness to net_unittests.phajdan.jr@chromium.org2009-11-261-1/+3
| | | | | | | | | | | | We're going to have it enabled for all tests, but I'm enabling it one-by-one to limit damage from possible problems. TEST=none BUG=12710 Review URL: http://codereview.chromium.org/439007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33202 0039d316-1c4b-4281-b951-d872f2087c98
* Moving NetTestSuite to a header file for reuse.tommi@chromium.org2009-08-261-36/+1
| | | | | | | | I'm also factoring initialization of the NetTestSuite instance to a separate method so that per NetTestSuite instance initialization can be done separate of TestSuite::Initialize() (which does global initialization). Review URL: http://codereview.chromium.org/174438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24379 0039d316-1c4b-4281-b951-d872f2087c98
* Refactorings surrounding HostResolver:ericroman@google.com2009-07-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | (1) Extract HostResolver to an interface. The existing concrete implementation is now named HostResolverImpl. This makes it possible to create mocks with more complex behavior (i.e. choose via rules if response will be sync vs async). (2) Transform HostMapper into HostResolverProc. Conceptually HostResolverProc maps a hostname to a socket address, whereas HostMapper mapped a hostname to another hostname (so you were still at the mercy of the system's host resolver). With HostResolverProc you can specify the exact AddressList, making it possible to run tests requiring IPv6 socketaddrs on systems (like WinXP) that don't actually support it. (3) Add a MockHostResolver implementation of HostResolver. This replaces the [ScopedHostMapper + RuleBasedHostMapper + HostResolver] combo. It is less clunky and a bit more expressive. BUG=http://crbug.com/16452 R=willchan TEST=existing Review URL: http://codereview.chromium.org/149511 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20795 0039d316-1c4b-4281-b951-d872f2087c98
* Work around a Purify bug by moving initialization from constructor to ↵erikkay@google.com2009-02-061-8/+8
| | | | | | | | | | Inititialize(). BUG=7467 Review URL: http://codereview.chromium.org/24006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9354 0039d316-1c4b-4281-b951-d872f2087c98
* Add more unit tests for net/base/host_resolver.phajdan.jr@chromium.org2009-01-291-4/+9
| | | | | | | | BUG=6661 Review URL: http://codereview.chromium.org/18775 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8872 0039d316-1c4b-4281-b951-d872f2087c98
* Apply minor tweaks to ScopedHostMapper per review feedback.darin@chromium.org2008-09-241-1/+1
| | | | | | | | R=wtc Review URL: http://codereview.chromium.org/4253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2557 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for mock DNS queries. This allows us to eliminatedarin@google.com2008-09-241-0/+6
| | | | | | | | | | | | | | flaky DNS queries from the unit tests. Note: some unit tests still connect to www.google.com. My plan is to resolve those in a subsequent CL. R=wtc BUG=2635 Review URL: http://codereview.chromium.org/4022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2545 0039d316-1c4b-4281-b951-d872f2087c98
* Fix net_unittests hang observed on Vista. It turns out that a subpump wasdarin@google.com2008-08-291-11/+0
| | | | | | | | | | | | | | | | | being run within shell32, which was causing our kHaveWorkMsg to get dispatched. However, because that was occuring outside the context of a MessagePump::Run call, the handler for kHaveWorkMsg was returning early. Unfortunately, this means that it was failing to reset the have_work_ sentinel to 0. Because of that future calls to ScheduleWork would always be a no-op (as they return early when have_work_ is already set to 1). The proper fix is to just re-order the calls so that ProcessPumpReplacementMessage always runs in response to kHaveWorkMsg, but we still suppress calling DoWork until we are inside MessagePump::Run. TBR=rvargas,jar git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1544 0039d316-1c4b-4281-b951-d872f2087c98
* Hack to keep vista net_unittests from hanging while I investigate a proper fix.darin@google.com2008-08-291-0/+11
| | | | | | | TBR=rvargas git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1540 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the net_perftests to work again.darin@google.com2008-08-271-1/+1
| | | | | | | | | Since only one test needed a MessageLoop, I decided to only give that single test a MessageLoop. I used a MessageLoopForIO (subclass of MessageLoop) for future use when the disk cache leverages MessageLoopForIO for asynchronous IO. TBR=rvargas git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1428 0039d316-1c4b-4281-b951-d872f2087c98
* Allow consumers of MessageLoop to specify the type of MessageLoop they want.darin@google.com2008-08-261-0/+58
This CL introduces a Type enum to MessageLoop, and I also created subclasses of MessageLoop corresponding to the non-default types: MessageLoopForIO and MessageLoopForUI. I moved all of the platform-specific MessageLoop APIs onto either MessageLoopForIO or MessageLoopForUI. MessageLoopForIO gets the Watcher API, and MessageLoopForUI gets the Observer and Dispatcher APIs. Under the hood, both are implemented in terms of MessagePumpWin, but that will change in a future CL. The Thread class is changed to allow the consumer to specify the Type of MessageLoop they want to have setup on the created thread. I re-organized message_loop_unittest.cc and timer_unittest.cc so that I could exercise all (or most) of the tests against each type of MessageLoop. Note: I know that "explicit MessageLoop(Type type = TYPE_DEFAULT);" is in violation to the style-guide's restriction against default arguments. I'm working on finding a decent solution to that problem. Please ignore this issue for now. The corresponding chrome/ changes are coming in a separate CL due to Reitveld data size limitations. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1362 0039d316-1c4b-4281-b951-d872f2087c98