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

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

Issue 2363343002: Ported pixel_test to new gpu_integration_test harness. (Closed)
Patch Set: Update revision for OffscreenCanvasWebGLGreenBox. Created 4 years, 3 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
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 75df3cbaec20bc4786ad851953674e8940781cc6..3c4e98d3d4b10d574ce1517231bb019d821c347a 100644
--- a/content/test/gpu/gpu_tests/gpu_integration_test.py
+++ b/content/test/gpu/gpu_tests/gpu_integration_test.py
@@ -51,12 +51,13 @@ class GpuIntegrationTest(
logging.warning("GpuIntegrationTest unable to take screenshot")
raise
- def _RestartBrowser(self, reason):
+ @classmethod
+ def _RestartBrowser(cls, reason):
logging.warning('Restarting browser due to '+ reason)
- self.StopBrowser()
- self.SetBrowserOptions(self._finder_options)
- self.StartBrowser()
- self.tab = self.browser.tabs[0]
+ cls.StopBrowser()
+ cls.SetBrowserOptions(cls._finder_options)
+ cls.StartBrowser()
+ cls.tab = cls.browser.tabs[0]
def _RunGpuTest(self, url, test_name, *args):
temp_page = _EmulatedPage(url, test_name)
@@ -158,12 +159,16 @@ class GpuIntegrationTest(
# Do not call this directly. Call GetExpectations where necessary.
raise NotImplementedError
- def setUp(self):
+ @classmethod
+ def _EnsureTabIsAvailable(cls):
try:
- self.tab = self.browser.tabs[0]
+ cls.tab = cls.browser.tabs[0]
except Exception:
# restart the browser to make sure a failure in a test doesn't
# propagate to the next test iteration.
logging.exception("Failure during browser startup")
- self._RestartBrowser('failure in setup')
+ cls._RestartBrowser('failure in setup')
raise
+
+ def setUp(self):
+ self._EnsureTabIsAvailable()
« no previous file with comments | « content/test/gpu/gpu_tests/cloud_storage_integration_test_base.py ('k') | content/test/gpu/gpu_tests/pixel.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698