| 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..76865dab775ebee8e09e27c2185e536529ceafa2
|
| --- /dev/null
|
| +++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations_unittest.py
|
| @@ -0,0 +1,62 @@
|
| +# 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 gpu_test_base
|
| +import webgl_conformance_expectations
|
| +
|
| +import pdb
|
| +
|
| +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()
|
| + gpu_device = browser.returned_system_info._gpu._devices[0]
|
| + gpu_device._vendor_id = 0x1002
|
| + gpu_device._device_id = 0x6779
|
| + 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')
|
|
|