Modified: trunk/Tools/Scripts/webkitpy/common/test_expectations_unittest.py (227405 => 227406)
--- trunk/Tools/Scripts/webkitpy/common/test_expectations_unittest.py 2018-01-23 06:50:39 UTC (rev 227405)
+++ trunk/Tools/Scripts/webkitpy/common/test_expectations_unittest.py 2018-01-23 07:11:37 UTC (rev 227406)
@@ -163,6 +163,28 @@
}
}"""
+ SLOW = """
+{
+ "TestCookieManager": {
+ "expected": {"all": {"slow": true}},
+ "subtests": {
+ "/webkit2/WebKitCookieManager/persistent-storage": {
+ "expected": {"wpe": {"status": ["FAIL"], "slow": false, "bug": "1234"}}
+ }
+ }
+ },
+ "TestWebKit": {
+ "subtests": {
+ "WebKit.MouseMoveAfterCrash": {
+ "expected": {"all": {"status": ["FAIL"], "slow": true, "bug": "1234"}}
+ },
+ "WebKit.WKConnection": {
+ "expected": {"gtk": {"status": ["CRASH"], "bug": "1234"}}
+ }
+ }
+ }
+}"""
+
def assert_exp(self, test, subtest, result):
self.assertIn(result, self.expectations.get_expectation(test, subtest))
@@ -175,6 +197,9 @@
def assert_skip(self, test, subtest, result):
self.assertEqual(self.expectations.is_skip(test, subtest), result)
+ def assert_slow(self, test, subtest, result):
+ self.assertEqual(self.expectations.is_slow(test, subtest), result)
+
def test_basic(self):
self.expectations = MockTestExpectations('gtk', self.BASIC)
self.assert_exp('imported/w3c/webdriver/tests/test5.py', 'test5_two', 'PASS')
@@ -252,3 +277,19 @@
self.expectations = MockTestExpectations('wpe', self.BUILD_TYPE, 'Debug')
self.assert_skip('TestWebViewEditor', None, True)
self.assert_skip('TestWebViewEditor', '/webkit2/WebKitWebView/editable/editable', True)
+
+ def test_slow(self):
+ self.expectations = MockTestExpectations('gtk', self.SLOW)
+ self.assert_slow('TestCookieManager', '/webkit2/WebKitCookieManager/basic', True)
+ self.assert_slow('TestCookieManager', '/webkit2/WebKitCookieManager/persistent-storage', True)
+ self.assert_slow('TestWebKit', 'WebKit.WKView', False)
+ self.assert_slow('TestWebKit', 'WebKit.MouseMoveAfterCrash', True)
+ self.assert_exp('TestWebKit', 'WebKit.MouseMoveAfterCrash', 'FAIL')
+ self.assert_slow('TestWebKit', 'WebKit.WKConnection', False)
+
+ self.expectations = MockTestExpectations('wpe', self.SLOW)
+ self.assert_slow('TestCookieManager', '/webkit2/WebKitCookieManager/basic', True)
+ self.assert_slow('TestCookieManager', '/webkit2/WebKitCookieManager/persistent-storage', False)
+ self.assert_slow('TestWebKit', 'WebKit.WKView', False)
+ self.assert_slow('TestWebKit', 'WebKit.MouseMoveAfterCrash', True)
+ self.assert_slow('TestWebKit', 'WebKit.WKConnection', False)