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

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

Issue 1358943002: Add unit test for glsl-construct-vec-mat-index's expectations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused import. Created 5 years, 3 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
Index: content/test/gpu/gpu_tests/webgl_conformance_expectations_unittest.py
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations_unittest.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..2501aac273765d96df78a65bfa1f148c3dc7e211
--- /dev/null
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations_unittest.py
@@ -0,0 +1,60 @@
+# Copyright 2015 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.
+import os
+import unittest
+
+from telemetry.core import util
+from telemetry.testing import fakes
+
+import fake_win_amd_gpu_info
+import gpu_test_base
+import webgl_conformance_expectations
+
+class FakeWindowsPlatform(fakes.FakePlatform):
+ @property
+ def is_host_platform(self):
+ return True
+
+ def GetDeviceTypeName(self):
+ return 'Desktop'
+
+ def GetArchName(self):
+ return 'x86_64'
+
+ def GetOSName(self):
+ return 'win'
+
+ def GetOSVersionName(self):
+ return 'win8'
+
+
+class FakePage(gpu_test_base.PageBase):
+ def __init__(self, url, expectations):
+ super(FakePage, self).__init__(
+ name=('WebglConformance.%s' %
+ url.replace('/', '_').replace('-', '_').
+ replace('\\', '_').rpartition('.')[0].replace('.', '_')),
+ url='file://' + url,
+ page_set=None,
+ shared_page_state_class=gpu_test_base.FakeGpuSharedPageState,
+ expectations=expectations)
+
+class WebGLConformanceExpectationsTest(unittest.TestCase):
+ def testGlslConstructVecMatIndexExpectationOnWin(self):
+ possible_browser = fakes.FakePossibleBrowser()
+ browser = possible_browser.Create(None)
+ browser.platform = FakeWindowsPlatform()
+ browser.returned_system_info = fakes.FakeSystemInfo(
+ gpu_dict=fake_win_amd_gpu_info.FAKE_GPU_INFO)
+ expectations = webgl_conformance_expectations.\
+ WebGLConformanceExpectations(
+ os.path.join(
+ util.GetChromiumSrcDir(),
+ 'third_party', 'webgl', 'src', 'sdk', 'tests'))
+ page = FakePage(
+ 'conformance/glsl/constructors/glsl-construct-vec-mat-index.html',
+ expectations)
+ expectation = expectations.GetExpectationForPage(browser, page)
+ # TODO(kbr): change this expectation back to "flaky". crbug.com/534697
+ self.assertEquals(expectation, 'fail')
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_test_base_unittest.py ('k') | tools/telemetry/telemetry/testing/fakes/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698