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

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: Stop using internal Telemetry fields in the unittest. 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 import pdb
nednguyen 2015/09/22 20:16:54 style nit: unused import. Tip: in telemetry, we h
Ken Russell (switch to Gerrit) 2015/09/22 20:37:01 Thanks. Fixed.
15
16 class FakeWindowsPlatform(fakes.FakePlatform):
17 @property
18 def is_host_platform(self):
19 return True
20
21 def GetDeviceTypeName(self):
22 return 'Desktop'
23
24 def GetArchName(self):
25 return 'x86_64'
26
27 def GetOSName(self):
28 return 'win'
29
30 def GetOSVersionName(self):
31 return 'win8'
32
33
34 class FakePage(gpu_test_base.PageBase):
35 def __init__(self, url, expectations):
36 super(FakePage, self).__init__(
37 name=('WebglConformance.%s' %
38 url.replace('/', '_').replace('-', '_').
39 replace('\\', '_').rpartition('.')[0].replace('.', '_')),
40 url='file://' + url,
41 page_set=None,
42 shared_page_state_class=gpu_test_base.FakeGpuSharedPageState,
43 expectations=expectations)
44
45 class WebGLConformanceExpectationsTest(unittest.TestCase):
46 def testGlslConstructVecMatIndexExpectationOnWin(self):
47 possible_browser = fakes.FakePossibleBrowser()
48 browser = possible_browser.Create(None)
49 browser.platform = FakeWindowsPlatform()
50 browser.returned_system_info = fakes.FakeSystemInfo(
51 gpu_dict=fake_win_amd_gpu_info.FAKE_GPU_INFO)
52 expectations = webgl_conformance_expectations.\
53 WebGLConformanceExpectations(
54 os.path.join(
55 util.GetChromiumSrcDir(),
56 'third_party', 'webgl', 'src', 'sdk', 'tests'))
57 page = FakePage(
58 'conformance/glsl/constructors/glsl-construct-vec-mat-index.html',
59 expectations)
60 expectation = expectations.GetExpectationForPage(browser, page)
61 # TODO(kbr): change this expectation back to "flaky". crbug.com/534697
62 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