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

Side by Side 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, 2 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
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 import os
5 import unittest
6
7 from telemetry.core import util
8 from telemetry.testing import fakes
9
10 import fake_win_amd_gpu_info
11 import gpu_test_base
12 import webgl_conformance_expectations
13
14 class FakeWindowsPlatform(fakes.FakePlatform):
15 @property
16 def is_host_platform(self):
17 return True
18
19 def GetDeviceTypeName(self):
20 return 'Desktop'
21
22 def GetArchName(self):
23 return 'x86_64'
24
25 def GetOSName(self):
26 return 'win'
27
28 def GetOSVersionName(self):
29 return 'win8'
30
31
32 class FakePage(gpu_test_base.PageBase):
33 def __init__(self, url, expectations):
34 super(FakePage, self).__init__(
35 name=('WebglConformance.%s' %
36 url.replace('/', '_').replace('-', '_').
37 replace('\\', '_').rpartition('.')[0].replace('.', '_')),
38 url='file://' + url,
39 page_set=None,
40 shared_page_state_class=gpu_test_base.FakeGpuSharedPageState,
41 expectations=expectations)
42
43 class WebGLConformanceExpectationsTest(unittest.TestCase):
44 def testGlslConstructVecMatIndexExpectationOnWin(self):
45 possible_browser = fakes.FakePossibleBrowser()
46 browser = possible_browser.Create(None)
47 browser.platform = FakeWindowsPlatform()
48 browser.returned_system_info = fakes.FakeSystemInfo(
49 gpu_dict=fake_win_amd_gpu_info.FAKE_GPU_INFO)
50 expectations = webgl_conformance_expectations.\
51 WebGLConformanceExpectations(
52 os.path.join(
53 util.GetChromiumSrcDir(),
54 'third_party', 'webgl', 'src', 'sdk', 'tests'))
55 page = FakePage(
56 'conformance/glsl/constructors/glsl-construct-vec-mat-index.html',
57 expectations)
58 expectation = expectations.GetExpectationForPage(browser, page)
59 # TODO(kbr): change this expectation back to "flaky". crbug.com/534697
60 self.assertEquals(expectation, 'fail')
OLDNEW
« 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