OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Host-driven Java tests which exercise sync functionality.""" | 6 """Host-driven Java tests which exercise sync functionality.""" |
7 | 7 |
8 from pylib import constants | 8 from pylib import constants |
9 from pylib.host_driven import test_case | 9 from pylib.host_driven import test_case |
10 from pylib.host_driven import test_server | 10 from pylib.host_driven import test_server |
11 from pylib.host_driven import tests_annotations | 11 from pylib.host_driven import tests_annotations |
12 | 12 |
13 | 13 |
14 class SyncTest(test_case.HostDrivenTestCase): | 14 class SyncTest(test_case.HostDrivenTestCase): |
15 """Host-driven Java tests which exercise sync functionality.""" | 15 """Host-driven Java tests which exercise sync functionality.""" |
16 | 16 |
17 def __init__(self, *args, **kwargs): | 17 def __init__(self, *args, **kwargs): |
18 super(SyncTest, self).__init__(*args, **kwargs) | 18 super(SyncTest, self).__init__(*args, **kwargs) |
19 self.test_server = None | 19 self.test_server = None |
20 self.additional_flags = [] | 20 self.additional_flags = [] |
21 | 21 |
22 def SetUp(self, device, shard_index, push_deps, cleanup_test_files): | 22 def SetUp(self, device, shard_index, push_deps, cleanup_test_files): |
23 self.test_server = test_server.TestServer( | 23 self.test_server = test_server.TestServer( |
24 shard_index, | 24 shard_index, |
25 constants.TEST_SYNC_SERVER_PORT, | 25 constants.TEST_SYNC_SERVER_PORT, |
26 test_server.TEST_SYNC_SERVER_PATH) | 26 test_server.TEST_SYNC_SERVER_PATH) |
27 # These ought not to change in the middle of a test for obvious reasons. | 27 # These ought not to change in the middle of a test for obvious reasons. |
28 self.additional_flags = [ | 28 self.additional_flags = [ |
29 '--sync-url=http://%s:%d/chromiumsync' % | 29 '--sync-url=http://%s:%d/chromiumsync' % |
30 (self.test_server.host, self.test_server.port)] | 30 (self.test_server.host, self.test_server.port), |
| 31 '--sync-deferred-startup-timeout-seconds=0'] |
31 super(SyncTest, self).SetUp(device, shard_index, push_deps, | 32 super(SyncTest, self).SetUp(device, shard_index, push_deps, |
32 cleanup_test_files, | 33 cleanup_test_files, |
33 [self.test_server.port]) | 34 [self.test_server.port]) |
34 | 35 |
35 def TearDown(self): | 36 def TearDown(self): |
36 super(SyncTest, self).TearDown() | 37 super(SyncTest, self).TearDown() |
37 self.test_server.TearDown() | 38 self.test_server.TearDown() |
38 | 39 |
39 def _RunSyncTests(self, test_names): | 40 def _RunSyncTests(self, test_names): |
40 full_names = [] | 41 full_names = [] |
(...skipping 15 matching lines...) Expand all Loading... |
56 java_tests = ['testAboutSyncPageDisplaysCurrentSyncStatus'] | 57 java_tests = ['testAboutSyncPageDisplaysCurrentSyncStatus'] |
57 return self._RunSyncTests(java_tests) | 58 return self._RunSyncTests(java_tests) |
58 | 59 |
59 # @tests_annotations.Feature(['Sync']) | 60 # @tests_annotations.Feature(['Sync']) |
60 # @tests_annotations.EnormousTest | 61 # @tests_annotations.EnormousTest |
61 # See crbug.com/348951 | 62 # See crbug.com/348951 |
62 @tests_annotations.DisabledTest | 63 @tests_annotations.DisabledTest |
63 def testDisableAndEnableSync(self): | 64 def testDisableAndEnableSync(self): |
64 java_tests = ['testDisableAndEnableSync'] | 65 java_tests = ['testDisableAndEnableSync'] |
65 return self._RunSyncTests(java_tests) | 66 return self._RunSyncTests(java_tests) |
OLD | NEW |