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

Unified Diff: content/test/gpu/gpu_tests/gpu_process.py

Issue 2611263002: Port gpu_process tests to gpu_integration_test harness. (Closed)
Patch Set: Added workaround for flakiness on Android. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/gpu/generate_buildbot_json.py ('k') | content/test/gpu/gpu_tests/gpu_process_expectations.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/gpu_process.py
diff --git a/content/test/gpu/gpu_tests/gpu_process.py b/content/test/gpu/gpu_tests/gpu_process.py
deleted file mode 100644
index 187b6b7ee116b61674154cf6fdbdb3a8f8ba37fb..0000000000000000000000000000000000000000
--- a/content/test/gpu/gpu_tests/gpu_process.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-from gpu_tests import gpu_process_expectations as expectations
-from gpu_tests import gpu_test_base
-import page_sets
-
-from telemetry.page import legacy_page_test
-
-test_harness_script = r"""
- var domAutomationController = {};
- domAutomationController._finished = false;
- domAutomationController.setAutomationId = function(id) {}
- domAutomationController.send = function(msg) {
- domAutomationController._finished = true;
- }
-
- window.domAutomationController = domAutomationController;
-
- function GetDriverBugWorkarounds() {
- var query_result = document.querySelector('.workarounds-list');
- var browser_list = []
- for (var i=0; i < query_result.childElementCount; i++)
- browser_list.push(query_result.children[i].textContent);
- return browser_list;
- };
-"""
-
-class GpuProcessValidator(gpu_test_base.ValidatorBase):
- def __init__(self):
- super(GpuProcessValidator, self).__init__(
- needs_browser_restart_after_each_page=True)
-
- def CustomizeBrowserOptions(self, options):
- options.AppendExtraBrowserArgs('--enable-gpu-benchmarking')
-
- def ValidateAndMeasurePage(self, page, tab, results):
- if hasattr(page, 'Validate'):
- page.Validate(tab, results)
- else:
- has_gpu_channel_js = 'chrome.gpuBenchmarking.hasGpuChannel()'
- has_gpu_channel = tab.EvaluateJavaScript(has_gpu_channel_js)
- if not has_gpu_channel:
- raise legacy_page_test.Failure('No GPU channel detected')
-
-class GpuProcess(gpu_test_base.TestBase):
- """Tests that accelerated content triggers the creation of a GPU process"""
- test = GpuProcessValidator
-
- @classmethod
- def Name(cls):
- return 'gpu_process'
-
- def _CreateExpectations(self):
- return expectations.GpuProcessExpectations()
-
- def CreateStorySet(self, options):
- browser_type = options.browser_options.browser_type
- is_platform_android = browser_type.startswith('android')
- story_set = page_sets.GpuProcessTestsStorySet(self.GetExpectations(),
- is_platform_android)
- for page in story_set:
- page.script_to_evaluate_on_commit = test_harness_script
- return story_set
« no previous file with comments | « content/test/gpu/generate_buildbot_json.py ('k') | content/test/gpu/gpu_tests/gpu_process_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698