Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: chrome/android/host_driven_tests/SyncTest.py

Issue 457883002: Use Sync FakeServer in Android tests via custom APK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
5
6 """Host-driven Java tests which exercise sync functionality."""
7
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
12
13
14 class SyncTest(test_case.HostDrivenTestCase):
15 """Host-driven Java tests which exercise sync functionality."""
16
17 def __init__(self, *args, **kwargs):
18 super(SyncTest, self).__init__(*args, **kwargs)
19 self.test_server = None
20 self.additional_flags = []
21
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 '--sync-deferred-startup-timeout-seconds=0']
32 super(SyncTest, self).SetUp(device, shard_index, push_deps,
33 cleanup_test_files,
34 [self.test_server.port])
35
36 def TearDown(self):
37 super(SyncTest, self).TearDown()
38 self.test_server.TearDown()
39
40 def _RunSyncTests(self, test_names):
41 full_names = []
42 for test_name in test_names:
43 full_names.append('SyncTest.' + test_name)
44 return self._RunJavaTestFilters(full_names, self.additional_flags)
45
46 # http://crbug.com/348951
47 # @tests_annotations.Feature(['Sync'])
48 # @tests_annotations.EnormousTest
49 @tests_annotations.DisabledTest
50 def testGetAboutSyncInfoYieldsValidData(self):
51 java_tests = ['testGetAboutSyncInfoYieldsValidData']
52 return self._RunSyncTests(java_tests)
53
54 # http://crbug.com/348117
55 # @tests_annotations.Feature(['Sync'])
56 # @tests_annotations.EnormousTest
57 @tests_annotations.DisabledTest
58 def testAboutSyncPageDisplaysCurrentSyncStatus(self):
59 java_tests = ['testAboutSyncPageDisplaysCurrentSyncStatus']
60 return self._RunSyncTests(java_tests)
61
62 # http://crbug.com/348951
63 # @tests_annotations.Feature(['Sync'])
64 # @tests_annotations.EnormousTest
65 @tests_annotations.DisabledTest
66 def testDisableAndEnableSync(self):
67 java_tests = ['testDisableAndEnableSync']
68 return self._RunSyncTests(java_tests)
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698