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

Side by Side Diff: chrome/test/functional/gtalk/test_basic.py

Issue 10535022: Re-enable gtalk test. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 6 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/PYAUTO_TESTS ('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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Basic sanity tests for the GTalk extension. 6 """Basic sanity tests for the GTalk extension.
7 7
8 This module contains the basic set of sanity tests run on the 8 This module contains the basic set of sanity tests run on the
9 GTalk extension. 9 GTalk extension.
10 """ 10 """
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 self.WaitUntilResult(True, 225 self.WaitUntilResult(True,
226 lambda: self.RunInViewer( 226 lambda: self.RunInViewer(
227 'window.document.getElementsByTagName("iframe") != null'), 227 'window.document.getElementsByTagName("iframe") != null'),
228 msg='Timed out waiting for iframes to load.') 228 msg='Timed out waiting for iframes to load.')
229 229
230 # Wait for a second chat mole to open. 230 # Wait for a second chat mole to open.
231 time.sleep(1) 231 time.sleep(1)
232 self.assertTrue(self.WaitUntil(lambda: bool(self.GetMoleInfo(1))), 232 self.assertTrue(self.WaitUntil(lambda: bool(self.GetMoleInfo(1))),
233 msg='Timed out waiting for second mole window to open.') 233 msg='Timed out waiting for second mole window to open.')
234 234
235 # Wait for mole content to load
236 self.WaitUntilCondition(
237 lambda: self.RunInMole('window.document.body.innerHTML', 1),
238 lambda html: html and 'Ping!' in html,
239 msg='Timed out waiting for Ping! to appear in mole DOM.')
240
235 # Disable the extension. 241 # Disable the extension.
236 extension = self.GetGTalkExtensionInfo() 242 extension = self.GetGTalkExtensionInfo()
237 self.SetExtensionStateById(extension['id'], enable=False, 243 self.SetExtensionStateById(extension['id'], enable=False,
238 allow_in_incognito=False) 244 allow_in_incognito=False)
239 extension = self.GetGTalkExtensionInfo() 245 extension = self.GetGTalkExtensionInfo()
240 self.assertFalse(extension['is_enabled']) 246 self.assertFalse(extension['is_enabled'])
241 247
242 # Verify all moles + windows are closed. 248 # Verify all moles + windows are closed.
243 self.assertTrue(self.WaitUntil(lambda: not(bool(self.GetViewerInfo()))), 249 self.assertTrue(self.WaitUntil(lambda: not(bool(self.GetViewerInfo()))),
244 msg='Timed out waiting for viewer.html to close after disabling.') 250 msg='Timed out waiting for viewer.html to close after disabling.')
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 logging.info("\n") 286 logging.info("\n")
281 if tries < RETRIES - 1: 287 if tries < RETRIES - 1:
282 self.NavigateToURL('http://accounts.google.com/Logout') 288 self.NavigateToURL('http://accounts.google.com/Logout')
283 logging.info('Retrying...') 289 logging.info('Retrying...')
284 else: 290 else:
285 raise 291 raise
286 292
287 293
288 if __name__ == '__main__': 294 if __name__ == '__main__':
289 pyauto_gtalk.Main() 295 pyauto_gtalk.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698