Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / android / host_driven_tests / SyncTest.py
blob73d34c8374fe8c609682cf918d9fd7f7fb4268ab
1 #!/usr/bin/python
2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 """Host-driven Java tests which exercise sync functionality."""
8 from pylib import constants
9 from pylib.host_driven import test_case
10 from pylib.host_driven import test_server
11 from pylib.host_driven import tests_annotations
14 class SyncTest(test_case.HostDrivenTestCase):
15 """Host-driven Java tests which exercise sync functionality."""
17 def __init__(self, *args, **kwargs):
18 super(SyncTest, self).__init__(*args, **kwargs)
19 self.test_server = None
20 self.additional_flags = []
22 def SetUp(self, device, shard_index, push_deps, cleanup_test_files):
23 self.test_server = test_server.TestServer(
24 shard_index,
25 constants.TEST_SYNC_SERVER_PORT,
26 test_server.TEST_SYNC_SERVER_PATH)
27 # These ought not to change in the middle of a test for obvious reasons.
28 self.additional_flags = [
29 '--sync-url=http://%s:%d/chromiumsync' %
30 (self.test_server.host, self.test_server.port)]
31 super(SyncTest, self).SetUp(device, shard_index, push_deps,
32 cleanup_test_files,
33 [self.test_server.port])
35 def TearDown(self):
36 super(SyncTest, self).TearDown()
37 self.test_server.TearDown()
39 def _RunSyncTests(self, test_names):
40 full_names = []
41 for test_name in test_names:
42 full_names.append('SyncTest.' + test_name)
43 return self._RunJavaTestFilters(full_names, self.additional_flags)
45 # Disabled for http://crbug.com/329757
46 # @tests_annotations.Feature(['Sync'])
47 # @tests_annotations.EnormousTest
48 @tests_annotations.DisabledTest
49 def testGetAboutSyncInfoYieldsValidData(self):
50 java_tests = ['testGetAboutSyncInfoYieldsValidData']
51 return self._RunSyncTests(java_tests)
53 # Disabled for http://crbug.com/309997
54 # @tests_annotations.Feature(['Sync'])
55 # @tests_annotations.EnormousTest
56 @tests_annotations.DisabledTest
57 def testAboutSyncPageDisplaysCurrentSyncStatus(self):
58 java_tests = ['testAboutSyncPageDisplaysCurrentSyncStatus']
59 return self._RunSyncTests(java_tests)
61 # Disabled for http://crbug.com/311091
62 # @tests_annotations.Feature(['Sync'])
63 # @tests_annotations.EnormousTest
64 @tests_annotations.DisabledTest
65 def testDisableAndEnableSync(self):
66 java_tests = ['testDisableAndEnableSync']
67 return self._RunSyncTests(java_tests)