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

Side by Side Diff: chrome/test/functional/sync.py

Issue 4096004: PyAuto hooks for Sync in TestingAutomationProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase; Addressing final review comment. Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/live_sync/live_sync_test.cc » ('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 (c) 2010 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 import pyauto_functional # Must be imported before pyauto
7 import pyauto
8
9
10 class SyncTest(pyauto.PyUITest):
11 """Tests for sync."""
12
13 def testSignInToSync(self):
14 """Sign in to sync."""
15 # Need to initialize username and password. See crbug.com/60970.
16 username = '<username>@gmail.com'
17 password = '<password>'
18 self.assertTrue(self.GetSyncInfo()['summary'] == 'OFFLINE_UNUSABLE')
19 self.assertTrue(self.GetSyncInfo()['last synced'] == 'Never')
20 self.assertTrue(self.SignInToSync(username, password))
21 self.assertTrue(self.GetSyncInfo()['summary'] == 'READY')
22 self.assertTrue(self.GetSyncInfo()['last synced'] == 'Just now')
23
24 def testDisableAndEnableDatatype(self):
25 """Sign in, disable and then enable sync for a datatype."""
26 # Need to initialize username and password. See crbug.com/60970.
27 username = '<username>@gmail.com'
28 password = '<password>'
29 self.assertTrue(self.SignInToSync(username, password))
30 self.assertTrue(self.GetSyncInfo()['summary'] == 'READY')
31 self.assertTrue(self.GetSyncInfo()['last synced'] == 'Just now')
32 self.assertTrue(self.DisableSyncForDatatypes(['Bookmarks']))
33 self.assertFalse('Bookmarks' in self.GetSyncInfo()['synced datatypes'])
34 self.assertTrue(self.EnableSyncForDatatypes(['Bookmarks']))
35 self.assertTrue('Bookmarks' in self.GetSyncInfo()['synced datatypes'])
36
37 def testRestartBrowser(self):
38 """Sign in to sync and restart the browser."""
39 # Need to initialize username and password. See crbug.com/60970.
40 username = '<username>@gmail.com'
41 password = '<password>'
42 self.assertTrue(self.SignInToSync(username, password))
43 self.assertTrue(self.GetSyncInfo()['summary'] == 'READY')
44 self.assertTrue(self.GetSyncInfo()['last synced'] == 'Just now')
45 self.RestartBrowser(clear_profile=False)
46 self.assertTrue(self.AwaitSyncCycleCompletion())
47 self.assertTrue(self.GetSyncInfo()['summary'] == 'READY')
48 self.assertTrue(self.GetSyncInfo()['last synced'] == 'Just now')
49
50
51 if __name__ == '__main__':
52 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/live_sync/live_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698