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