Title: [285414] trunk
Revision
285414
Author
[email protected]
Date
2021-11-08 10:45:48 -0800 (Mon, 08 Nov 2021)

Log Message

WPT test importer imports rel="mismatch" as the reference
https://bugs.webkit.org/show_bug.cgi?id=207175
<rdar://problem/69332102>

Reviewed by Jonathan Bedard.

LayoutTests/imported/w3c:

Re-imported css/css-fonts/standard-font-family-5.html from WPT, so the -expected.html file gets renamed to -expected-mismatch.html.

* web-platform-tests/css/css-fonts/standard-font-family-5-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected.html.
* web-platform-tests/css/css-fonts/w3c-import.log:

Tools:

Setting "-expected-mismatch" suffix for <meta rel="mismatch"> references from WPT.

* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.find_importable_tests): Adding "-mismatch" suffix as needed.
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test): Store the reference type in test_info["type"].
* Scripts/webkitpy/w3c/test_parser_unittest.py:
(test_analyze_test_reftest_one_mismatch): Add new test cases for the reference type.

LayoutTests:

css/css-fonts/standard-font-family-5.html stars passing now.

* TestExpectations:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (285413 => 285414)


--- trunk/LayoutTests/ChangeLog	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/LayoutTests/ChangeLog	2021-11-08 18:45:48 UTC (rev 285414)
@@ -1,3 +1,15 @@
+2021-11-08  Manuel Rego Casasnovas  <[email protected]>
+
+        WPT test importer imports rel="mismatch" as the reference
+        https://bugs.webkit.org/show_bug.cgi?id=207175
+        <rdar://problem/69332102>
+
+        Reviewed by Jonathan Bedard.
+
+        css/css-fonts/standard-font-family-5.html stars passing now.
+
+        * TestExpectations:
+
 2021-11-08  Antti Koivisto  <[email protected]>
 
         [CSS Cascade Layers] Support 'revert-layer' value

Modified: trunk/LayoutTests/TestExpectations (285413 => 285414)


--- trunk/LayoutTests/TestExpectations	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/LayoutTests/TestExpectations	2021-11-08 18:45:48 UTC (rev 285414)
@@ -3573,7 +3573,6 @@
 webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-20.html [ ImageOnlyFailure ]
 webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-3.html [ ImageOnlyFailure ]
 webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-4.html [ ImageOnlyFailure ]
-webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5.html [ ImageOnlyFailure ]
 webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-6.html [ ImageOnlyFailure ]
 webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-7.html [ ImageOnlyFailure ]
 webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-8.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (285413 => 285414)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-11-08 18:45:48 UTC (rev 285414)
@@ -1,3 +1,16 @@
+2021-11-08  Manuel Rego Casasnovas  <[email protected]>
+
+        WPT test importer imports rel="mismatch" as the reference
+        https://bugs.webkit.org/show_bug.cgi?id=207175
+        <rdar://problem/69332102>
+
+        Reviewed by Jonathan Bedard.
+
+        Re-imported css/css-fonts/standard-font-family-5.html from WPT, so the -expected.html file gets renamed to -expected-mismatch.html.
+
+        * web-platform-tests/css/css-fonts/standard-font-family-5-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected.html.
+        * web-platform-tests/css/css-fonts/w3c-import.log:
+
 2021-11-08  Antti Koivisto  <[email protected]>
 
         [CSS Cascade Layers] Support 'revert-layer' value

Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected-mismatch.html (from rev 285413, trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected.html) (0 => 285414)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected-mismatch.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected-mismatch.html	2021-11-08 18:45:48 UTC (rev 285414)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="author" title="Myles C. Maxfield" href=""
+</head>
+<body>
+<div>
+<div style="display: inline-block; font: 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div>
+</div>
+</body>
+</html>

Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected.html (285413 => 285414)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected.html	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected.html	2021-11-08 18:45:48 UTC (rev 285414)
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<link rel="author" title="Myles C. Maxfield" href=""
-</head>
-<body>
-<div>
-<div style="display: inline-block; font: 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div>
-</div>
-</body>
-</html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/w3c-import.log (285413 => 285414)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/w3c-import.log	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/w3c-import.log	2021-11-08 18:45:48 UTC (rev 285414)
@@ -423,7 +423,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-4-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-4-notref.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-4.html
-/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-expected-mismatch.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5-notref.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-5.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/standard-font-family-6-expected.html

Modified: trunk/Tools/ChangeLog (285413 => 285414)


--- trunk/Tools/ChangeLog	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/Tools/ChangeLog	2021-11-08 18:45:48 UTC (rev 285414)
@@ -1,3 +1,20 @@
+2021-11-08  Manuel Rego Casasnovas  <[email protected]>
+
+        WPT test importer imports rel="mismatch" as the reference
+        https://bugs.webkit.org/show_bug.cgi?id=207175
+        <rdar://problem/69332102>
+
+        Reviewed by Jonathan Bedard.
+
+        Setting "-expected-mismatch" suffix for <meta rel="mismatch"> references from WPT.
+
+        * Scripts/webkitpy/w3c/test_importer.py:
+        (TestImporter.find_importable_tests): Adding "-mismatch" suffix as needed.
+        * Scripts/webkitpy/w3c/test_parser.py:
+        (TestParser.analyze_test): Store the reference type in test_info["type"].
+        * Scripts/webkitpy/w3c/test_parser_unittest.py:
+        (test_analyze_test_reftest_one_mismatch): Add new test cases for the reference type.
+
 2021-11-08  Kate Cheney  <[email protected]>
 
         [ iOS15 EWS ] TestWebKitAPI.AppPrivacyReport.LoadSimulatedRequest tests are timing out

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_importer.py (285413 => 285414)


--- trunk/Tools/Scripts/webkitpy/w3c/test_importer.py	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_importer.py	2021-11-08 18:45:48 UTC (rev 285414)
@@ -349,6 +349,8 @@
                     # Using a naming convention creates duplicate copies of the
                     # reference files.
                     ref_file = self.filesystem.splitext(test_basename)[0] + '-expected'
+                    if test_info['type'] == 'mismatch':
+                        ref_file += '-mismatch'
                     ref_file += self.filesystem.splitext(test_info['reference'])[1]
 
                     copy_list.append({'src': test_info['reference'], 'dest': ref_file, 'reference_support_info': test_info['reference_support_info']})

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_parser.py (285413 => 285414)


--- trunk/Tools/Scripts/webkitpy/w3c/test_parser.py	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_parser.py	2021-11-08 18:45:48 UTC (rev 285414)
@@ -97,6 +97,8 @@
                     ref_file = self.filesystem.join(self.source_root_directory, href_match_file.lstrip('/'))
                 else:
                     ref_file = self.filesystem.join(self.filesystem.dirname(self.filename), href_match_file)
+
+                reference_type = matches[0]['rel'][0] if isinstance(matches[0]['rel'], list) else matches[0]['rel']
             except KeyError as e:
                 # FIXME: Figure out what to do w/ invalid test files.
                 _log.error('%s has a reference link but is missing the "href"', self.filesystem)
@@ -108,7 +110,7 @@
             if self.ref_doc is None:
                 self.load_file(ref_file, True)
 
-            test_info = {'test': self.filename, 'reference': ref_file}
+            test_info = {'test': self.filename, 'reference': ref_file, 'type': reference_type}
 
             # If the ref file does not live in the same directory as the test file, check it for support files
             test_info['reference_support_info'] = {}

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py (285413 => 285414)


--- trunk/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py	2021-11-08 18:37:35 UTC (rev 285413)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py	2021-11-08 18:45:48 UTC (rev 285414)
@@ -53,9 +53,29 @@
         self.assertTrue('test' in test_info.keys(), 'did not find a test file')
         self.assertTrue('reference' in test_info.keys(), 'did not find a reference file')
         self.assertTrue(test_info['reference'].startswith(test_path), 'reference path is not correct')
+        self.assertTrue('type' in test_info.keys(), 'did not find a reference type')
+        self.assertEqual(test_info['type'], 'match', 'reference type is not correct')
         self.assertFalse('refsupport' in test_info.keys(), 'there should be no refsupport files for this test')
         self.assertFalse('jstest' in test_info.keys(), 'test should not have been analyzed as a jstest')
 
+    def test_analyze_test_reftest_one_mismatch(self):
+        test_html = """<head>
+<link rel="mismatch" href="" />
+</head>
+"""
+        test_path = os.path.join(os.path.sep, 'some', 'madeup', 'path')
+        parser = TestParser(options, os.path.join(test_path, 'somefile.html'))
+        test_info = parser.analyze_test(test_contents=test_html)
+
+        self.assertNotEqual(test_info, None, 'did not find a test')
+        self.assertTrue('test' in test_info.keys(), 'did not find a test file')
+        self.assertTrue('reference' in test_info.keys(), 'did not find a reference file')
+        self.assertTrue(test_info['reference'].startswith(test_path), 'reference path is not correct')
+        self.assertTrue('type' in test_info.keys(), 'did not find a reference type')
+        self.assertEqual(test_info['type'], 'mismatch', 'reference type is not correct')
+        self.assertFalse('refsupport' in test_info.keys(), 'there should be no refsupport files for this test')
+        self.assertFalse('jstest' in test_info.keys(), 'test should not have been analyzed as a jstest')
+
     def test_analyze_test_reftest_multiple_matches(self):
         test_html = """<head>
 <link rel="match" href="" />
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to