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

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

Issue 8649004: Allow chromedriver to install an extension and get all installed extension IDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 import os 6 import os
7 7
8 import pyauto_functional # Must come before chromoting and pyauto. 8 import pyauto_functional # Must come before chromoting and pyauto.
9 import chromoting 9 import chromoting
10 import pyauto 10 import pyauto
11 11
12 12
13 class ChromotingBasic(chromoting.ChromotingMixIn, pyauto.PyUITest): 13 class ChromotingBasic(chromoting.ChromotingMixIn, pyauto.PyUITest):
14 """Basic tests for Chromoting.""" 14 """Basic tests for Chromoting."""
15 15
16 def setUp(self): 16 def setUp(self):
17 """Set up test for Chromoting on both local and remote machines. 17 """Set up test for Chromoting on both local and remote machines.
18 18
19 Installs the Chromoting app, launches it, and authenticates 19 Installs the Chromoting app, launches it, and authenticates
20 using the default Chromoting test account. 20 using the default Chromoting test account.
21 """ 21 """
22 super(ChromotingBasic, self).setUp() 22 super(ChromotingBasic, self).setUp()
23 app = self.InstallApp(self.GetIT2MeAppPath()) 23 app = self.InstallExtension(self.GetIT2MeAppPath())
24 self.LaunchApp(app) 24 self.LaunchApp(app)
25 account = self.GetPrivateInfo()['test_chromoting_account'] 25 account = self.GetPrivateInfo()['test_chromoting_account']
26 self.Authenticate(account['username'], account['password']) 26 self.Authenticate(account['username'], account['password'])
27 27
28 def testChromoting(self): 28 def testChromoting(self):
29 """Verify that we can start and disconnect from a Chromoting session.""" 29 """Verify that we can start and disconnect from a Chromoting session."""
30 host = self 30 host = self
31 client = self.remote 31 client = self.remote
32 32
33 host.SetHostMode() 33 host.SetHostMode()
34 access_code = host.Share() 34 access_code = host.Share()
35 self.assertTrue(access_code, 35 self.assertTrue(access_code,
36 msg='Host attempted to share, but it failed. ' 36 msg='Host attempted to share, but it failed. '
37 'No access code was found.') 37 'No access code was found.')
38 38
39 client.SetClientMode() 39 client.SetClientMode()
40 self.assertTrue(client.Connect(access_code), 40 self.assertTrue(client.Connect(access_code),
41 msg='The client attempted to connect to the host, ' 41 msg='The client attempted to connect to the host, '
42 'but the chromoting session did not start.') 42 'but the chromoting session did not start.')
43 43
44 host.CancelShare() 44 host.CancelShare()
45 client.Disconnect() 45 client.Disconnect()
46 46
47 47
48 if __name__ == '__main__': 48 if __name__ == '__main__':
49 pyauto_functional.Main() 49 pyauto_functional.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698