summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_stream_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add origin checking for server pushed resources.mbelshe@chromium.org2010-12-081-4/+50
| | | | | | | | | BUG=64108 TEST=PushedStream, ServerPushCrossOriginCorrectness Review URL: http://codereview.chromium.org/5516012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68605 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 1thakis@chromium.org2010-11-011-2/+2
| | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 61015 (unnecessary revert due to flaky build) - Stop refcounting ↵willchan@chromium.org2010-09-301-2/+2
| | | | | | | | | | | | | | | | SpdySessionPool. BUG=57343 TEST=none Review URL: http://codereview.chromium.org/3602001 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3541005 TBR=willchan@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61063 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61015 (broke fetch_client) - Stop refcounting SpdySessionPool.willchan@chromium.org2010-09-301-2/+2
| | | | | | | | | | | | BUG=57343 TEST=none Review URL: http://codereview.chromium.org/3602001 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3541005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61018 0039d316-1c4b-4281-b951-d872f2087c98
* Stop refcounting SpdySessionPool.willchan@chromium.org2010-09-301-2/+2
| | | | | | | | | BUG=57343 TEST=none Review URL: http://codereview.chromium.org/3602001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61015 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the references to HttpNetworkSession in SpdySessionrch@chromium.org2010-09-251-1/+3
| | | | | | | | | | | | | | | | and replace it with a reference to the SpdySessionPool and SpdySettingStorage, which are actually required. Modified SpdySessionPool to take a pointer to SpdySettingsStorage instead of to HttpNetworkSession in both GetSpdySessionFromSocket() Get(). Modified HttpStreamRequest (and various unit tests) accordingly when calling these methods. Review URL: http://codereview.chromium.org/3400024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60590 0039d316-1c4b-4281-b951-d872f2087c98
* Remove SpdySession::Connect(). This methods was onlyrch@chromium.org2010-09-251-2/+6
| | | | | | | | | | | | | being called from a handful of unit tests. I modified those tests to call SpdySession::InitializeWithSocket() instead. This added a bit of code to these tests. BUG=56848 TEST=none Review URL: http://codereview.chromium.org/3435029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60589 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 59362 - net: Rename ProxyService::CreateNull to ↵tfarina@chromium.org2010-09-151-5/+0
| | | | | | | | | | | | | | | | | | | | | ProxyService::CreateDirect. (Note: This was a TODO for eroman). BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3336021 Revert Review URL: http://codereview.chromium.org/3444001/show TBR=eroman@chromium.org Fix the bad git svn rebase (that caused a bad merge, that integrates other files in the original cl, now this should be fixed). Review URL: http://codereview.chromium.org/3413008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59481 0039d316-1c4b-4281-b951-d872f2087c98
* Trying to green up the tree, lots of mac and win red around this cl.thomasvl@chromium.org2010-09-141-0/+5
| | | | | | | | | | | | | | | | Revert 59362 - net: Rename ProxyService::CreateNull to ProxyService::CreateDirect. (Note: This was a TODO for eroman). BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3336021 TBR=tfarina@chromium.org Review URL: http://codereview.chromium.org/3444001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59373 0039d316-1c4b-4281-b951-d872f2087c98
* net: Rename ProxyService::CreateNull to ProxyService::CreateDirect.tfarina@chromium.org2010-09-141-5/+0
| | | | | | | | | | | (Note: This was a TODO for eroman). BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3336021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59362 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor: change the spdy session pool key to take a ProxyServer instead of ↵eroman@chromium.org2010-08-251-1/+1
| | | | | | | | | a string representation of the proxy server. BUG=52668 Review URL: http://codereview.chromium.org/3197018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57297 0039d316-1c4b-4281-b951-d872f2087c98
* Added a new MockSocket that enforces ordering of reads/writes.erikchen@google.com2010-08-181-1/+1
| | | | | | | | | | Re-enabled two broken SPDY tests, using new MockSocket. All SPDY tests should eventually convert to using this new object. TEST=none BUG=none Review URL: http://codereview.chromium.org/3179016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56560 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY flow control: fix for WINDOW_UPDATEs arriving while request is being sent.agayev@chromium.org2010-08-171-4/+1
| | | | | | | | | BUG=48100 TEST=net_unittests Review URL: http://codereview.chromium.org/3048058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56355 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up SpdyStream.erikchen@google.com2010-08-061-1/+1
| | | | | | | | | | Removed a lot of duplicate/unnecessary logic. BUG=none TEST=none Review URL: http://codereview.chromium.org/3075023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55308 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: flow-control fix: resume I/O once a WINDOW_UPDATE frame is received ↵agayev@chromium.org2010-08-051-1/+5
| | | | | | | | | | | for a stalled stream. BUG=none TEST=net_unittests Review URL: http://codereview.chromium.org/3018019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55125 0039d316-1c4b-4281-b951-d872f2087c98
* SpdySessionPool now identifies SpdySessions by both HostPortPair and proxy ↵erikchen@google.com2010-08-021-2/+2
| | | | | | | | | | | | settings. This ensures SpdySessions are not improperly reused. TEST=net_unittests BUG=49874 Review URL: http://codereview.chromium.org/3047032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54577 0039d316-1c4b-4281-b951-d872f2087c98
* Implement prefetching in chromegavinp@google.com2010-07-311-1/+1
| | | | | | | | | | | | | | | | | | With this CL (see also issue 2910009), chrome will support basic prefetching. You can optionally deactivate prefetching with the command line argument --disable-prefetch. A new RequestPriority was created as well, IDLE, which is lower than LOWEST. Unfortunately, SPDY has only two bits for priority, so as a temporary measure (pending SPDY v3 which will have three), we have a mapping in SPDY that folds net::LOWEST and net::IDLE together. BUG=13505 TEST=http://gemal.dk/browserspy/prefetch.php Review URL: http://codereview.chromium.org/3050016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54421 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed memory leak in SpdyHttpStreamTest. Removed suppressions.erikchen@google.com2010-07-211-56/+2
| | | | | | | | | | Also cleaned up spdy unit tests a bit. TEST=SpdyHttpStreamTest should have no memleaks in valgrind. BUG=48865, 47950, 46886 Review URL: http://codereview.chromium.org/3033012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53200 0039d316-1c4b-4281-b951-d872f2087c98
* Remove SpdyHttpStream dependency in SpdySessionukai@chromium.org2010-07-211-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3035010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53146 0039d316-1c4b-4281-b951-d872f2087c98
* Fix tsan failure in SpdyStreamTest.ukai@chromium.org2010-07-201-0/+2
| | | | | | | | | | | | | Under tsan, tcp connect job tries to connect several times and fails to find data provider for mock socket. Make connect synchronous (as done in SpdySessionTest) fixes the issue. BUG=none TEST=./tools/valgrind/chrome_tests.sh --build_dir out/Debug --test net --tool tsan --gtest_filter='SpdyStreamTest.*' Review URL: http://codereview.chromium.org/3054002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53036 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SpdyStream state for WebSocket supportukai@chromium.org2010-07-201-0/+284
| | | | | | | | | | | | | | In HTTP, it doesn't use STATE_READ_BODY/STATE_READ_BODY_COMPLETE states. Reading body message is handled in OnDataReceived() and DoLoop() is not involved in this state. In WebSocket, it will send frame after handshake has been finished, and need to get how many data has been written. STATE_OPEN handles this. BUG=none TEST=none Review URL: http://codereview.chromium.org/2962015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53000 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SpdyStream.ukai@chromium.org2010-06-141-131/+0
| | | | | | | | | | | | | | | Split SpdyStream into two parts: base SpdyStream and SpdyHttpStream. SpdyStream is an interface to SpdySession and provides base implementation as spdy stream. SpdyHttpStream is derived class of SpdyStream and used for [Spdy|Http]NetworkTransaction. BUG=42320 TEST=none Review URL: http://codereview.chromium.org/2564001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49667 0039d316-1c4b-4281-b951-d872f2087c98
* Make SpdySessionPool observe network changes.willchan@chromium.org2010-06-071-2/+2
| | | | | | | | BUG=40457 Review URL: http://codereview.chromium.org/2627003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49075 0039d316-1c4b-4281-b951-d872f2087c98
* Rework the logging for sockets/connectjobs.eroman@chromium.org2010-06-031-1/+2
| | | | | | | | | | | | | | | | | | In particular, make it work better when using backup jobs / late binding (the display was very confused before because of how these asynchronous events would nest). Also changed the paradigm for how PassiveLogCollector preserves these async associations -- this fixes how it replays the events to net-internals. (Before we would collapse the event streams into the SOURCE_URL_REQUEST which lost some hiearchy.. now I keep the separate streams). Some of the particular changes to the event streams: * ConnectJobs now create their own source stream internally. * Sockets are now bounded by +SOCKET_ALIVE / -SOCKET_ALIVE events (removed the one-off SOCKET_DONE event). * The socket log streams contains +SOCKET_IN_USE / -SOCKET_IN_USE event blocks to show which URLRequest was controlling it at various points in time (this makes it much easier to understand which read/writes belonged to a particular network transaction when a socket gets re-used). * ConnectJobs are bounded by +SOCKET_POOL_CONNECT_JOB / - SOCKET_POOL_CONNECT_JOB events. * ConnectJobs log the net error they failed with. * Removed the SOCKET_BACKUP_TIMER_EXTENDED event. Review URL: http://codereview.chromium.org/2363003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48797 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r47395. Looks like it still crashes =/willchan@chromium.org2010-05-201-0/+1
| | | | | | | | BUG=40455,40457 Review URL: http://codereview.chromium.org/2104013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47753 0039d316-1c4b-4281-b951-d872f2087c98
* This is roughly a reland of r43908, although I had to rewrite a fair chunk ↵willchan@chromium.org2010-05-171-1/+0
| | | | | | | | | | since code's changed a lot. I've changed it so as not to flush the host resolver too. I suspect there might have been a bug there. I was unable to reproduce the crash here on network change, so I think either that fixed it or something else changed under the hood. In any case, I want to reland this and see if anyone encounters any problems with it. BUG=40455,40457 Review URL: http://codereview.chromium.org/2114004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47395 0039d316-1c4b-4281-b951-d872f2087c98
* Add SPDY SYN_STREAM and SYN_REPLY events to about:net-internals.willchan@chromium.org2010-05-131-2/+1
| | | | | | | | BUG=43237 Review URL: http://codereview.chromium.org/2004010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47174 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb NetLog into SpdySession.willchan@chromium.org2010-05-121-1/+2
| | | | | | | | TODO(willchan): Start logging events for SpdySession. Review URL: http://codereview.chromium.org/2059004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47047 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove the implicit constructor for BoundNetLog that allowed ↵eroman@chromium.org2010-04-281-1/+2
| | | | | | | | | passing NULL in place of a const BoundNetLog&. BUG=37421 Review URL: http://codereview.chromium.org/1783008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45851 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash on IP address change.willchan@chromium.org2010-04-191-2/+6
| | | | | | | | | | Revert r43908: "Flush socket pools and SPDY session pool properly on explicit requests and network changes." This change was reverted on the 375 branch, but not on trunk. BUG=41190 Review URL: http://codereview.chromium.org/1604045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44973 0039d316-1c4b-4281-b951-d872f2087c98
* Flush socket pools and SPDY session pool properly on explicit requests and ↵willchan@chromium.org2010-04-081-6/+2
| | | | | | | | | | network changes. BUG=40455,40457 Review URL: http://codereview.chromium.org/1615005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43908 0039d316-1c4b-4281-b951-d872f2087c98
* SpdySession now sets the following fields in HttpResponseInfo: ahendrickson@google.com2010-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | request_time response_time vary_data There is also a unit test to exercise the new functionality. - Changed CreateSpdyHeadersFromHttpRequest() to use std::string::append() rather than std::string::operator+() to append a single '\0' character to the string, as the former does nothing. - Now using SpdyFramer. - The unit tests now include all server push cases. BUG=34505 TEST=Run netunittests.exe --gtest_filter=SpdyNetworkTransactionTest.* Review URL: http://codereview.chromium.org/634002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42660 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SpdySessionPool to take a host port pair instead of just the host.willchan@chromium.org2010-02-261-2/+2
| | | | | | | | BUG=28595 Review URL: http://codereview.chromium.org/660107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40077 0039d316-1c4b-4281-b951-d872f2087c98
* Added factories for HttpAuthHandler.cbentzel@chromium.org2010-02-151-2/+7
| | | | | | | | | | | | | | | | | | | The driving rationale for this change was to prevent choosing an AuthHandler when it is not supported on the system due to a missing runtime component (such as not being able to locate a gssapi shared library when seeing a Negotiate scheme). It also has the advantage (currently unused) of determining some per-auth-scheme properties only the first time that a challenge for that scheme is seen (such as maximum token length for the SSPI implementation of NTLM). Finally, it may make unit tests easier to generate since the factory can be easily mocked. BUG=34795 TEST=New unit test for HttpAuthHandlerDispatchFactory. Review URL: http://codereview.chromium.org/582007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39065 0039d316-1c4b-4281-b951-d872f2087c98
* The great Flip -> Spdy rename.mbelshe@chromium.org2010-02-081-23/+23
| | | | | | | | | BUG=30747 TEST=none Review URL: http://codereview.chromium.org/580009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38386 0039d316-1c4b-4281-b951-d872f2087c98
* Rename all files from flip* to spdy*.mbelshe@chromium.org2010-02-061-0/+123
I haven't yet renamed the classes. BUG=30747 TEST=none Review URL: http://codereview.chromium.org/582001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38315 0039d316-1c4b-4281-b951-d872f2087c98