| Index: chrome/android/host_driven_tests/SyncTest.py
|
| diff --git a/chrome/android/host_driven_tests/SyncTest.py b/chrome/android/host_driven_tests/SyncTest.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..c93edc7b27bf9c2b3d17e55a3b2be000d1fb908b
|
| --- /dev/null
|
| +++ b/chrome/android/host_driven_tests/SyncTest.py
|
| @@ -0,0 +1,49 @@
|
| +#!/usr/bin/python
|
| +# Copyright 2013 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.
|
| +
|
| +from pylib import constants
|
| +from pylib.host_driven import test_case
|
| +from pylib.host_driven import tests_annotations
|
| +from pylib.host_driven import TestServer
|
| +
|
| +class SyncTest(test_case.HostDrivenTestCase):
|
| + """Python-driven java_tests which exercise sync functionality."""
|
| +
|
| + def __init__(self, *args, **kwargs):
|
| + super(SyncTest, self).__init__(*args, **kwargs)
|
| + self.test_server_params = None
|
| +
|
| + def SetUp(self, device, shard_index, push_deps, cleanup_test_files):
|
| + super(SyncTest, self).SetUp(device, shard_index, push_deps,
|
| + cleanup_test_files)
|
| + server_port, flags, test_server = \
|
| + TestServer.setUpTestSyncServer(
|
| + self.adb, shard_index,
|
| + constants.CHROME_TEST_SHELL_COMMAND_LINE_FILE)
|
| + # These ought not to change in the middle of a test for obvious reasons.
|
| + self.test_server_params = (flags, test_server)
|
| + self.ports_to_forward = [server_port]
|
| +
|
| + def TearDown(self):
|
| + TestServer.tearDown(self.test_server_params)
|
| + super(SyncTest, self).TearDown()
|
| +
|
| + def _RunSyncTests(self, test_names):
|
| + full_names = []
|
| + for test_name in test_names:
|
| + full_names.append('SyncTest.' + test_name)
|
| + return self._RunJavaTestFilters(full_names)
|
| +
|
| + @tests_annotations.Feature(['Sync'])
|
| + @tests_annotations.EnormousTest
|
| + def testGetAboutSyncInfoYieldsValidData(self):
|
| + java_tests = ['testGetAboutSyncInfoYieldsValidData']
|
| + return self._RunSyncTests(java_tests)
|
| +
|
| + @tests_annotations.Feature(['Sync'])
|
| + @tests_annotations.EnormousTest
|
| + def testAboutSyncPageDisplaysCurrentSyncStatus(self):
|
| + java_tests = ['testAboutSyncPageDisplaysCurrentSyncStatus']
|
| + return self._RunSyncTests(java_tests)
|
|
|