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

Side by Side Diff: content/test/gpu/page_sets/gpu_process_tests.py

Issue 2124633002: Add new gpu driver bug workaround DISABLE_TRANSPARENT_VISUALS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just make sure the new gpu driver workaround exist in second test instead of using fake values Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import sys 4 import sys
5 from telemetry.story import story_set as story_set_module 5 from telemetry.story import story_set as story_set_module
6 from telemetry.page import page_test 6 from telemetry.page import page_test
7 7
8 from gpu_tests import gpu_test_base 8 from gpu_tests import gpu_test_base
9 9
10 class GpuProcessSharedPageState(gpu_test_base.GpuSharedPageState): 10 class GpuProcessSharedPageState(gpu_test_base.GpuSharedPageState):
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 diff = set(browser_list).symmetric_difference(set(gpu_list)) 516 diff = set(browser_list).symmetric_difference(set(gpu_list))
517 if len(diff) > 0: 517 if len(diff) > 0:
518 print 'Test failed. Printing page contents:' 518 print 'Test failed. Printing page contents:'
519 print tab.EvaluateJavaScript('document.body.innerHTML') 519 print tab.EvaluateJavaScript('document.body.innerHTML')
520 raise page_test.Failure('Browser and GPU process list of driver bug' \ 520 raise page_test.Failure('Browser and GPU process list of driver bug' \
521 'workarounds are not equal: %s != %s, diff: %s' % \ 521 'workarounds are not equal: %s != %s, diff: %s' % \
522 (browser_list, gpu_list, list(diff))) 522 (browser_list, gpu_list, list(diff)))
523 523
524 524
525 class HasTransparentVisualsShared(GpuProcessSharedPageState):
526 def __init__(self, test, finder_options, story_set):
527 super(HasTransparentVisualsShared, self).__init__(
528 test, finder_options, story_set)
529 options = finder_options.browser_options
530 if sys.platform.startswith('linux'):
531 # Hit id 173 from kGpuDriverBugListJson.
532 options.AppendExtraBrowserArgs('--gpu-testing-gl-version=3.0 Mesa ' \
533 '12.1')
534
535 class HasTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage):
536 def __init__(self, story_set, expectations):
537 super(HasTransparentVisualsGpuProcessPage, self).__init__(
538 name='GpuProcess.has_transparent_visuals_gpu_process',
539 page_set=story_set,
540 shared_page_state_class=HasTransparentVisualsShared,
541 expectations=expectations,
542 expected_workaround=None,
543 unexpected_workaround='disable_transparent_visuals')
544
545 def Validate(self, tab, results):
546 if sys.platform.startswith('linux'):
547 super(HasTransparentVisualsGpuProcessPage, self).Validate(tab, results)
548
549
550 class NoTransparentVisualsShared(GpuProcessSharedPageState):
551 def __init__(self, test, finder_options, story_set):
552 super(NoTransparentVisualsShared, self).__init__(
553 test, finder_options, story_set)
554 options = finder_options.browser_options
555 if sys.platform.startswith('linux'):
556 options.AppendExtraBrowserArgs('--disable_transparent_visuals=1')
557
558 class NoTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage):
559 def __init__(self, story_set, expectations):
560 super(NoTransparentVisualsGpuProcessPage, self).__init__(
561 name='GpuProcess.no_transparent_visuals_gpu_process',
562 page_set=story_set,
563 shared_page_state_class=NoTransparentVisualsShared,
564 expectations=expectations,
565 expected_workaround='disable_transparent_visuals',
566 unexpected_workaround=None)
567
568 def Validate(self, tab, results):
569 if sys.platform.startswith('linux'):
570 super(NoTransparentVisualsGpuProcessPage, self).Validate(tab, results)
571
572
525 class GpuProcessTestsStorySet(story_set_module.StorySet): 573 class GpuProcessTestsStorySet(story_set_module.StorySet):
526 574
527 """ Tests that accelerated content triggers the creation of a GPU process """ 575 """ Tests that accelerated content triggers the creation of a GPU process """
528 576
529 def __init__(self, expectations, is_platform_android): 577 def __init__(self, expectations, is_platform_android):
530 super(GpuProcessTestsStorySet, self).__init__( 578 super(GpuProcessTestsStorySet, self).__init__(
531 serving_dirs=set(['../../../../content/test/data'])) 579 serving_dirs=set(['../../../../content/test/data']))
532 580
533 urls_and_names_list = [ 581 urls_and_names_list = [
534 ('file://../../data/gpu/functional_canvas_demo.html', 582 ('file://../../data/gpu/functional_canvas_demo.html',
535 'GpuProcess.canvas2d'), 583 'GpuProcess.canvas2d'),
536 ('file://../../data/gpu/functional_3d_css.html', 584 ('file://../../data/gpu/functional_3d_css.html',
537 'GpuProcess.css3d'), 585 'GpuProcess.css3d'),
538 ('file://../../data/gpu/functional_webgl.html', 586 ('file://../../data/gpu/functional_webgl.html',
539 'GpuProcess.webgl') 587 'GpuProcess.webgl')
540 ] 588 ]
541 589
542 for url, name in urls_and_names_list: 590 for url, name in urls_and_names_list:
543 self.AddStory(GpuProcessTestsPage(url, name, self, expectations)) 591 self.AddStory(GpuProcessTestsPage(url, name, self, expectations))
544 592
545 self.AddStory(FunctionalVideoPage(self, expectations)) 593 self.AddStory(FunctionalVideoPage(self, expectations))
546 self.AddStory(GpuInfoCompletePage(self, expectations)) 594 self.AddStory(GpuInfoCompletePage(self, expectations))
547 self.AddStory(NoGpuProcessPage(self, expectations)) 595 self.AddStory(NoGpuProcessPage(self, expectations))
548 self.AddStory(SoftwareGpuProcessPage(self, expectations)) 596 self.AddStory(SoftwareGpuProcessPage(self, expectations))
549 if not is_platform_android:
550 self.AddStory(SkipGpuProcessPage(self, expectations))
551 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations)) 597 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations))
552 self.AddStory(IdentifyActiveGpuPage1(self, expectations)) 598 self.AddStory(IdentifyActiveGpuPage1(self, expectations))
553 self.AddStory(IdentifyActiveGpuPage2(self, expectations)) 599 self.AddStory(IdentifyActiveGpuPage2(self, expectations))
554 self.AddStory(IdentifyActiveGpuPage3(self, expectations)) 600 self.AddStory(IdentifyActiveGpuPage3(self, expectations))
555 self.AddStory(IdentifyActiveGpuPage4(self, expectations)) 601 self.AddStory(IdentifyActiveGpuPage4(self, expectations))
556 self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations)) 602 self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
557 self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations)) 603 self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations))
558 self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self, 604 self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self,
559 expectations)) 605 expectations))
606 if not is_platform_android:
607 self.AddStory(SkipGpuProcessPage(self, expectations))
608 self.AddStory(HasTransparentVisualsGpuProcessPage(self, expectations))
609 self.AddStory(NoTransparentVisualsGpuProcessPage(self, expectations))
560 610
561 @property 611 @property
562 def allow_mixed_story_states(self): 612 def allow_mixed_story_states(self):
563 # Return True here in order to be able to run pages with different browser 613 # Return True here in order to be able to run pages with different browser
564 # command line arguments. 614 # command line arguments.
565 return True 615 return True
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | extensions/browser/api/app_window/app_window_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698