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

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

Issue 2672803002: [Telemetry refactor] Migrate clients to new JavaScript API (batch 3) (Closed)
Patch Set: add comment on tools/android Created 3 years, 10 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
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 sys 5 import sys
6 6
7 from gpu_tests import gpu_integration_test 7 from gpu_tests import gpu_integration_test
8 import gpu_tests.hardware_accelerated_feature_expectations as hw_expectations 8 import gpu_tests.hardware_accelerated_feature_expectations as hw_expectations
9 9
10 test_harness_script = r""" 10 test_harness_script = r"""
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 for feature in tests: 61 for feature in tests:
62 yield('HardwareAcceleratedFeature_%s_accelerated' % 62 yield('HardwareAcceleratedFeature_%s_accelerated' %
63 safe_feature_name(feature), 63 safe_feature_name(feature),
64 'chrome://gpu', 64 'chrome://gpu',
65 (feature)) 65 (feature))
66 66
67 def RunActualGpuTest(self, test_path, *args): 67 def RunActualGpuTest(self, test_path, *args):
68 feature = args[0] 68 feature = args[0]
69 self._Navigate(test_path) 69 self._Navigate(test_path)
70 tab = self.tab 70 tab = self.tab
71 if not tab.EvaluateJavaScript('VerifyHardwareAccelerated("%s")' % feature): 71 if not tab.EvaluateJavaScript2(
72 'VerifyHardwareAccelerated({{ feature }})', feature=feature):
72 print 'Test failed. Printing page contents:' 73 print 'Test failed. Printing page contents:'
73 print tab.EvaluateJavaScript('document.body.innerHTML') 74 print tab.EvaluateJavaScript2('document.body.innerHTML')
74 self.fail('%s not hardware accelerated' % feature) 75 self.fail('%s not hardware accelerated' % feature)
75 76
76 def load_tests(loader, tests, pattern): 77 def load_tests(loader, tests, pattern):
77 del loader, tests, pattern # Unused. 78 del loader, tests, pattern # Unused.
78 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) 79 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__])
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_process_integration_test.py ('k') | content/test/gpu/gpu_tests/maps_integration_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698