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

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

Issue 2171023002: Revert of Add new gpu driver bug workaround DISABLE_TRANSPARENT_VISUALS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 # Hit id 173 from kGpuDriverBugListJson.
557 options.AppendExtraBrowserArgs('--gpu-testing-gl-version=4.5.0 ' \
558 'NVIDIA 352.41')
559
560 class NoTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage):
561 def __init__(self, story_set, expectations):
562 super(NoTransparentVisualsGpuProcessPage, self).__init__(
563 name='GpuProcess.no_transparent_visuals_gpu_process',
564 page_set=story_set,
565 shared_page_state_class=NoTransparentVisualsShared,
566 expectations=expectations,
567 expected_workaround='disable_transparent_visuals',
568 unexpected_workaround=None)
569
570 def Validate(self, tab, results):
571 if sys.platform.startswith('linux'):
572 super(NoTransparentVisualsGpuProcessPage, self).Validate(tab, results)
573
574
575 class GpuProcessTestsStorySet(story_set_module.StorySet): 525 class GpuProcessTestsStorySet(story_set_module.StorySet):
576 526
577 """ Tests that accelerated content triggers the creation of a GPU process """ 527 """ Tests that accelerated content triggers the creation of a GPU process """
578 528
579 def __init__(self, expectations, is_platform_android): 529 def __init__(self, expectations, is_platform_android):
580 super(GpuProcessTestsStorySet, self).__init__( 530 super(GpuProcessTestsStorySet, self).__init__(
581 serving_dirs=set(['../../../../content/test/data'])) 531 serving_dirs=set(['../../../../content/test/data']))
582 532
583 urls_and_names_list = [ 533 urls_and_names_list = [
584 ('file://../../data/gpu/functional_canvas_demo.html', 534 ('file://../../data/gpu/functional_canvas_demo.html',
(...skipping 15 matching lines...) Expand all
600 self.AddStory(SkipGpuProcessPage(self, expectations)) 550 self.AddStory(SkipGpuProcessPage(self, expectations))
601 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations)) 551 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations))
602 self.AddStory(IdentifyActiveGpuPage1(self, expectations)) 552 self.AddStory(IdentifyActiveGpuPage1(self, expectations))
603 self.AddStory(IdentifyActiveGpuPage2(self, expectations)) 553 self.AddStory(IdentifyActiveGpuPage2(self, expectations))
604 self.AddStory(IdentifyActiveGpuPage3(self, expectations)) 554 self.AddStory(IdentifyActiveGpuPage3(self, expectations))
605 self.AddStory(IdentifyActiveGpuPage4(self, expectations)) 555 self.AddStory(IdentifyActiveGpuPage4(self, expectations))
606 self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations)) 556 self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
607 self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations)) 557 self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations))
608 self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self, 558 self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self,
609 expectations)) 559 expectations))
610 self.AddStory(HasTransparentVisualsGpuProcessPage(self, expectations))
611 self.AddStory(NoTransparentVisualsGpuProcessPage(self, expectations))
612 560
613 @property 561 @property
614 def allow_mixed_story_states(self): 562 def allow_mixed_story_states(self):
615 # Return True here in order to be able to run pages with different browser 563 # Return True here in order to be able to run pages with different browser
616 # command line arguments. 564 # command line arguments.
617 return True 565 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