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

Side by Side Diff: content/test/gpu/gpu_tests/screenshot_sync_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 unified diff | Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_integration_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import random 7 import random
8 8
9 from gpu_tests import gpu_integration_test 9 from gpu_tests import gpu_integration_test
10 from gpu_tests import path_util 10 from gpu_tests import path_util
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 @classmethod 65 @classmethod
66 def RestartBrowserIfNecessaryWithArgs(cls, browser_args): 66 def RestartBrowserIfNecessaryWithArgs(cls, browser_args):
67 if not browser_args: 67 if not browser_args:
68 browser_args = [] 68 browser_args = []
69 if set(browser_args) != cls._last_launched_browser_args: 69 if set(browser_args) != cls._last_launched_browser_args:
70 logging.info('Restarting browser with arguments: ' + str(browser_args)) 70 logging.info('Restarting browser with arguments: ' + str(browser_args))
71 cls.StopBrowser() 71 cls.StopBrowser()
72 cls.CustomizeBrowserArgs(browser_args) 72 cls.CustomizeBrowserArgs(browser_args)
73 cls.StartBrowser() 73 cls.StartBrowser()
74 cls.tab = cls.browser.tabs[0]
75 74
76 @classmethod 75 @classmethod
77 def _CreateExpectations(cls): 76 def _CreateExpectations(cls):
78 return screenshot_sync_expectations.ScreenshotSyncExpectations() 77 return screenshot_sync_expectations.ScreenshotSyncExpectations()
79 78
80 @classmethod 79 @classmethod
81 def GenerateGpuTests(cls, options): 80 def GenerateGpuTests(cls, options):
82 yield('ScreenshotSync_SWRasterWithCanvas', 81 yield('ScreenshotSync_SWRasterWithCanvas',
83 'screenshot_sync_canvas.html', 82 'screenshot_sync_canvas.html',
84 ('--disable-gpu-rasterization')) 83 ('--disable-gpu-rasterization'))
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 for x in range(start_x, outer_size, skip): 125 for x in range(start_x, outer_size, skip):
127 self._CheckColorMatchAtLocation(canvasRGB, screenshot, x, y) 126 self._CheckColorMatchAtLocation(canvasRGB, screenshot, x, y)
128 127
129 def RunActualGpuTest(self, test_path, *args): 128 def RunActualGpuTest(self, test_path, *args):
130 browser_arg = args[0] 129 browser_arg = args[0]
131 self.RestartBrowserIfNecessaryWithArgs([browser_arg]) 130 self.RestartBrowserIfNecessaryWithArgs([browser_arg])
132 self._Navigate(test_path) 131 self._Navigate(test_path)
133 repetitions = 20 132 repetitions = 20
134 for _ in range(0, repetitions): 133 for _ in range(0, repetitions):
135 self._CheckScreenshot() 134 self._CheckScreenshot()
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_integration_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698