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

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

Issue 2781993002: Get the proper GPU Info in GpuProcessHost (Closed)
Patch Set: Added tests Created 3 years, 8 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/browser/gpu/gpu_process_host.cc ('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 sys 7 import sys
8 8
9 from gpu_tests import gpu_integration_test 9 from gpu_tests import gpu_integration_test
10 from gpu_tests import gpu_process_expectations 10 from gpu_tests import gpu_process_expectations
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 # It looks like when SwiftShader is in use (via --disable-gpu), 542 # It looks like when SwiftShader is in use (via --disable-gpu),
543 # that GPU information collection doesn't yet contain what's 543 # that GPU information collection doesn't yet contain what's
544 # expected (the system_info.gpu.aux_attributes['gl_renderer'] 544 # expected (the system_info.gpu.aux_attributes['gl_renderer']
545 # looks like it'll be null). Verified locally that we can fetch 545 # looks like it'll be null). Verified locally that we can fetch
546 # the desired information via WebGL. 546 # the desired information via WebGL.
547 renderer = self.tab.EvaluateJavaScript('gl_renderer') 547 renderer = self.tab.EvaluateJavaScript('gl_renderer')
548 if not renderer: 548 if not renderer:
549 self.fail('getParameter(UNMASKED_RENDERER_WEBGL) was null') 549 self.fail('getParameter(UNMASKED_RENDERER_WEBGL) was null')
550 if 'SwiftShader' not in renderer: 550 if 'SwiftShader' not in renderer:
551 self.fail('Expected SwiftShader renderer; instead got ' + renderer) 551 self.fail('Expected SwiftShader renderer; instead got ' + renderer)
552 if not self.browser.supports_system_info:
553 self.fail("Browser doesn't support GetSystemInfo")
554 gpu = self.browser.GetSystemInfo().gpu
555 if not gpu:
556 self.fail('Target machine must have a GPU')
557 if not gpu.aux_attributes:
558 self.fail('Browser must support GPU aux attributes')
559 if not gpu.aux_attributes['software_rendering']:
560 self.fail("Software rendering was disabled")
561 device = gpu.devices[0]
562 if not device:
563 self.fail("System Info doesn't have a device")
564 if device.vendor_id != 0:
565 self.fail("Wrong vendor ID. Expected 0, got " + hex(device.vendor_id))
566 if device.device_id != 0:
567 self.fail("Wrong device ID. Expected 0, got " + hex(device.device_id))
Ken Russell (switch to Gerrit) 2017/03/31 22:47:11 Great. Did these new parts fail without your patch
sugoi1 2017/04/01 02:05:40 Yes, locally, vendor_id and device_id tests failed
552 568
553 def load_tests(loader, tests, pattern): 569 def load_tests(loader, tests, pattern):
554 del loader, tests, pattern # Unused. 570 del loader, tests, pattern # Unused.
555 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) 571 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__])
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698