Index: chrome/test/webdriver/test/chromedriver_tests.py |
diff --git a/chrome/test/webdriver/test/chromedriver_tests.py b/chrome/test/webdriver/test/chromedriver_tests.py |
index 8dd5703f3695c4cf0bec91517269a57528ce3633..467767bf20db944b6dc90e9aea643b49582ed0c8 100644 |
--- a/chrome/test/webdriver/test/chromedriver_tests.py |
+++ b/chrome/test/webdriver/test/chromedriver_tests.py |
@@ -1068,6 +1068,8 @@ class ExtensionTest(ChromeDriverTest): |
'/infobar_browser_action_extension' |
PAGE_ACTION_EXTENSION = test_paths.TEST_DATA_PATH + \ |
'/page_action_extension' |
+ PACKAGED_APP_EXTENSION = test_paths.TEST_DATA_PATH + \ |
+ '/packaged_app_extension' |
def testExtensionInstallAndUninstall(self): |
driver = self.GetNewDriver() |
@@ -1138,6 +1140,17 @@ class ExtensionTest(ChromeDriverTest): |
ext.click_page_action() |
self._testExtensionView(driver, ext.get_popup_handle(), ext) |
+ def testPackagedAppView(self): |
+ driver = self.GetNewDriver({'chrome.switches': |
+ ['enable-experimental-extension-apis']}) |
+ ext = driver.install_extension(self.PACKAGED_APP_EXTENSION) |
+ app = driver.find_element_by_xpath("//div[@title='Packaged app extension']") |
kkania
2012/08/09 22:04:49
is this finding the app icon on the ntp page? expl
Danh Nguyen
2012/08/10 16:35:09
Yes, explicit navigation to the NTP page was added
|
+ app.click() |
+ def is_app_window_launched(driver): |
+ return ext.get_packaged_app_handle() is not None |
+ WebDriverWait(driver, 10).until(is_app_window_launched) |
+ self._testExtensionView(driver, ext.get_packaged_app_handle(), ext) |
+ |
class BadJSTest(ChromeDriverTest): |
"""Tests that ensure sites with hacky JS don't break ChromeDriver.""" |