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

Side by Side Diff: chrome/test/functional/omnibox.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 glob 6 import glob
7 import os 7 import os
8 import re 8 import re
9 import shutil 9 import shutil
10 import tempfile 10 import tempfile
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 """Installs a sample packaged app and verifies the install is successful. 354 """Installs a sample packaged app and verifies the install is successful.
355 355
356 Args: 356 Args:
357 app_name: The name of the app to be installed. 357 app_name: The name of the app to be installed.
358 358
359 Returns: 359 Returns:
360 The string ID of the installed app. 360 The string ID of the installed app.
361 """ 361 """
362 app_crx_file = os.path.abspath(os.path.join(self.DataDir(), 362 app_crx_file = os.path.abspath(os.path.join(self.DataDir(),
363 'pyauto_private', 'apps', app_name)) 363 'pyauto_private', 'apps', app_name))
364 installed_app_id = self.InstallApp(app_crx_file) 364 return self.InstallExtension(app_crx_file)
365 self.assertTrue(installed_app_id, msg='App install failed.')
366 365
367 def _VerifyOminiboxMatches(self, search_str, app_url, is_incognito): 366 def _VerifyOminiboxMatches(self, search_str, app_url, is_incognito):
368 """Verify app matches in omnibox. 367 """Verify app matches in omnibox.
369 368
370 Args: 369 Args:
371 search_str: Search keyword to find app matches. 370 search_str: Search keyword to find app matches.
372 app_url: Chrome app launch URL. 371 app_url: Chrome app launch URL.
373 is_incognito: A boolean indicating if omnibox matches are from an 372 is_incognito: A boolean indicating if omnibox matches are from an
374 incognito window. 373 incognito window.
375 """ 374 """
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 def testBeginningPartAppNameSearchInNewTab(self): 522 def testBeginningPartAppNameSearchInNewTab(self):
524 """Verify that we can search app with partial app name (beginning part).""" 523 """Verify that we can search app with partial app name (beginning part)."""
525 app_name = 'cargo_bridge.crx' 524 app_name = 'cargo_bridge.crx'
526 search_str = 'Car' 525 search_str = 'Car'
527 app_url = 'http://webstore.limexgames.com/cargo_bridge' 526 app_url = 'http://webstore.limexgames.com/cargo_bridge'
528 self._VerifyAppSearchNewTab(app_name, search_str, app_url) 527 self._VerifyAppSearchNewTab(app_name, search_str, app_url)
529 528
530 529
531 if __name__ == '__main__': 530 if __name__ == '__main__':
532 pyauto_functional.Main() 531 pyauto_functional.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698