OLD | NEW |
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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 '12.1') | 573 '12.1') |
574 | 574 |
575 class HasTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage): | 575 class HasTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage): |
576 def __init__(self, story_set, expectations): | 576 def __init__(self, story_set, expectations): |
577 super(HasTransparentVisualsGpuProcessPage, self).__init__( | 577 super(HasTransparentVisualsGpuProcessPage, self).__init__( |
578 name='GpuProcess.has_transparent_visuals_gpu_process', | 578 name='GpuProcess.has_transparent_visuals_gpu_process', |
579 page_set=story_set, | 579 page_set=story_set, |
580 shared_page_state_class=HasTransparentVisualsShared, | 580 shared_page_state_class=HasTransparentVisualsShared, |
581 expectations=expectations, | 581 expectations=expectations, |
582 expected_workaround=None, | 582 expected_workaround=None, |
583 unexpected_workaround='disable_transparent_visuals') | 583 unexpected_workaround=None) |
584 | 584 |
585 def Validate(self, tab, results): | 585 def Validate(self, tab, results): |
586 if sys.platform.startswith('linux'): | 586 if sys.platform.startswith('linux'): |
587 super(HasTransparentVisualsGpuProcessPage, self).Validate(tab, results) | 587 super(HasTransparentVisualsGpuProcessPage, self).Validate(tab, results) |
588 | 588 |
589 | 589 |
590 class NoTransparentVisualsShared(GpuProcessSharedPageState): | 590 class NoTransparentVisualsShared(GpuProcessSharedPageState): |
591 def __init__(self, test, finder_options, story_set): | 591 def __init__(self, test, finder_options, story_set): |
592 super(NoTransparentVisualsShared, self).__init__( | 592 super(NoTransparentVisualsShared, self).__init__( |
593 test, finder_options, story_set) | 593 test, finder_options, story_set) |
594 options = finder_options.browser_options | |
595 if sys.platform.startswith('linux'): | |
596 options.AppendExtraBrowserArgs('--disable_transparent_visuals=1') | |
597 | 594 |
598 class NoTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage): | 595 class NoTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage): |
599 def __init__(self, story_set, expectations): | 596 def __init__(self, story_set, expectations): |
600 super(NoTransparentVisualsGpuProcessPage, self).__init__( | 597 super(NoTransparentVisualsGpuProcessPage, self).__init__( |
601 name='GpuProcess.no_transparent_visuals_gpu_process', | 598 name='GpuProcess.no_transparent_visuals_gpu_process', |
602 page_set=story_set, | 599 page_set=story_set, |
603 shared_page_state_class=NoTransparentVisualsShared, | 600 shared_page_state_class=NoTransparentVisualsShared, |
604 expectations=expectations, | 601 expectations=expectations, |
605 expected_workaround='disable_transparent_visuals', | 602 expected_workaround=None, |
606 unexpected_workaround=None) | 603 unexpected_workaround=None) |
607 | 604 |
608 def Validate(self, tab, results): | 605 def Validate(self, tab, results): |
609 if sys.platform.startswith('linux'): | 606 if sys.platform.startswith('linux'): |
610 super(NoTransparentVisualsGpuProcessPage, self).Validate(tab, results) | 607 super(NoTransparentVisualsGpuProcessPage, self).Validate(tab, results) |
611 | 608 |
612 | 609 |
613 class TransferWorkaroundSharedPageState(GpuProcessSharedPageState): | 610 class TransferWorkaroundSharedPageState(GpuProcessSharedPageState): |
614 def __init__(self, test, finder_options, story_set): | 611 def __init__(self, test, finder_options, story_set): |
615 super(TransferWorkaroundSharedPageState, self).__init__( | 612 super(TransferWorkaroundSharedPageState, self).__init__( |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 | 760 |
764 # There is currently no entry in kSoftwareRenderingListJson that enables | 761 # There is currently no entry in kSoftwareRenderingListJson that enables |
765 # a software GL driver on Android. | 762 # a software GL driver on Android. |
766 self.AddStory(SoftwareGpuProcessPage(self, expectations)) | 763 self.AddStory(SoftwareGpuProcessPage(self, expectations)) |
767 | 764 |
768 @property | 765 @property |
769 def allow_mixed_story_states(self): | 766 def allow_mixed_story_states(self): |
770 # Return True here in order to be able to run pages with different browser | 767 # Return True here in order to be able to run pages with different browser |
771 # command line arguments. | 768 # command line arguments. |
772 return True | 769 return True |
OLD | NEW |