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

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

Issue 10778006: Adding HTML Terminal test case: 1. TestAddBookmark, 2. Login as guest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modification based on CL review. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/chromeos_login.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import copy 5 import copy
6 import ctypes 6 import ctypes
7 import email 7 import email
8 import logging 8 import logging
9 import os 9 import os
10 import platform 10 import platform
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 test.assertTrue(test.GetSyncInfo()['last synced'] == 'Never') 357 test.assertTrue(test.GetSyncInfo()['last synced'] == 'Never')
358 test.assertTrue(test.SignInToSync(username, password)) 358 test.assertTrue(test.SignInToSync(username, password))
359 test.assertTrue(test.GetSyncInfo()['last synced'] == 'Just now') 359 test.assertTrue(test.GetSyncInfo()['last synced'] == 'Just now')
360 360
361 361
362 def LoginToDevice(test, test_account='test_google_account'): 362 def LoginToDevice(test, test_account='test_google_account'):
363 """Login to the Chromeos device using the given test account. 363 """Login to the Chromeos device using the given test account.
364 364
365 If no test account is specified, we use test_google_account as the default. 365 If no test account is specified, we use test_google_account as the default.
366 You can choose test accounts from - 366 You can choose test accounts from -
367 chrome/test/data/pyauto_private/private_tests_info.txt 367 chrome/test/data/pyauto_private/private_tests_info.txt
368 368
369 Args: 369 Args:
370 test_account: The account used to login to the Chromeos device. 370 test_account: The account used to login to the Chromeos device.
371 """ 371 """
372 if not test.GetLoginInfo()['is_logged_in']: 372 if not test.GetLoginInfo()['is_logged_in']:
373 credentials = test.GetPrivateInfo()[test_account] 373 credentials = test.GetPrivateInfo()[test_account]
374 test.Login(credentials['username'], credentials['password']) 374 test.Login(credentials['username'], credentials['password'])
375 login_info = test.GetLoginInfo() 375 login_info = test.GetLoginInfo()
376 test.assertTrue(login_info['is_logged_in'], msg='Login failed.') 376 test.assertTrue(login_info['is_logged_in'], msg='Login failed.')
377 else: 377 else:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 test: Derived from pyauto.PyUITest - base class for UI test cases. 427 test: Derived from pyauto.PyUITest - base class for UI test cases.
428 infobar_type: The infobar type to look for. 428 infobar_type: The infobar type to look for.
429 windex: Window index. Defaults to 0 (first window). 429 windex: Window index. Defaults to 0 (first window).
430 tab_index: Tab index. Defaults to 0 (first tab). 430 tab_index: Tab index. Defaults to 0 (first tab).
431 """ 431 """
432 test.assertFalse( 432 test.assertFalse(
433 test.WaitUntil(lambda: GetInfobarIndexByType( 433 test.WaitUntil(lambda: GetInfobarIndexByType(
434 test, infobar_type, windex, tab_index) is not None, timeout=20), 434 test, infobar_type, windex, tab_index) is not None, timeout=20),
435 msg=('Infobar type for %s appeared when it should be hidden.' 435 msg=('Infobar type for %s appeared when it should be hidden.'
436 % infobar_type)) 436 % infobar_type))
437
438 def OpenCroshVerification(self):
439 """This test opens crosh.
440
441 This function assumes that no browser windows are open.
442 """
443 self.assertEqual(0, self.GetBrowserWindowCount())
444 self.OpenCrosh()
445 self.assertEqual(1, self.GetBrowserWindowCount())
446 self.assertEqual(1, self.GetTabCount(),
447 msg='Could not open crosh')
448 self.assertEqual('crosh', self.GetActiveTabTitle())
OLDNEW
« no previous file with comments | « chrome/test/functional/chromeos_login.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698