chromium/src/net/tools/testserver.git
3 months agoThis CL corrects a bug in which the OnHandshakeComplete callback for an ssl session... master
mshelley@chromium.org [Thu, 7 Aug 2014 10:07:22 +0000 (10:07 +0000)]
This CL corrects a bug in which the OnHandshakeComplete callback for an ssl session was never
called if that session had an empty session id (i.e. the session wasn't added to the cache).

This CL sets the OpenSSL info_callback such that CheckIfSessionAdded will be run whenever
an OpenSSL session has finished its handshake. Previously, CheckIfSessionAdded was called in
NewSessionCallbackStatic. NewSessionCallbackStatic is only called when a session is
added to the cache. Thus, leading connections with sessions that were not added to the cache would
force their pending jobs to wait indefinitely instead of letting the jobs proceed at the completion
of the leading job's connection.

R=mmenke@chromium.org,rsleevi@chromium.org,wtc@chromium.org, davidben@chromium.org

BUG=398967

Review URL: https://codereview.chromium.org/416683002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@288024 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 months agoMap WebSocket URL schemes to HTTP URL schemes for auth purposes.
ricea@chromium.org [Tue, 29 Jul 2014 07:42:29 +0000 (07:42 +0000)]
Map WebSocket URL schemes to HTTP URL schemes for auth purposes.

This permits WebSocket connections to inherit credentials from HTTP pages, and
matches the behaviour of other browsers.

Design doc: https://docs.google.com/a/chromium.org/document/d/129rLtf5x3hvhP5rayLiSxnEjOXS8Z7EnLJgBL4CdwjI/edit

Also consider any 401 or 407 results that reach the WebSocketStream
URLRequest::Delegate to be unrecoverable errors.

Also ensure that the response headers are reported back to the renderer
when the developer tools are open and a 401 error happens.

BUG=123862

Review URL: https://codereview.chromium.org/336263005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@286108 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 months agoSet tls_client_cert_optional in net/.../testserver.py.
pneubeck@chromium.org [Mon, 21 Jul 2014 15:22:41 +0000 (15:22 +0000)]
Set tls_client_cert_optional in net/.../testserver.py.

Before this value wasn't set at all leading to crashes of the test server if tsls_client_auth was enabled.

BUG=NONE
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/407653005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@284431 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 months agoRevert 282307 "Map WebSocket URL schemes to HTTP URL schemes for..."
kaliamoorthi@chromium.org [Thu, 10 Jul 2014 15:18:44 +0000 (15:18 +0000)]
Revert 282307 "Map WebSocket URL schemes to HTTP URL schemes for..."

> Map WebSocket URL schemes to HTTP URL schemes for auth purposes.
>
> This permits WebSocket connections to inherit credentials from HTTP pages, and
> matches the behaviour of other browsers.
>
> Design doc: https://docs.google.com/a/chromium.org/document/d/129rLtf5x3hvhP5rayLiSxnEjOXS8Z7EnLJgBL4CdwjI/edit
>
> Also consider any 401 or 407 results that reach the WebSocketStream
> URLRequest::Delegate to be unrecoverable errors.
>
> Also ensure that the response headers are reported back to the renderer
> when the developer tools are open and a 401 error happens.
>
> BUG=123862
>
> Review URL: https://codereview.chromium.org/336263005

Seems to cause WebSocket1 failure in WinXP

TBR=ricea@chromium.org

Review URL: https://codereview.chromium.org/388493002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@282331 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 months agoMap WebSocket URL schemes to HTTP URL schemes for auth purposes.
ricea@chromium.org [Thu, 10 Jul 2014 11:13:47 +0000 (11:13 +0000)]
Map WebSocket URL schemes to HTTP URL schemes for auth purposes.

This permits WebSocket connections to inherit credentials from HTTP pages, and
matches the behaviour of other browsers.

Design doc: https://docs.google.com/a/chromium.org/document/d/129rLtf5x3hvhP5rayLiSxnEjOXS8Z7EnLJgBL4CdwjI/edit

Also consider any 401 or 407 results that reach the WebSocketStream
URLRequest::Delegate to be unrecoverable errors.

Also ensure that the response headers are reported back to the renderer
when the developer tools are open and a 401 error happens.

BUG=123862

Review URL: https://codereview.chromium.org/336263005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@282307 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 months agoAdd tests for TLS fallback on connection reset and close.
davidben@chromium.org [Fri, 27 Jun 2014 01:16:55 +0000 (01:16 +0000)]
Add tests for TLS fallback on connection reset and close.

The reset tests currently fail on OpenSSL and do not work on Android. But
otherwise this gives us slightly better test coverage here.

BUG=372849

Review URL: https://codereview.chromium.org/342793003

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@280188 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 months agoRemove multipart_browsertest.cc
japhet@chromium.org [Wed, 4 Jun 2014 19:57:59 +0000 (19:57 +0000)]
Remove multipart_browsertest.cc

Its only case has been disabled for a couple years, and blink has  since removed
the feature it was testing (multipart main reosurces).

BUG=136310

Review URL: https://codereview.chromium.org/316663003

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@274889 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 months agoPrint out the scheme in the test server.
davidben@chromium.org [Tue, 3 Jun 2014 00:13:08 +0000 (00:13 +0000)]
Print out the scheme in the test server.

So the terminal will auto-linkify and it's much easier to manually point a
browser at a test server instance.

BUG=none

Review URL: https://codereview.chromium.org/312593002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@274386 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 months agoCleanup: Use base::CommandLine in net/
thestig@chromium.org [Tue, 3 Jun 2014 00:01:07 +0000 (00:01 +0000)]
Cleanup: Use base::CommandLine in net/

R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/296513013

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@274378 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 months agoPopulate cert_key_types on OpenSSL.
davidben@chromium.org [Tue, 20 May 2014 21:51:44 +0000 (21:51 +0000)]
Populate cert_key_types on OpenSSL.

Add a test to ensure it gets plumbed through correctly.

This also rolls third_party/openssl to r270417:
------------------------------------------------------------------------
r269864 | davidben@chromium.org | 2014-05-12 16:21:12 -0400 (Mon, 12 May 2014) | 7 lines

Add SSL_get_client_certificate_types.

Exposes the certificate_types parameter in a CertificateRequest.

BUG=165446

Review URL: https://codereview.chromium.org/254723002
------------------------------------------------------------------------
r270417 | davidben@chromium.org | 2014-05-14 12:27:52 -0400 (Wed, 14 May 2014) | 10 lines

Refactor ssl3_send_client_verify.

The original logic was a confusing spaghetti and mixed up initialization for
all the different cases together. Tidy it up in preparation for having to
adjust this logic later to support asynchronous crypto operations.

BUG=none
R=agl@chromium.org

Review URL: https://codereview.chromium.org//284693002
------------------------------------------------------------------------

BUG=165446

Review URL: https://codereview.chromium.org/257513008

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@271765 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoReland r263348: Add False Start tests
davidben@chromium.org [Wed, 16 Apr 2014 23:58:20 +0000 (23:58 +0000)]
Reland r263348: Add False Start tests

Failed on valgrind because it triggered broken timing cases. The original
FakeBlockingStreamSocket changes introduced bugs and didn't quite have the
desired semantics:

- If SetNextReadWouldBlock() gets called while there is a hanging Read(), we
  need to block that one.

- The synchronous Read return + block case was just broken. It forgot to save
  the callback.

Original description:
> Add False Start tests
>
> Tests both that False Start occurs when it should and doesn't
> when it shouldn't.
>
> BUG=354132
>
> Review URL: https://codereview.chromium.org/208293002

BUG=354132,362920

Review URL: https://codereview.chromium.org/237483002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@264356 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoRevert 263348 "Add False Start tests"
zhaoqin@google.com [Sat, 12 Apr 2014 20:44:39 +0000 (20:44 +0000)]
Revert 263348 "Add False Start tests"
BUG=362920
TBR=davidben@chromium.org

> Add False Start tests
>
> Tests both that False Start occurs when it should and doesn't
> when it shouldn't.
>
> BUG=354132
>
> Review URL: https://codereview.chromium.org/208293002

TBR=davidben@chromium.org

Review URL: https://codereview.chromium.org/235873005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@263545 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoAdd False Start tests
davidben@chromium.org [Fri, 11 Apr 2014 20:49:33 +0000 (20:49 +0000)]
Add False Start tests

Tests both that False Start occurs when it should and doesn't
when it shouldn't.

BUG=354132

Review URL: https://codereview.chromium.org/208293002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@263348 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoAdd DHE_RSA support to tlslite.
davidben@chromium.org [Fri, 11 Apr 2014 07:20:26 +0000 (07:20 +0000)]
Add DHE_RSA support to tlslite.

Needed for our test server to be able to False Start.

BUG=354132

Review URL: https://codereview.chromium.org/212883008

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@263169 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoUpdate tlslite to 0.4.6.
davidben@chromium.org [Thu, 10 Apr 2014 17:56:44 +0000 (17:56 +0000)]
Update tlslite to 0.4.6.

This lets us get drop many of our patches. It also adds NPN support for free.
On the downside, it introduces a handful of new bugs that need additional
patches.

BUG=115301

Review URL: https://codereview.chromium.org/210323002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@263026 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 months ago[WebSocket] Fix and enable flaky browser test.
yhirano@chromium.org [Mon, 24 Mar 2014 04:49:23 +0000 (04:49 +0000)]
[WebSocket] Fix and enable flaky browser test.

Fix and enable WebSocketBrowserTest.SecureWebSocketSplitRecords because
Updating pywebsocket fixes the flakiness.

BUG=176867
R=tyoshino

Review URL: https://codereview.chromium.org/205963002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@258874 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 months agoUpdate uses of UTF conversions in courgette/, device/, extensions/, google_apis/...
avi@chromium.org [Wed, 25 Dec 2013 18:18:01 +0000 (18:18 +0000)]
Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media/, net/ to use the base:: namespace.

BUG=330556
TEST=no change
TBR=ben@chromium.org

Review URL: https://codereview.chromium.org/112963005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@242496 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months agoExtract Certificate Transparency SCTs from stapled OCSP responses
ekasper@google.com [Tue, 17 Dec 2013 00:25:51 +0000 (00:25 +0000)]
Extract Certificate Transparency SCTs from stapled OCSP responses

BUG=309578

Review URL: https://codereview.chromium.org/102613006

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@241083 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months ago[Downloads] Update origin info after each response.
asanka@chromium.org [Fri, 13 Dec 2013 22:20:27 +0000 (22:20 +0000)]
[Downloads] Update origin info after each response.

When a download is resumed, a new URL request is sent out. The response
received for this request may contain new ETag and Last-Modified
information which should be used for subsequent resumption attempts.
Otherwise if a resource changes (along with the corresponding ETag)
subsequent partial resumption attempts will all fail even if it should
have succeeded.

BUG=7648

Review URL: https://codereview.chromium.org/74523002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@240773 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months agoRevert of https://codereview.chromium.org/92443002/
szym@chromium.org [Fri, 13 Dec 2013 20:27:14 +0000 (20:27 +0000)]
Revert of https://codereview.chromium.org/92443002/
Reason for revert: Does not compile on CrOS amd64

net/cert/ct_objects_extractor_nss.cc:528:66: error: narrowing conversion (...)
from 'std::basic_string<char>::size_type {aka long unsigned int}' to 'unsigned int'
inside { } is ill-formed in C++11 [-Werror=narrowing]
                      ocsp_response.data())), ocsp_response.size() };

TBR=wtc@chromium.org,rsleevi@chromium.org,ekasper@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/108113006

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@240731 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months agoExtract Certificate Transparency SCTs from stapled OCSP responses
ekasper@google.com [Fri, 13 Dec 2013 19:57:48 +0000 (19:57 +0000)]
Extract Certificate Transparency SCTs from stapled OCSP responses

BUG=309578

Review URL: https://codereview.chromium.org/92443002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@240721 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months agonet: add test for TLS_FALLBACK_SCSV
agl@chromium.org [Wed, 11 Dec 2013 20:16:13 +0000 (20:16 +0000)]
net: add test for TLS_FALLBACK_SCSV

BUG=310768

Review URL: https://codereview.chromium.org/109563002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@240163 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months agoStop using third_party\python_26 for many tests.
maruel@chromium.org [Thu, 5 Dec 2013 17:50:12 +0000 (17:50 +0000)]
Stop using third_party\python_26 for many tests.

Migrate testserver.py from using embedded python in third_party\python_26 to
the python version installed on the system.

Kill many python_26 references.

It reduces the amount of data that needs to be transfered for Windows swarm
slaves.

The remaining uses of third_party\python_26 are:
1. chrome_frame.
2. pyauto needs the python SDK. As such, it needs a "known" python installation.
3. gn.

R=phajdan.jr@chromium.org,rsleevi@chromium.org
BUG=98636
BUG=321703
TEST=

Review URL: https://codereview.chromium.org/74253002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@238989 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months agoAdd support for fetching Certificate Transparency SCTs over a TLS extension
ekasper@google.com [Thu, 28 Nov 2013 13:43:26 +0000 (13:43 +0000)]
Add support for fetching Certificate Transparency SCTs over a TLS extension

BUG=309578

Review URL: https://codereview.chromium.org/83333003

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@237775 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 months ago[Downloads] Don't store or use validators unless they are strong.
asanka@chromium.org [Tue, 26 Nov 2013 16:57:52 +0000 (16:57 +0000)]
[Downloads] Don't store or use validators unless they are strong.

ETag and Last-Modified headers shouldn't be used unless they imply
byte-wise equivalence. While RFC 2616 states that a client 'MAY' use them
anyway, we are going to be conservative and only use them if they are
strong.

BUG=7648

Review URL: https://codereview.chromium.org/67883007

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@237349 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

14 months agoRe-enable all the fragment prerender tests
davidben@chromium.org [Wed, 18 Sep 2013 01:17:38 +0000 (01:17 +0000)]
Re-enable all the fragment prerender tests

They aren't passing at all right now. And with this Blink change, they
should no longer be flaky after being fixed:

https://src.chromium.org/viewvc/blink?revision=157831&view=revision

Also add a new one to test client redirects that should actually prerender.

BUG=83901
TEST=PrerenderBrowserTest.*Fragment*

Review URL: https://chromiumcodereview.appspot.com/23975002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@223761 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

14 months agoUMA data collector for cross-site documents(XSD)
dsjang@chromium.org [Fri, 23 Aug 2013 23:55:37 +0000 (23:55 +0000)]
UMA data collector for cross-site documents(XSD)

Intercept cross-site documents and apply a couple of blocking filters to measure how our cross-site document blocking policy affects the renderer behavior. This doesn't actually block anything, but just records UMA data about how these filters work. It does three things: 1) whitelists legitimate XSDs (responses with whitelisted mime types or with valid CORS headers) 2) applies an appropriate content sniffing algorithm depending on the mime type of the response, 3) if it is sniffed as a blocked document, reports its status code and the context (img, script, etc) where the request is originally issued to measure the compatibility impact of the blocking.

BUG=268640
Related Doc: https://docs.google.com/a/google.com/document/d/1nB3GruRqQmtA7OPZZAhWOsZDvfWpYpKQXE3cxGxTVfs/edit

Review URL: https://chromiumcodereview.appspot.com/22254005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@219383 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

15 months agoAdded POST multipart echo test http server for search-by-image testing.
kkimlabs@chromium.org [Thu, 22 Aug 2013 22:50:55 +0000 (22:50 +0000)]
Added POST multipart echo test http server for search-by-image testing.

BUG=273877

Review URL: https://chromiumcodereview.appspot.com/23112023

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@219135 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

15 months agoRevert 216444 "net: add a test to ensure that our TLS handshake ..."
frankf@chromium.org [Thu, 8 Aug 2013 23:13:38 +0000 (23:13 +0000)]
Revert 216444 "net: add a test to ensure that our TLS handshake ..."

This is failing on Android bots.

> net: add a test to ensure that our TLS handshake doesn't get too large.
>
> (I would like the test to assert that we have some headroom too, but we don't
> have any to assert!)
>
> BUG=none
> R=rsleevi@chromium.org, wtc@chromium.org
>
> Review URL: https://codereview.chromium.org/19557004

TBR=agl@chromium.org

Review URL: https://codereview.chromium.org/22371007

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@216479 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

15 months agonet: add a test to ensure that our TLS handshake doesn't get too large.
agl@chromium.org [Thu, 8 Aug 2013 20:36:08 +0000 (20:36 +0000)]
net: add a test to ensure that our TLS handshake doesn't get too large.

(I would like the test to assert that we have some headroom too, but we don't
have any to assert!)

BUG=none
R=rsleevi@chromium.org, wtc@chromium.org

Review URL: https://codereview.chromium.org/19557004

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@216444 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

15 months agoPerform online revocation checks when EV certificates aren't covered by a fresh CRLSet.
agl@chromium.org [Wed, 31 Jul 2013 21:57:28 +0000 (21:57 +0000)]
Perform online revocation checks when EV certificates aren't covered by a fresh CRLSet.

Previously a fresh CRLSet was sufficient to suppress online revocation checking
for EV certificates because we aimed to have full EV coverage in the CRLSet.

With this change, we'll only suppress online revocation checking for EV
certificates when a fresh CRLSet actually covers the chain in question. We
determine coverage by seeing if the CRLSet contains the issuer SPKI.

There are no changes to the OS X certificate code as I believe that OS X
already does online revocation checking for EV certs no matter what we do in
Chrome.

BUG=none

Review URL: https://chromiumcodereview.appspot.com/11260018

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@214825 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

16 months agoUse a direct include of the message_loop header in net/, part 3.
avi@chromium.org [Thu, 18 Jul 2013 00:41:22 +0000 (00:41 +0000)]
Use a direct include of the message_loop header in net/, part 3.

BUG=260807
TEST=none
TBR=ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19486003

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@212191 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

16 months agoMove PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the...
brettw@chromium.org [Mon, 15 Jul 2013 20:18:09 +0000 (20:18 +0000)]
Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace.

TBR=sky

Review URL: https://codereview.chromium.org/19052005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@211675 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

16 months agoLinux: make net_unittests pass even if m2crypto is present on system
phajdan.jr@chromium.org [Mon, 24 Jun 2013 19:00:38 +0000 (19:00 +0000)]
Linux: make net_unittests pass even if m2crypto is present on system

See https://bugs.gentoo.org/show_bug.cgi?id=426630 for more info.
The behavior of the test server was different depending on whether
m2crypto Python module is available on the system.

BUG=none
R=wtc@chromium.org

Review URL: https://codereview.chromium.org/17143007

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@208247 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

17 months agoDefine a LoggingSettings struct to use for InitLogging()
akalin@chromium.org [Fri, 21 Jun 2013 21:15:33 +0000 (21:15 +0000)]
Define a LoggingSettings struct to use for InitLogging()

Update all callers of InitLogging() to use LoggingSettings, only
setting fields that need a non-default value.

Turn LoggingDestination enum into a bit field and define add
LOG_DEFAULT and LOG_ALL constants.

Fix erroneous comment saying that the default was to not lock
the log file.

BUG=247594
TBR=brettw@chromium.org, cpu@chromium.org, gene@chromium.org, jam@chromium.org, rch@chromium.org, scherkus@chromium.org, sergeyu@chromium.org, sky@chromium.org, tkent@chromium.org, yfriedman@chromium.org, zea@chromium.org

Review URL: https://codereview.chromium.org/16519003

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@207920 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

17 months agoRemove MultipartSlowHandler, since the extension test referencing multipart-slow...
senorblanco@chromium.org [Fri, 14 Jun 2013 06:57:50 +0000 (06:57 +0000)]
Remove MultipartSlowHandler, since the extension test referencing multipart-slow has been removed.

Review URL: https://chromiumcodereview.appspot.com/16860011

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@206342 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

17 months agoUse a direct include of utf_string_conversions.h in net/.
avi@chromium.org [Fri, 7 Jun 2013 18:41:05 +0000 (18:41 +0000)]
Use a direct include of utf_string_conversions.h in net/.

BUG=none
TEST=none
TBR=ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15995039

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@204876 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

18 months agonet: Use base::MessageLoop.
xhwang@chromium.org [Thu, 23 May 2013 20:51:34 +0000 (20:51 +0000)]
net: Use base::MessageLoop.

BUG=236029
R=agl@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14021017

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@201882 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

18 months agoMove SpawnedTestServer to its own subdirectory.
phajdan.jr@chromium.org [Tue, 7 May 2013 20:04:21 +0000 (20:04 +0000)]
Move SpawnedTestServer to its own subdirectory.

This is a part of replacing most usages of the Python test server
with an in-process C++ test server that should be easier to debug.

BUG=96594
R=rch@chromium.org

Review URL: https://codereview.chromium.org/14691006

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@198783 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

18 months agoGTTF: rename net::TestServer -> net::SpawnedTestServer
phajdan.jr@chromium.org [Fri, 3 May 2013 18:57:22 +0000 (18:57 +0000)]
GTTF: rename net::TestServer -> net::SpawnedTestServer

This is a part of replacing most usages of the Python test server
with an in-process C++ test server that should be easier to debug.

BUG=96594
R=rch@chromium.org

Review URL: https://codereview.chromium.org/14702004

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@198151 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

20 months agoRevert 188762 "net: Add more debugging code to diagnose flaky te..."
wjia@chromium.org [Mon, 18 Mar 2013 19:23:44 +0000 (19:23 +0000)]
Revert 188762 "net: Add more debugging code to diagnose flaky te..."

It failed browser_tests on win bots.

> net: Add more debugging code to diagnose flaky testserver failures.
>
> BUG=96594
>
> Review URL: https://codereview.chromium.org/12837005

TBR=phajdan.jr@chromium.org
Review URL: https://codereview.chromium.org/12700019

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@188791 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

20 months agonet: Add more debugging code to diagnose flaky testserver failures.
phajdan.jr@chromium.org [Mon, 18 Mar 2013 17:36:12 +0000 (17:36 +0000)]
net: Add more debugging code to diagnose flaky testserver failures.

BUG=96594

Review URL: https://codereview.chromium.org/12837005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@188762 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

20 months agoPartially integrate filename determination with resumption.
rdsmith@chromium.org [Sat, 16 Mar 2013 09:35:19 +0000 (09:35 +0000)]
Partially integrate filename determination with resumption.

Also substantially increased test coverage.

BUG=7648
R=asanka@chromium.org

Review URL: https://chromiumcodereview.appspot.com/12308011

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@188562 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

20 months agonet: add basic ChannelID support to TLSLite.
agl@chromium.org [Sat, 2 Mar 2013 18:40:41 +0000 (18:40 +0000)]
net: add basic ChannelID support to TLSLite.

In order to test some ChannelID functions, this change adds basic ChannelID
support to testserver and TLSLite. With this change, testserver can receive a
ChannelID and echo its hash on /channel-id.

This code doesn't check the ChannelID signature.

BUG=none
TBR=darin

Review URL: https://chromiumcodereview.appspot.com/12313068

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@185744 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

20 months agoMove file_path.h to base/files.
brettw@chromium.org [Sun, 24 Feb 2013 05:40:52 +0000 (05:40 +0000)]
Move file_path.h to base/files.

TBR=sky

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@184344 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agoSplit out policy code from net/tools/testserver.
mnissler@chromium.org [Tue, 19 Feb 2013 05:13:50 +0000 (05:13 +0000)]
Split out policy code from net/tools/testserver.

This moves the policy-specific code to chrome/browser/policy/cloud/test
and adds LocalPolicyTestServer which simplifies policy test server use
in unit tests.

BUG=chromium:119403
TEST=unit tests
TBR=ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/12235003

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@183159 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agoWhen reading from an SSL socket, attempt to fully fill the caller's buffer
rsleevi@chromium.org [Sat, 16 Feb 2013 04:10:07 +0000 (04:10 +0000)]
When reading from an SSL socket, attempt to fully fill the caller's buffer

The current SSLClientSocket implementation reads one SSL
record at a time, and immediately returns that to the caller
of Read(). As it is a common performance optimization to set
SSL record sizes to fit within MTU, this leads to suboptimal
performance and causes SSLClientSocket::Read() to not
match the behaviour of TCPClientSocket::Read() (which
attempts to fully fill the caller's buffer).

BUG=166903

Review URL: https://chromiumcodereview.appspot.com/12025040

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@182912 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agoVerify the signature on user cloud policy downloads.
joaodasilva@chromium.org [Sat, 16 Feb 2013 00:56:16 +0000 (00:56 +0000)]
Verify the signature on user cloud policy downloads.

The signature on the user cloud policy blob is already verified by the session
manager on ChromeOS, but should also be verified by Chrome before storing new
policy, and after loading policy from the cache.

This is a reland of http://crrev.com/182279.

BUG=174015
TBR=jochen

Review URL: https://chromiumcodereview.appspot.com/12212191

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@182877 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agoRevert 182279 due to failure in CloudPolicyTest.FetchPolicyWithRotatedKey on ChromeOS...
rdsmith@chromium.org [Wed, 13 Feb 2013 20:51:13 +0000 (20:51 +0000)]
Revert 182279 due to failure in CloudPolicyTest.FetchPolicyWithRotatedKey on ChromeOS Asan bots.
> Verify the signature on user cloud policy downloads.
>
> The signature on the user cloud policy blob is already verified by the session
> manager on ChromeOS, but should also be verified by Chrome before storing new
> policy, and after loading policy from the cache.
>
> BUG=174015
>
>
> Review URL: https://chromiumcodereview.appspot.com/12183017

TBR=joaodasilva@chromium.org
Review URL: https://codereview.chromium.org/12255017

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@182302 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agoVerify the signature on user cloud policy downloads.
joaodasilva@chromium.org [Wed, 13 Feb 2013 19:13:33 +0000 (19:13 +0000)]
Verify the signature on user cloud policy downloads.

The signature on the user cloud policy blob is already verified by the session
manager on ChromeOS, but should also be verified by Chrome before storing new
policy, and after loading policy from the cache.

BUG=174015

Review URL: https://chromiumcodereview.appspot.com/12183017

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@182279 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agoReplace FilePath with base::FilePath in net.
brettw@chromium.org [Fri, 8 Feb 2013 20:40:15 +0000 (20:40 +0000)]
Replace FilePath with base::FilePath in net.

Review URL: https://codereview.chromium.org/12218081

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@181543 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agoAdd DeviceRegisterRequest.BROWSER and use it for chrome.
atwilson@chromium.org [Sun, 3 Feb 2013 19:29:41 +0000 (19:29 +0000)]
Add DeviceRegisterRequest.BROWSER and use it for chrome.

BUG=173108

Review URL: https://chromiumcodereview.appspot.com/12082102

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@180316 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 months agodevice_management.py: Send settings_entity_id in responses.
mnissler@chromium.org [Wed, 30 Jan 2013 13:56:09 +0000 (13:56 +0000)]
device_management.py: Send settings_entity_id in responses.

This is required since http://crrev.com/177949, but we missed updating
the test server.

BUG=None
TEST=Public accounts policy fetches work again with the test server.

Review URL: https://chromiumcodereview.appspot.com/12090045

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@179629 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

22 months agoSynchronize sending of RST between server and client to avoid dropping bytes.
rdsmith@chromium.org [Tue, 22 Jan 2013 19:20:29 +0000 (19:20 +0000)]
Synchronize sending of RST between server and client to avoid dropping bytes.

This is to de-flake the DownloadContentTest.ResumeInterruptedDownload test;
Windows drops some bytes on the floor in the case of a 0 second linger close,
which is how we trigger a RST being sent.  To fix this, we do two things:
a) don't send the RST until the client confirms it's received the data, and
b) make sure to send enough data to defeat the buffering in the download
path.

BUG=169882
R=benjhayden@chromium.org
R=cbentzel@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11968026

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@178053 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

22 months ago[sync] Divorce python sync test server chromiumsync.py from testserver.py
rsimha@chromium.org [Sun, 20 Jan 2013 01:10:24 +0000 (01:10 +0000)]
[sync] Divorce python sync test server chromiumsync.py from testserver.py

Various chrome test suites use the infrastructure in net::LocalTestServer and net/tools/testserver.py to create local test server instances against which to run automated tests. Sync tests use reference implementations of sync and xmpp servers, which build on the testserver infrastructure in net/. In the past, the sync testserver was small enough that it made sense for it to be a part of the testserver in net/. This, however, resulted in an unwanted dependency from net/ onto sync/, due to the sync proto modules needed to run a python sync server. Now that the sync testserver has grown considerably in scope, it is time to separate it out from net/ while reusing base testserver code, and eliminate the dependency from net/ onto sync/. This work also provides us with the opportunity to remove a whole bunch of dead pyauto sync test code in chrome/test/functional.

This patch does the following:

- Moves the native class LocalSyncTestServer from net/test/ to sync/test/.
- Moves chromiumsync{_test}.py and xmppserver{_test}.py from net/tools/testserver/ to sync/tools/testserver/.
- Removes all sync server specific code from net/.
- Adds a new sync_testserver.py runner script for the python sync test.
- Moves some base classes from testserver.py to testserver_base.py so they can be reused by sync_testserver.py.
- Audits all the python imports in testserver.py, testserver_base.py and sync_testserver.py to make sure there are no unnecessary / missing imports.
- Adds a new run_sync_testserver runner executable to launch a sync testserver.
- Removes a couple of static methods from LocalTestServer, that were being used by run_testserver, and refactors run_sync_testserver to use their non-static versions.
- Adds the ability to run both chromiumsync_test.py and xmppserver_test.py from run_sync_testserver.
- Fixes chromiumsync.py to undo / rectify some older changes that broke tests in chromiumsync_test.py.
- Adds a new test target called test_support_sync_testserver to sync.gyp.
- Removes the hacky dependency on sync_proto from net.gyp:net_test_support.
- Updates various gyp files across chrome to use the new sync testserver target.
- Audits dependencies of net_test_support, run_testserver, and the newly added targets.
- Fixes the android chrome testserver spawner script to account for the above changes.
- Removes all mentions of TYPE_SYNC from the pyauto TestServer shim.
- Deletes all (deprecated) pyauto sync tests. (They had all become broken over time, gotten disabled, and were all redundant due to their equivalent sync integration tests.)
- Removes all sync related pyauto hooks from TestingAutomationProvider, since they are no longer going to be used.
- Takes care of a TODO in safe_browser_testserver.py to remove an unnecessary code block.

Note: A majority of the bugs listed below are for individual pyauto sync tests. Deleting the sync pyauto test script fixes all these bugs in one fell swoop.

TBR=mattm@chromium.org
BUG=117559, 119403, 159731, 15016, 80329, 49378, 87642, 86949, 88679, 104227, 88593, 124913
TEST=run_testserver, run_sync_testserver, sync_integration_tests, sync_performance_tests. All chrome tests that use a testserver should continue to work.

Review URL: https://codereview.chromium.org/11971025

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@177864 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

22 months agoInitial CL for Downloads resumption.
rdsmith@chromium.org [Sat, 12 Jan 2013 15:57:10 +0000 (15:57 +0000)]
Initial CL for Downloads resumption.

(Original work done by ahendrickson@chromium.org)

BUG=7648
R=ahendrickson@chromium.org
R=asanka@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11571025

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@176530 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

22 months agoMedia Documents should disable View [Page] Source
wolenetz@chromium.org [Wed, 9 Jan 2013 00:38:34 +0000 (00:38 +0000)]
Media Documents should disable View [Page] Source

BUG=83714
TEST=ViewSourceTest.ViewSourceInMenuDisabledOnAMediaPage

Review URL: https://chromiumcodereview.appspot.com/11775002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@175639 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

22 months agoCreate a fresh sync datatype for Synced Notifications
petewil@chromium.org [Thu, 3 Jan 2013 03:22:15 +0000 (03:22 +0000)]
Create a fresh sync datatype for Synced Notifications

BUG=164313

Review URL: https://chromiumcodereview.appspot.com/11441005

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@174927 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months ago[Sync] Add support for keystore key rotation.
zea@chromium.org [Wed, 19 Dec 2012 01:56:52 +0000 (01:56 +0000)]
[Sync] Add support for keystore key rotation.

Key rotation will trigger a full re-encryption of all sync data with the newest
keystore key. Previous keys will be added to the keybag as well. We detect key
rotation by checking whether we have multiple keystore keys and the nigori's
keybag is not encrypted with the current keystore key. In that case, we no
longer support backwards compatibility with non-keystore supporting versions,
and re-encrypt using the newest keystore key.

This change also fixes two latent issues: lack of encryption of the keystore
bootstrap and not properly posting OnPassphraseAccepted when we resolve pending
keys.

BUG=163744

Review URL: https://chromiumcodereview.appspot.com/11434070

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@173830 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months agoChrome now uses policy_type=google/chrome/user.
atwilson@chromium.org [Thu, 13 Dec 2012 22:05:25 +0000 (22:05 +0000)]
Chrome now uses policy_type=google/chrome/user.

BUG=165109

Review URL: https://chromiumcodereview.appspot.com/11564016

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@172974 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months agoRemove support for gdata from the Python test server and net/test.
mtomasz@chromium.org [Thu, 13 Dec 2012 14:04:37 +0000 (14:04 +0000)]
Remove support for gdata from the Python test server and net/test.

Drive related classes' tests do not use the python http test server anymore. Therefore, support for it is removed in this patch.

BUG=164071

Review URL: https://chromiumcodereview.appspot.com/11554018

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@172874 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months ago[Sync] Treat XMPP auth errors as sync auth errors
akalin@chromium.org [Wed, 5 Dec 2012 05:46:28 +0000 (05:46 +0000)]
[Sync] Treat XMPP auth errors as sync auth errors

Add controls for XMPP authentication to XMPP test server.

Add integration test for XMPP auth errors.

Add some DVLOGs to help debugging.

BUG=38091
TEST=

Review URL: https://chromiumcodereview.appspot.com/10703035

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@171172 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months agoHandle broken pipe errors in Python testserver.
bauerb@chromium.org [Tue, 4 Dec 2012 21:21:21 +0000 (21:21 +0000)]
Handle broken pipe errors in Python testserver.

BUG=145734

Review URL: https://chromiumcodereview.appspot.com/11299307

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@171049 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months agoAdd support for public account policy to CloudPolicyClient.
mnissler@chromium.org [Tue, 4 Dec 2012 17:36:00 +0000 (17:36 +0000)]
Add support for public account policy to CloudPolicyClient.

BUG=chromium:152937
TEST=Manual, user policy still works.

Review URL: https://codereview.chromium.org/11434053

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@170991 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months agoUsed shared proto messages for user cloud policies of the same type.
joaodasilva@chromium.org [Wed, 28 Nov 2012 19:41:12 +0000 (19:41 +0000)]
Used shared proto messages for user cloud policies of the same type.

BUG=141368

Review URL: https://chromiumcodereview.appspot.com/11308120

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@170022 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 months agoHack around testserver issues with stdout and stderr on Win XP bots.
mattm@chromium.org [Wed, 28 Nov 2012 07:14:19 +0000 (07:14 +0000)]
Hack around testserver issues with stdout and stderr on Win XP bots.

Re-enable python unbuffered output on win.

Re-enable SafeBrowsingServerTest.

BUG=96459,147368

Review URL: https://chromiumcodereview.appspot.com/11316039

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@169876 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoAdded cloud_policy_browsertest.cc, that tests the cloud policy stack(s) against the...
joaodasilva@chromium.org [Tue, 20 Nov 2012 16:17:15 +0000 (16:17 +0000)]
Added cloud_policy_browsertest.cc, that tests the cloud policy stack(s) against the testserver.

BUG=108928

Review URL: https://chromiumcodereview.appspot.com/11414007

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@168807 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years ago[Sync] Add support for remotely enabling keystore encryption
zea@chromium.org [Thu, 15 Nov 2012 02:43:40 +0000 (02:43 +0000)]
[Sync] Add support for remotely enabling keystore encryption

We hook up logic to the keystore_encryption experiment to enable the
keystore encryption logic. Once the experiment is received, on the next
client restart sync will start using the keystore encryption logic.

BUG=129665

Review URL: https://chromiumcodereview.appspot.com/11266045

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@167829 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoEnable 307 net unit tests on Android.
pliard@chromium.org [Wed, 14 Nov 2012 11:38:55 +0000 (11:38 +0000)]
Enable 307 net unit tests on Android.

This is possible since r167167 landed.

BUG=146979

Review URL: https://chromiumcodereview.appspot.com/11363194

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@167653 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years ago[Sync] Add application logic for non-nigori control types (reland)
zea@chromium.org [Tue, 13 Nov 2012 21:13:50 +0000 (21:13 +0000)]
[Sync] Add application logic for non-nigori control types (reland)

Relanding after revert. Original codereview at
https://chromiumcodereview.appspot.com/11271009/.

BUG=122825
TBR=rlarcoque@chromium.org, akalin@chromium.org

Review URL: https://codereview.chromium.org/11361242

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@167466 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRevert 167280 - [Sync] Add application logic for non-nigori control types.
zea@chromium.org [Tue, 13 Nov 2012 02:02:52 +0000 (02:02 +0000)]
Revert 167280 - [Sync] Add application logic for non-nigori control types.

We introduce logic to apply non-nigori control types. First, we iterate over
any new top level datatype entities, applying those. Then we go through the
rest of the unapplied control datatype updates, applying those. Any conflict
should be just a simple conflict, which we handle by ignoring the local
changes.

Also updates chromiumsync.py to support the new control types (and fixes
the parent folder pattern that was in use).

BUG=122825

Review URL: https://chromiumcodereview.appspot.com/11271009

TBR=zea@chromium.org
Review URL: https://codereview.chromium.org/11359175

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@167282 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years ago[Sync] Add application logic for non-nigori control types.
zea@chromium.org [Tue, 13 Nov 2012 01:43:26 +0000 (01:43 +0000)]
[Sync] Add application logic for non-nigori control types.

We introduce logic to apply non-nigori control types. First, we iterate over
any new top level datatype entities, applying those. Then we go through the
rest of the unapplied control datatype updates, applying those. Any conflict
should be just a simple conflict, which we handle by ignoring the local
changes.

Also updates chromiumsync.py to support the new control types (and fixes
the parent folder pattern that was in use).

BUG=122825

Review URL: https://chromiumcodereview.appspot.com/11271009

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@167280 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years ago[sync] Add Mobile Bookmarks folder to chromiumsync.py
rsimha@chromium.org [Fri, 9 Nov 2012 19:26:06 +0000 (19:26 +0000)]
[sync] Add Mobile Bookmarks folder to chromiumsync.py

With https://chromereviews.googleplex.com/4378012, the python sync
server started serving the Mobile Bookmarks folder to mobile chrome
clients. In the past, we couldn't upstream this change to desktop
because we weren't syncing the Mobile Bookmarks folder to desktop
clients.

As of today, we do sync the folder, and therefore, it makes sense to
upstream the change to the desktop version of chromiumsync.py.

This patch adds the Mobile Bookmarks folder to desktop chromiumsync.py
and fixes TriggerCreateSyncedBookmarks to account for the change.

BUG=b/7337603
TEST=sync_integration_tests

Review URL: https://codereview.chromium.org/11358102

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@166949 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoTry #2.1: Run safebrowsing_service_test through the net testserver code.
mattm@chromium.org [Wed, 7 Nov 2012 23:00:07 +0000 (23:00 +0000)]
Try #2.1: Run safebrowsing_service_test through the net testserver code.

Allows us to use ephemeral ports.

(Relanding the change but with the test still disabled.)

1st review: https://chromiumcodereview.appspot.com/10073033
2nd review: https://chromiumcodereview.appspot.com/10918251

BUG=96459,119403
TBR=rsleevi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11382002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@166540 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRevert 166344 (SafeBrowsingSystemTest fails on XP:
thakis@chromium.org [Wed, 7 Nov 2012 06:57:04 +0000 (06:57 +0000)]
Revert 166344 (SafeBrowsingSystemTest fails on XP:
http://build.chromium.org/p/chromium.win/buildstatus?builder=XP%20Tests%20%281%29&number=21644
http://build.chromium.org/p/chromium.win/buildstatus?builder=XP%20Tests%20%28dbg%29%281%29&number=28760

eg
[10776:10780:1106/215239:1089468:INFO:safe_browsing_test.cc(443)] Start test
browser\safe_browsing\safe_browsing_test.cc(491): error: Value of: ParsePhishingUrls(safe_browsing_helper->response_data(), &phishing_urls)
Actual: false
Expected: true
Google Test trace:
browser\safe_browsing\safe_browsing_test.cc(466): step=2
browser\safe_browsing\safe_browsing_test.cc(492): error: Expected: (phishing_urls.size()) > (0U), actual: 0 vs 0
Google Test trace:
browser\safe_browsing\safe_browsing_test.cc(466): step=2
browser\safe_browsing\safe_browsing_test.cc(517): error: Expected: (safe_browsing_helper->response_data().size()) > (0U), actual: 0 vs 0
Google Test trace:
browser\safe_browsing\safe_browsing_test.cc(466): step=2
browser\safe_browsing\safe_browsing_test.cc(524): error: Value of: safe_browsing_helper->response_data()
Actual: ""
Expected: "yes"

)- Try #2: Run safebrowsing_service_test through the net testserver code.

Allows us to use ephemeral ports.

Original review: https://chromiumcodereview.appspot.com/10073033

BUG=96459,119403

Review URL: https://chromiumcodereview.appspot.com/10918251

TBR=mattm@chromium.org
Review URL: https://codereview.chromium.org/11369114

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@166364 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoTry #2: Run safebrowsing_service_test through the net testserver code.
mattm@chromium.org [Wed, 7 Nov 2012 04:36:07 +0000 (04:36 +0000)]
Try #2: Run safebrowsing_service_test through the net testserver code.

Allows us to use ephemeral ports.

Original review: https://chromiumcodereview.appspot.com/10073033

BUG=96459,119403

Review URL: https://chromiumcodereview.appspot.com/10918251

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@166344 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agotestserver.py: Remove workaround for buildbot
toyoshim@chromium.org [Tue, 6 Nov 2012 07:58:37 +0000 (07:58 +0000)]
testserver.py: Remove workaround for buildbot

Customized checkout didn't allow to import new library, pywebsocket.  Now,
buildbot script supports to checkout pywebsocket as a part of testserver.py.

BUG=155918
TBR=rsleevi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11365103

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@166173 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRemove DeprecationWarning filtering from testserver.py
mattm@chromium.org [Sat, 27 Oct 2012 06:06:28 +0000 (06:06 +0000)]
Remove DeprecationWarning filtering from testserver.py

BUG=none

Review URL: https://chromiumcodereview.appspot.com/10983003

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@164516 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agotestserver.py cleanup
toyoshim@chromium.org [Thu, 25 Oct 2012 03:30:10 +0000 (03:30 +0000)]
testserver.py cleanup

- fix some style errors detected by pylint

BUG=156539
TEST=none

Review URL: https://chromiumcodereview.appspot.com/11236060

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@164009 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agotestserver.py must provide proper error code
toyoshim@chromium.org [Wed, 24 Oct 2012 06:14:38 +0000 (06:14 +0000)]
testserver.py must provide proper error code

main should returns non-zero value for failure cases.
Otherwise, returns zero.
These returning value will be used as exit code.

BUG=156539
TEST=may affects various tests

Review URL: https://chromiumcodereview.appspot.com/11188076

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@163780 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoUpstream Android-specific net/ changes.
newt@chromium.org [Sat, 20 Oct 2012 00:28:35 +0000 (00:28 +0000)]
Upstream Android-specific net/ changes.

BUG=136750

Review URL: https://chromiumcodereview.appspot.com/11191047

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@163107 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agotestserver.py TLS and client auth support on WebSocket.
toyoshim@chromium.org [Thu, 18 Oct 2012 05:05:51 +0000 (05:05 +0000)]
testserver.py TLS and client auth support on WebSocket.

BUG=136950

Review URL: https://chromiumcodereview.appspot.com/11175002

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@162653 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years ago[Sync] Add history delete directive type
akalin@chromium.org [Wed, 17 Oct 2012 08:21:05 +0000 (08:21 +0000)]
[Sync] Add history delete directive type

Add new HISTORY_DELETE_DIRECTIVE model type.  Update everything that
depends on model type.

Rename SyncCryptographer test to Cryptographer (since it's already in sync_unit_tests).

Add EncryptableUserTypes() function and use that instead of UserTypes() for
encryption-related stuff.

BUG=141245
TBR=jam@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10855037

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@162323 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoJust ignore pywebsocket import error in pyauto test.
toyoshim@chromium.org [Tue, 16 Oct 2012 13:52:05 +0000 (13:52 +0000)]
Just ignore pywebsocket import error in pyauto test.

Some try bots fail to import pywebsocket because they don't checkout
pywebsocket repository. This is a temporal workaround to fix pyauto bots.

We should fix them to check it out correctly, later.

BUG=155918
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/11180004

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@162132 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoWebSocket test server migration on ExtensionApiTest.WebSocket (fourth trial)
toyoshim@chromium.org [Sat, 13 Oct 2012 20:52:19 +0000 (20:52 +0000)]
WebSocket test server migration on ExtensionApiTest.WebSocket (fourth trial)

WebSocket test server migration from content::TestWebSocketServer to
net::TestServer.

This is the first change to use net::TestServer as a WebSocket test server.
Other changes will follow to obsoelte content::TestWebSocketServer.

BUG=137639
TEST=browser_tests --gtest_filter='ExtensionApiTest.WebSocket'

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161304

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161542

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161572

Review URL: https://chromiumcodereview.appspot.com/11087027

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@161773 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRevert 161572 - WebSocket test server migration on ExtensionApiTest.WebSocket (third...
mrossetti@chromium.org [Fri, 12 Oct 2012 15:00:12 +0000 (15:00 +0000)]
Revert 161572 - WebSocket test server migration on ExtensionApiTest.WebSocket (third trial)

WebSocket test server migration from content::TestWebSocketServer to
net::TestServer.

This is the first change to use net::TestServer as a WebSocket test server.
Other changes will follow to obsoelte content::TestWebSocketServer.

BUG=137639
TEST=browser_test --gtest_filter='ExtensionApiTest.WebSocket'

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161304

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161542

Review URL: https://chromiumcodereview.appspot.com/11087027

TBR=toyoshim@chromium.org
Review URL: https://codereview.chromium.org/11115011

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@161575 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoWebSocket test server migration on ExtensionApiTest.WebSocket (third trial)
toyoshim@chromium.org [Fri, 12 Oct 2012 14:02:25 +0000 (14:02 +0000)]
WebSocket test server migration on ExtensionApiTest.WebSocket (third trial)

WebSocket test server migration from content::TestWebSocketServer to
net::TestServer.

This is the first change to use net::TestServer as a WebSocket test server.
Other changes will follow to obsoelte content::TestWebSocketServer.

BUG=137639
TEST=browser_test --gtest_filter='ExtensionApiTest.WebSocket'

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161304

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161542

Review URL: https://chromiumcodereview.appspot.com/11087027

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@161572 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRevert 161542 - WebSocket test server migration on ExtensionApiTest.WebSocket (retry)
kochi@chromium.org [Fri, 12 Oct 2012 10:08:09 +0000 (10:08 +0000)]
Revert 161542 - WebSocket test server migration on ExtensionApiTest.WebSocket (retry)

WebSocket test server migration from content::TestWebSocketServer to
net::TestServer.

This is the first change to use net::TestServer as a WebSocket test server.
Other changes will follow to obsoelte content::TestWebSocketServer.

BUG=137639
TEST=browser_test --gtest_filter='ExtensionApiTest.WebSocket'

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161304

Review URL: https://chromiumcodereview.appspot.com/11087027

TBR=toyoshim@chromium.org
Review URL: https://codereview.chromium.org/11114015

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@161549 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoWebSocket test server migration on ExtensionApiTest.WebSocket (retry)
toyoshim@chromium.org [Fri, 12 Oct 2012 09:19:30 +0000 (09:19 +0000)]
WebSocket test server migration on ExtensionApiTest.WebSocket (retry)

WebSocket test server migration from content::TestWebSocketServer to
net::TestServer.

This is the first change to use net::TestServer as a WebSocket test server.
Other changes will follow to obsoelte content::TestWebSocketServer.

BUG=137639
TEST=browser_test --gtest_filter='ExtensionApiTest.WebSocket'

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161304

Review URL: https://chromiumcodereview.appspot.com/11087027

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@161542 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRevert 161304 - WebSocket test server migration on ExtensionApiTest.WebSocket
toyoshim@chromium.org [Thu, 11 Oct 2012 07:01:21 +0000 (07:01 +0000)]
Revert 161304 - WebSocket test server migration on ExtensionApiTest.WebSocket

WebSocket test server migration from content::TestWebSocketServer to
net::TestServer.

This is the first change to use net::TestServer as a WebSocket test server.
Other changes will follow to obsoelte content::TestWebSocketServer.

BUG=137639
TEST=browser_test --gtest_filter='ExtensionApiTest.WebSocket'

Review URL: https://chromiumcodereview.appspot.com/11087027

TBR=toyoshim@chromium.org
Review URL: https://codereview.chromium.org/11091059

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@161308 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoWebSocket test server migration on ExtensionApiTest.WebSocket
toyoshim@chromium.org [Thu, 11 Oct 2012 06:10:46 +0000 (06:10 +0000)]
WebSocket test server migration on ExtensionApiTest.WebSocket

WebSocket test server migration from content::TestWebSocketServer to
net::TestServer.

This is the first change to use net::TestServer as a WebSocket test server.
Other changes will follow to obsoelte content::TestWebSocketServer.

BUG=137639
TEST=browser_test --gtest_filter='ExtensionApiTest.WebSocket'

Review URL: https://chromiumcodereview.appspot.com/11087027

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@161304 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoLaunch pywebsocket via net::TestServer
toyoshim@chromium.org [Tue, 9 Oct 2012 03:43:19 +0000 (03:43 +0000)]
Launch pywebsocket via net::TestServer

BUG=137639

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=156742

Review URL: https://chromiumcodereview.appspot.com/10879029

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@160782 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRemove Python < 2.6 compatibility imports from testserver.py.
mattm@chromium.org [Sun, 23 Sep 2012 00:06:27 +0000 (00:06 +0000)]
Remove Python < 2.6 compatibility imports from testserver.py.

Split out of https://chromiumcodereview.appspot.com/10073033.

BUG=none
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/10909251

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@158196 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRevert 156742 - Launch pywebsocket via net::TestServer
peter@chromium.org [Fri, 14 Sep 2012 09:38:25 +0000 (09:38 +0000)]
Revert 156742 - Launch pywebsocket via net::TestServer
The mod_pywebsocket.standalone module cannot be imported on the Chromium OS
bots. Example output is available here:
http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28amd64%29/builds/4069/steps/VMTest/logs/stdio

BUG=137639

Review URL: https://chromiumcodereview.appspot.com/10879029

TBR=toyoshim@chromium.org
Review URL: https://codereview.chromium.org/10913268

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@156772 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoLaunch pywebsocket via net::TestServer
toyoshim@chromium.org [Fri, 14 Sep 2012 04:22:46 +0000 (04:22 +0000)]
Launch pywebsocket via net::TestServer

BUG=137639

Review URL: https://chromiumcodereview.appspot.com/10879029

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@156742 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoReland: Take 2: Force python test server output to be unbuffered, so it doesn't mix...
rsimha@google.com [Wed, 12 Sep 2012 21:53:15 +0000 (21:53 +0000)]
Reland: Take 2: Force python test server output to be unbuffered, so it doesn't mix with gtest output

In browser tests that use a local python server, the python output in
the test logs sometimes overlaps with gtest output, resulting in gtest
falsely detecting passing tests as incomplete. This is a result of
python's default use of buffered output, which gets written to the log
file out of order.

This patch forces the python process for local test servers to use
unbuffered mode via the -u switch. This way, by the time gtest is ready
to log a passing test, all testserver output is already written to the
log file.

Update: The win xp bots were adversely affected by the -u switch, so we now
apply it only for mac and linux, which is where the original problem was found.

BUG=147368
TEST=See sync integration test output when it is redirected to a log file, and make sure there are no false negatives.

Originally committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=156361

Review URL: https://codereview.chromium.org/10907162

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@156389 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoRevert 156361 - Take 2: Force python test server output to be unbuffered, so it doesn...
rsimha@google.com [Wed, 12 Sep 2012 21:17:21 +0000 (21:17 +0000)]
Revert 156361 - Take 2: Force python test server output to be unbuffered, so it doesn't mix with gtest output

In browser tests that use a local python server, the python output in
the test logs sometimes overlaps with gtest output, resulting in gtest
falsely detecting passing tests as incomplete. This is a result of
python's default use of buffered output, which gets written to the log
file out of order.

This patch forces the python process for local test servers to use
unbuffered mode via the -u switch. This way, by the time gtest is ready
to log a passing test, all testserver output is already written to the
log file.

BUG=147368
TEST= See sync integration test output when it is redirected to a log file, and make sure there are no false negatives.

Review URL: https://chromiumcodereview.appspot.com/10907162

TBR=rsimha@google.com
Review URL: https://codereview.chromium.org/10911264

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@156376 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoTake 2: Force python test server output to be unbuffered, so it doesn't mix with...
rsimha@google.com [Wed, 12 Sep 2012 20:12:46 +0000 (20:12 +0000)]
Take 2: Force python test server output to be unbuffered, so it doesn't mix with gtest output

In browser tests that use a local python server, the python output in
the test logs sometimes overlaps with gtest output, resulting in gtest
falsely detecting passing tests as incomplete. This is a result of
python's default use of buffered output, which gets written to the log
file out of order.

This patch forces the python process for local test servers to use
unbuffered mode via the -u switch. This way, by the time gtest is ready
to log a passing test, all testserver output is already written to the
log file.

BUG=147368
TEST= See sync integration test output when it is redirected to a log file, and make sure there are no false negatives.

Review URL: https://chromiumcodereview.appspot.com/10907162

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@156361 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoUse HttpAuthController in SocketStream
bashi@chromium.org [Sat, 8 Sep 2012 17:37:24 +0000 (17:37 +0000)]
Use HttpAuthController in SocketStream

We need to share http auth cache with http stack because WebSocket is a
subresource and chromium won't show the login dialog for subresource
loading. Use HttpAuthController and pass the common http auth cache to
it to solve the issue.

BUG=47069
TEST=net_unittests

Review URL: https://chromiumcodereview.appspot.com/10854139

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@155582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 years agoUpstream setting flag for outgoing favicon sync.
nyquist@chromium.org [Fri, 7 Sep 2012 20:33:58 +0000 (20:33 +0000)]
Upstream setting flag for outgoing favicon sync.

Android does not support experiments or about:flags, so we need to
set the command line flag directly to enable outgoing favicon sync.

Also, this repurposes the old sync_tabs experiments to the new
sync_favicon_tabs experiment in the sync test server.

BUG=141688

Review URL: https://chromiumcodereview.appspot.com/10908082

git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@155470 4ff67af0-8c30-449e-8e8b-ad334ec8d88c