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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
mattm@chromium.org [Wed, 5 Sep 2012 01:24:29 +0000 (01:24 +0000)]
Revert 154861 - Run safebrowsing_service_test through the net testserver code.
Allows us to use ephemeral ports.
Also run the testserver.py python process with -u to avoid buffering issues.
BUG=96459,119403
TEST=none
Review URL: https://chromiumcodereview.appspot.com/
10073033
TBR=mattm@chromium.org
Review URL: https://chromiumcodereview.appspot.com/
10905087
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@154875
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
mattm@chromium.org [Wed, 5 Sep 2012 00:19:41 +0000 (00:19 +0000)]
Run safebrowsing_service_test through the net testserver code.
Allows us to use ephemeral ports.
Also run the testserver.py python process with -u to avoid buffering issues.
BUG=96459,119403
TEST=none
Review URL: https://chromiumcodereview.appspot.com/
10073033
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@154861
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
mnissler@chromium.org [Thu, 23 Aug 2012 23:56:03 +0000 (23:56 +0000)]
Fix None checks in device_management.py
These may otherwise fail, e.g. when PyCrypto compares a key to None.
TEST=Compiles and passes tests.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/
10869009
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@153113
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
toyoshim@chromium.org [Thu, 23 Aug 2012 01:05:12 +0000 (01:05 +0000)]
Refactoring for merging WebSocket test server to net::TestServer
- rename HTTPSOptions to SSLOptions
- pass an argument for secure server to specify the service protocol type
BUG=137639
Review URL: https://chromiumcodereview.appspot.com/
10878003
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@152902
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
zea@chromium.org [Tue, 31 Jul 2012 19:44:25 +0000 (19:44 +0000)]
[Sync] Add support for performing a GetKey on startup.
The functionality is behind the --sync-keystore-encryption flag, and the key
is not currently consumed by anything, but this lays the groundwork for testing
the server and client interaction.
We request a key anytime we perform a GetUpdates while the cryptographer
does not have a keystore key. But, it is considered an error to request a key
and not receive one, putting us into a state of backoff.
BUG=129665
TEST=sync_unit_tests, running against python server
Review URL: https://chromiumcodereview.appspot.com/
10455012
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@149248
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
mattm@chromium.org [Sat, 30 Jun 2012 00:52:08 +0000 (00:52 +0000)]
Set the system network delegate on the SystemURLRequestContext.
Fixes SafeBrowsingURLRequestContext not sending cookies.
(The SafeBrowsingURLRequestContext copies its base settings from the system request context.)
BUG=134277
TEST=check net-internals event log for safebrowsing url_request events. Cookies should be sent.
Review URL: https://chromiumcodereview.appspot.com/
10657013
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@145044
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Fri, 29 Jun 2012 17:54:06 +0000 (17:54 +0000)]
net: add support for testing OCSP unauthorized and unknown statuses
This doesn't actually add any tests that exercise this yet because none of our
certificate verification libraries treat these differently from "no status".
But it might be useful in the future.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/
10695029
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@144928
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
akalin@chromium.org [Thu, 28 Jun 2012 20:55:29 +0000 (20:55 +0000)]
Clarify comments in net/tools/testserver/OWNERS
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/
10700021
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@144793
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
shalev@chromium.org [Thu, 14 Jun 2012 22:40:34 +0000 (22:40 +0000)]
Don't crash when confronted with many set-cookie headers.
Process cookies in a loop instead of via recursion when SetCookieWithOptionsAsync completes synchronously.
BUG=109388
TEST=URLRequestTestHTTP.GetTest_ManyCookies
Review URL: https://chromiumcodereview.appspot.com/
10447092
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@142253
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
rsimha@chromium.org [Thu, 24 May 2012 20:40:21 +0000 (20:40 +0000)]
[sync] Add --port and --xmpp-port parameters to run_testserver.cc
run_testserver is a useful test utility that launches a python
testserver after setting the required python path.
When it is used to start a sync testserver, the only parameter it
supports is --sync, indicating that we want a sync server. It doesn't
support the --port and --xmpp-port flags, that are used to specify the
ports on which we want the sync server and sync xmpp server to run.
This patch adds the parameters to run_testserver.cc and plumbs them down
to the TestServer objects created by run_testserver.cc. It also separates out
sync specific testserver code into a new class called LocalSyncTestServer.
Separating the sync server in python code is out of the scope of this CL
because it requires significant refactoring, since it is in use on multiple
platforms, and will be dealt with separately.
BUG= 117559
TEST=Build and run run_testserver with the paramters --sync, --port and --xmpp-port
Review URL: https://chromiumcodereview.appspot.com/
10388206
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@138878
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
wtc@chromium.org [Wed, 23 May 2012 18:32:23 +0000 (18:32 +0000)]
Improve the TLS intolerant server testing support added in r134129
(http://codereview.chromium.org/
10218007).
Add the ability to simulate a server that is intolerant of only a
particular version of TLS. This will allow us to test the handling
of a TLS 1.1 intolerant server.
R=agl@chromium.org,phajdan.jr@chromium.org
BUG=126340
TEST=none
Review URL: https://chromiumcodereview.appspot.com/
10412042
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@138537
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Thu, 26 Apr 2012 18:45:34 +0000 (18:45 +0000)]
net: don't remember TLS intolerant servers.
I've seen a couple of reports recently where is was clear that an SNI-only
hostname had ended up in the list of TLS-intolerant servers. The result is that
the user sees the non-SNI certificate for that IP address, which doesn't match
the requested hostname. The only way to clear this is to restart Chrome.
This change partly reverts r45088 so that we will no longer remember
TLS-intolerant servers. This means that we'll perform SSLv3 fallback for every
connection, if needed. That's unfortunate for truly TLS-intolerant servers, but
it also means that we'll get back to TLS much faster in the event of a
transient network error trigger fallback.
BUG=none
TEST=net_unittests
Review URL: http://codereview.chromium.org/
10218007
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@134129
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Tue, 24 Apr 2012 16:33:41 +0000 (16:33 +0000)]
testserver: pass options through bytes() before using with binary data.
Previously the arguments to GenerateCertKeyAndOCSP were used in operations with
binary data directly. If they were unicode objects then their encoding may not
have supported the DER data causing an error.
By passing through bytes(), we get a str object and we make it clear that we'll
be using this with binary data.
BUG=119642
TEST=net_unittests
Review URL: http://codereview.chromium.org/
10188005
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@133704
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
joi@chromium.org [Mon, 23 Apr 2012 23:09:50 +0000 (23:09 +0000)]
Remove X-Retry-After support.
This is part of simplifying URLRequestThrottler* now that it is
specific to extensions. It also appears that nobody is using this
header.
BUG=119760
Review URL: http://codereview.chromium.org/
10190002
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@133558
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
maruel@chromium.org [Mon, 23 Apr 2012 14:16:51 +0000 (14:16 +0000)]
Reset the svn:executable bit on scripts that are not executable.
R=nick@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/
10139027
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@133438
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
rlarocque@chromium.org [Sat, 24 Mar 2012 02:17:30 +0000 (02:17 +0000)]
sync: Count and report reflected updates
Many of the updates a sync client receives are echoes of its own
changes. This patch attempts to count how often these updates are
received by comparing the version of downloaded updates against the
local version.
These counts are exposed locally through AllStatus/about:sync. We also
upload this information to the server through the ClientDebugInfo
mechanism.
BUG=117565
TEST=
Review URL: http://codereview.chromium.org/9702083
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@128659
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
joaodasilva@chromium.org [Fri, 23 Mar 2012 13:50:27 +0000 (13:50 +0000)]
Retry the auto-enrollment check when the server asks for a smaller modulus.
BUG=chromium-os:28062
TEST=Send more bits with --enterprise-enrollment-initial-modulus than the server expects. AE still succeeds.
Review URL: http://codereview.chromium.org/9835021
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@128475
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
pastarmovj@chromium.org [Thu, 22 Mar 2012 18:37:19 +0000 (18:37 +0000)]
Add a few owners for net/tools/testserver.
For device_management.py only
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9839002
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@128256
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
pastarmovj@chromium.org [Thu, 22 Mar 2012 16:35:03 +0000 (16:35 +0000)]
Rename enterprise policy proto fields from KIOSK to RETAIL.
R=mnissler@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9814011
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@128226
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Tue, 20 Mar 2012 15:14:27 +0000 (15:14 +0000)]
Revert "Revert "Revert "Revert "net: add OCSP tests.""""
(First landed in r127486, reverted in r127493 because it broke on
Windows XP, relanded in r127518 and reverted in r127520 because Android got
upset about an unused function.)
I was getting increasingly unhappy altering EV and revocation checking
semantics without any tests. We historically haven't had tests because
online revocation checking is inherently flaky so I amended testserver
with the minimum code to be able to sign and vend OCSP responses.
These tests do not test the final EV/CRLSet/revocation checking
semantics. They are intended to be altered in future CLs.
BUG=none
TEST=net_unittests
https://chromiumcodereview.appspot.com/9663017/
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127680
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Mon, 19 Mar 2012 20:32:47 +0000 (20:32 +0000)]
Revert "Revert "Revert "net: add OCSP tests."""
This reverts commit r127518.
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127520
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Mon, 19 Mar 2012 20:19:47 +0000 (20:19 +0000)]
Revert "Revert "net: add OCSP tests.""
(First landed in r127486, reverted in r127493 because it broke on
Windows XP.)
I was getting increasingly unhappy altering EV and revocation checking
semantics without any tests. We historically haven't had tests because
online revocation checking is inherently flaky so I amended testserver
with the minimum code to be able to sign and vend OCSP responses.
These tests do not test the final EV/CRLSet/revocation checking
semantics. They are intended to be altered in future CLs.
BUG=none
TEST=net_unittests
https://chromiumcodereview.appspot.com/9663017/
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127518
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Mon, 19 Mar 2012 17:18:07 +0000 (17:18 +0000)]
Revert "net: add OCSP tests."
This reverts commit r127486. Looks like it's broken on Windows XP only.
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127493
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
agl@chromium.org [Mon, 19 Mar 2012 16:23:30 +0000 (16:23 +0000)]
net: add OCSP tests.
I was getting increasingly unhappy altering EV and revocation checking
semantics without any tests. We historically haven't had tests because
online revocation checking is inherently flaky so I amended testserver
with the minimum code to be able to sign and vend OCSP responses.
These tests do not test the final EV/CRLSet/revocation checking
semantics. They are intended to be altered in future CLs.
BUG=none
TEST=net_unittests
https://chromiumcodereview.appspot.com/9663017/
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127486
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
fischman@chromium.org [Fri, 16 Mar 2012 20:57:26 +0000 (20:57 +0000)]
Don't trigger second request on missing instance size in Content-Range.
Previously we were relying on the parser for multipart/x-mixed-replace to parse Content-Range. This CL instead introduces a parser that implements HTTP/1.1 (allowing instance-size to be "*").
BUG=104795
Review URL: http://codereview.chromium.org/9703073
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127232
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
joaodasilva@chromium.org [Fri, 16 Mar 2012 18:04:16 +0000 (18:04 +0000)]
Extended policy device_management support at the testserver to handle lists of protobufs.
BUG=None
TEST=The testserver can be used to push the AppPack device policy
Review URL: https://chromiumcodereview.appspot.com/9703116
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127201
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
zea@chromium.org [Fri, 16 Mar 2012 04:24:18 +0000 (04:24 +0000)]
[Sync] Add support for associating a new Synced Bookmarks node.
Previously we would result in an unrecoverable error when the server sends
us a newly created Synced Bookmarks node. We now properly detect and associate
it, allowing us to also associate new bookmarks created under the Synced
Bookmarks folder.
In addition, we soften our conditions for unrecoverable errors. A bookmark
that cannot be added is ignored, instead of triggering an error. There are
very few of these, and are likely triggered by a crash during initial
association.
BUG=108978
TEST=sync_integration_tests
Review URL: http://codereview.chromium.org/9570055
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@127101
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
tim@chromium.org [Thu, 15 Mar 2012 05:13:30 +0000 (05:13 +0000)]
Add "run_testserver --sync-test" for easy chromiumsync_test.py launching.
BUG=none
TEST=type that command. see tests run.
Review URL: https://chromiumcodereview.appspot.com/9545019
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@126847
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
satorux@chromium.org [Wed, 7 Mar 2012 18:08:41 +0000 (18:08 +0000)]
Add the first version of GDataTest.
This CL introduces a browsertest case for gdata by introducing the following
changes:
- testserver: add GDataHandler and TYPE_GDATA.
- InProcessBrowserTest: allow invoking customized test server.
- gdata_browsertest.cc: actual test code. Currently it only covers
a part of full APIs, to make sure if my current approach is looking okay.
BUG=chromium-os:26355
TEST=passed locally
Review URL: https://chromiumcodereview.appspot.com/9597014
Patch from Jun Mukai <mukai@chromium.org>.
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@125404
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
tim@chromium.org [Sun, 4 Mar 2012 23:33:36 +0000 (23:33 +0000)]
sync: remove use of protobuf extensions in protocol to reduce static init overhead.
Instead, we now use optional fields in EntitySpecifics. Because the tag numbers remain
the same, this is a wire-format compatible change.
This incurs a (#datatypes * sizeof(void*))*#sync_items memory cost, due to storing extra pointers. In practice, for a typical account on windows this amounts to < 200k, and the static init cost is believed to be greater.
Note - upcoming features in protobufs may let us eliminate this extra memory overhead.
Also: The testserver tests were broken on ToT due to a bug in _SaveEntry's saving of mtime which is fixed in this patch.
TBR=yoz@chromium.org
TBR=mnissler@chromium.org
TBR=pkasting@chromium.org
TBR=georgey@chromium.org
BUG=94992, 94925
Review URL: http://codereview.chromium.org/9460047
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@124912
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
rsleevi@chromium.org [Fri, 2 Mar 2012 14:58:02 +0000 (14:58 +0000)]
Support reading PEM files in TLSLite
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9515015
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@124637
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
erikwright@chromium.org [Fri, 24 Feb 2012 23:05:30 +0000 (23:05 +0000)]
Update clients to use new TestServer constructor.
BUG=114369
TEST=tests all pass
Review URL: http://codereview.chromium.org/9372065
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@123572
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
pastarmovj@chromium.org [Fri, 24 Feb 2012 12:38:26 +0000 (12:38 +0000)]
Add the registration mode field to the protobuf.
Make the test dm server send the new register response.
BUG=chromium-os:26248
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9404006
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@123467
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
erikwright@chromium.org [Wed, 22 Feb 2012 16:41:10 +0000 (16:41 +0000)]
Add '--host' option to testserver.py and expose it via a new TestServer constructor.
By default the value 127.0.0.1 is used (this is also the default if no option is passed to the testserver.py script). For HTTPS cert mismatch tests, the value localhost is used. This causes the server to listen on localhost/127.0.0.1 but causes the client to expect a cert matching localhost (this corresponds to the previous behaviour).
BUG=114369
TEST=net_unittests still pass
Review URL: http://codereview.chromium.org/9369029
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@123040
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
phajdan.jr@chromium.org [Thu, 16 Feb 2012 09:48:53 +0000 (09:48 +0000)]
Add myself to OWNERS for Python test server.
BUG=none
Review URL: http://codereview.chromium.org/9404017
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@122265
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
benjhayden@chromium.org [Tue, 14 Feb 2012 23:29:37 +0000 (23:29 +0000)]
Retry r121912 downloads.onChanged
http://codereview.chromium.org/8203005/
Review URL: http://codereview.chromium.org/9395021
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@121966
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
vollick@google.com [Tue, 14 Feb 2012 19:49:14 +0000 (19:49 +0000)]
Revert 121912 - Implement chrome.experimental.downloads.onChanged
Attempting to fix leak in DownloadProtectionServiceTest.CheckClientDownloadValidateRequest
ExtensionDownloadsEventRouter now also observes all DownloadItems and dispatches onChanged events.
Download.OnChanged records the percentage of OnDownloadUpdated() calls that are propagated as onChanged events instead of being suppressed.
BUG=12133
Review URL: http://codereview.chromium.org/8203005
TBR=benjhayden@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9360051
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@121915
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c
benjhayden@chromium.org [Tue, 14 Feb 2012 19:14:50 +0000 (19:14 +0000)]
Implement chrome.experimental.downloads.onChanged
ExtensionDownloadsEventRouter now also observes all DownloadItems and dispatches onChanged events.
Download.OnChanged records the percentage of OnDownloadUpdated() calls that are propagated as onChanged events instead of being suppressed.
BUG=12133
Review URL: http://codereview.chromium.org/8203005
git-svn-id: http://src.chromium.org/svn/trunk/src/net/tools/testserver@121912
4ff67af0-8c30-449e-8e8b-
ad334ec8d88c