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

Unified Diff: content/test/gpu/gpu_tests/gpu_integration_test.py

Issue 2643023004: Fetch the first tab inside the browser startup retry loop. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_integration_test_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/gpu_integration_test.py
diff --git a/content/test/gpu/gpu_tests/gpu_integration_test.py b/content/test/gpu/gpu_tests/gpu_integration_test.py
index 409e1e13311b64e9fa7fa304b257ef3ca151a9a7..f9a8082644390b4c9ddcdf865c48c1cbfac4a019 100644
--- a/content/test/gpu/gpu_tests/gpu_integration_test.py
+++ b/content/test/gpu/gpu_tests/gpu_integration_test.py
@@ -28,6 +28,8 @@ class GpuIntegrationTest(
restart = 'Starting browser, attempt %d of 3' % (x + 1)
logging.warning(restart)
super(GpuIntegrationTest, cls).StartBrowser()
+ cls.tab = cls.browser.tabs[0]
+ logging.warning('Started browser successfully.')
return
except Exception:
# If we are on the last try and there is an exception take a screenshot
@@ -41,6 +43,10 @@ class GpuIntegrationTest(
else:
logging.warning("GpuIntegrationTest unable to take screenshot")
raise
+ # Otherwise, stop the browser to make sure it's in an
+ # acceptable state to try restarting it.
+ if cls.browser:
+ cls.StopBrowser()
@classmethod
def _RestartBrowser(cls, reason):
@@ -48,7 +54,6 @@ class GpuIntegrationTest(
cls.StopBrowser()
cls.SetBrowserOptions(cls._finder_options)
cls.StartBrowser()
- cls.tab = cls.browser.tabs[0]
def _RunGpuTest(self, url, test_name, *args):
expectations = self.__class__.GetExpectations()
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_integration_test_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698