summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 05:52:50 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 05:52:50 +0000
commit9c1e358585de9ac4503e2b7ffe49685c8b628a6f (patch)
tree4a6e033b617dd76e42d2dda238070bbc3c616f50 /chrome/browser
parent12c68c2f1f05cd8fbe453694b4c04ac25d08c1a8 (diff)
downloadchromium_src-9c1e358585de9ac4503e2b7ffe49685c8b628a6f.zip
chromium_src-9c1e358585de9ac4503e2b7ffe49685c8b628a6f.tar.gz
chromium_src-9c1e358585de9ac4503e2b7ffe49685c8b628a6f.tar.bz2
Python implementation of sync server, for testing.
Implement the server side of chromium sync inside of testserver.py. The implementation supports at most one account (and ignores authentication credentials), but is otherwise reasonably full featured. Make the sync_integration_tests run by default against the test server. An externally-provided --sync-url will give the old behavior. Protocol buffers stuff: The test sync server requires Python generated code for .proto files. I've put generated code, as well as the python protocol buffers runtime library, in the output directory + "/python" (e.g, on windows, src/chrome/Debug/python/google/protobuf). This might be a bad place, or a bad name -- open to suggestions. The main thing is that there will be run-time dependencies on it, so it didn't seem right to put it in obj/. Flakiness fix: In the InProcessBrowserTest framework, improve the mechanism for tests that want to manually set up a user data directory. The new way ensures that the user data directory is always wiped; tests can't accidentally forget to do this anymore. Flakiness fix: Make testserver try to /kill any old instance that might be hogging the port. Very useful if a test failure leaves a server running. Tested this against all combos of protocols, and it seems to work. Flakiness fix: Port sync_integration_tests to the out-of-process test runner. Flakiness fix: For IN_PROC_BROWSER_TESTS, don't run the test body if the setup triggered a fatal (ASSERT_) failure. BUG=20905,40980 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44708 Review URL: http://codereview.chromium.org/1622012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc2
-rwxr-xr-xchrome/browser/sync/protocol/sync_proto.gyp73
2 files changed, 74 insertions, 1 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index dbf2272..5003202 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -519,7 +519,7 @@ void ProfileSyncService::ChangePreferredDataTypes(
void ProfileSyncService::GetPreferredDataTypes(
syncable::ModelTypeSet* preferred_types) const {
- preferred_types->clear();
+ preferred_types->clear();
// Filter out any datatypes which aren't registered, or for which
// the preference can't be read.
diff --git a/chrome/browser/sync/protocol/sync_proto.gyp b/chrome/browser/sync/protocol/sync_proto.gyp
new file mode 100755
index 0000000..2b95ee8
--- /dev/null
+++ b/chrome/browser/sync/protocol/sync_proto.gyp
@@ -0,0 +1,73 @@
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'targets': [
+ {
+ # Protobuf compiler / generate rule for sync.proto. This is used by
+ # test code in net, which is why it's isolated into its own .gyp file.
+ 'target_name': 'sync_proto',
+ 'type': 'none',
+ 'sources': [
+ 'sync.proto',
+ 'autofill_specifics.proto',
+ 'bookmark_specifics.proto',
+ 'preference_specifics.proto',
+ 'theme_specifics.proto',
+ 'typed_url_specifics.proto',
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'genproto',
+ 'extension': 'proto',
+ 'inputs': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/pyproto/sync_pb/<(RULE_INPUT_ROOT)_pb2.py',
+ '<(SHARED_INTERMEDIATE_DIR)/protoc_out/chrome/browser/sync/protocol/<(RULE_INPUT_ROOT).pb.h',
+ '<(SHARED_INTERMEDIATE_DIR)/protoc_out/proto/chrome/browser/sync/protocol/<(RULE_INPUT_ROOT).pb.cc',
+ ],
+ 'action': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ '--proto_path=.',
+ './<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
+ '--cpp_out=<(SHARED_INTERMEDIATE_DIR)/protoc_out/chrome/browser/sync/protocol',
+ '--python_out=<(PRODUCT_DIR)/pyproto/sync_pb',
+ ],
+ 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)',
+ },
+ ],
+ 'dependencies': [
+ '../../../../third_party/protobuf2/protobuf.gyp:protoc#host',
+ ],
+ },
+ {
+ 'target_name': 'sync_proto_cpp',
+ 'type': 'none',
+ 'export_dependent_settings': [
+ '../../../../third_party/protobuf2/protobuf.gyp:protobuf_lite',
+ 'sync_proto',
+ ],
+ 'dependencies': [
+ '../../../../third_party/protobuf2/protobuf.gyp:protobuf_lite',
+ 'sync_proto',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
+ ],
+ },
+ },
+ ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2: