def run_once(self, video_url=None):
     utils.verify_flash_installed()
     with chrome.Chrome(init_network_controller=True) as cr:
         cr.browser.platform.SetHTTPServerDirectories(self.bindir)
         tab = cr.browser.tabs[0]
         tab.Navigate(cr.browser.platform.http_server.UrlOf(
             os.path.join(self.bindir, 'youtube.html')))
         self.suspend_with_youtube(cr.browser.tabs[0], video_url)
示例#2
0
 def run_once(self, time_to_wait_secs=5):
     utils.verify_flash_installed()
     retries = 10
     flash_tested = False
     while not flash_tested and retries > 0:
         retries = retries - 1
         with chrome.Chrome() as cr:
             flash_tested = self.run_flash_sanity_test(
                 cr.browser, time_to_wait_secs)
     if not flash_tested:
         raise error.TestFail('Unable to test Flash due to other problems.')
示例#3
0
 def run_once(self):
     utils.verify_flash_installed()
     with chrome.Chrome() as cr:
         self.run_youtube_tests(cr.browser)