Chromium Code Reviews

Side by Side Diff: content/test/gpu/gpu_tests/pixel.py

Issue 1384823002: Add "--test-type=gpu" to suppress API Keys InfoBar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « content/test/gpu/gpu_tests/maps.py ('k') | content/test/gpu/gpu_tests/screenshot_sync.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 from datetime import datetime 4 from datetime import datetime
5 import glob 5 import glob
6 import json 6 import json
7 import optparse 7 import optparse
8 import os 8 import os
9 import re 9 import re
10 10
(...skipping 33 matching lines...)
44 """ 44 """
45 45
46 class PixelTestFailure(Exception): 46 class PixelTestFailure(Exception):
47 pass 47 pass
48 48
49 def _DidTestSucceed(tab): 49 def _DidTestSucceed(tab):
50 return tab.EvaluateJavaScript('domAutomationController._succeeded') 50 return tab.EvaluateJavaScript('domAutomationController._succeeded')
51 51
52 class PixelValidator(cloud_storage_test_base.ValidatorBase): 52 class PixelValidator(cloud_storage_test_base.ValidatorBase):
53 def CustomizeBrowserOptions(self, options): 53 def CustomizeBrowserOptions(self, options):
54 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking') 54 # --test-type=gpu is used only to suppress the "Google API Keys are missing"
55 # infobar, which causes flakiness in tests.
56 options.AppendExtraBrowserArgs(['--enable-gpu-benchmarking',
57 '--test-type=gpu'])
55 58
56 def ValidateAndMeasurePage(self, page, tab, results): 59 def ValidateAndMeasurePage(self, page, tab, results):
57 if not _DidTestSucceed(tab): 60 if not _DidTestSucceed(tab):
58 raise page_test.Failure('Page indicated a failure') 61 raise page_test.Failure('Page indicated a failure')
59 62
60 if not tab.screenshot_supported: 63 if not tab.screenshot_supported:
61 raise page_test.Failure('Browser does not support screenshot capture') 64 raise page_test.Failure('Browser does not support screenshot capture')
62 65
63 screenshot = tab.Screenshot(5) 66 screenshot = tab.Screenshot(5)
64 67
(...skipping 114 matching lines...)
179 default=default_reference_image_dir) 182 default=default_reference_image_dir)
180 183
181 def CreateStorySet(self, options): 184 def CreateStorySet(self, options):
182 story_set = page_sets.PixelTestsStorySet(self.GetExpectations()) 185 story_set = page_sets.PixelTestsStorySet(self.GetExpectations())
183 for page in story_set: 186 for page in story_set:
184 page.script_to_evaluate_on_commit = test_harness_script 187 page.script_to_evaluate_on_commit = test_harness_script
185 return story_set 188 return story_set
186 189
187 def _CreateExpectations(self): 190 def _CreateExpectations(self):
188 return pixel_expectations.PixelExpectations() 191 return pixel_expectations.PixelExpectations()
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/maps.py ('k') | content/test/gpu/gpu_tests/screenshot_sync.py » ('j') | no next file with comments »

Powered by Google App Engine