Title: [288962] trunk/Tools
Revision
288962
Author
gsnedd...@apple.com
Date
2022-02-02 10:32:06 -0800 (Wed, 02 Feb 2022)

Log Message

REGRESSION (r288869): webkitpy.w3c.test_converter_unittest.W3CTestConverterTest.test_convert_prefixed_properties is failing
https://bugs.webkit.org/show_bug.cgi?id=235961
<rdar://problem/88332029>

Reviewed by Ryan Haddad.

* Scripts/webkitpy/w3c/test_converter_unittest.py:
(test_convert_prefixed_properties): Correct magic constant for number of tests.
(generate_test_content): Simplify, add clear assertion to catch in future.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (288961 => 288962)


--- trunk/Tools/ChangeLog	2022-02-02 18:14:25 UTC (rev 288961)
+++ trunk/Tools/ChangeLog	2022-02-02 18:32:06 UTC (rev 288962)
@@ -1,3 +1,15 @@
+2022-02-02  Sam Sneddon  <gsnedd...@apple.com>
+
+        REGRESSION (r288869): webkitpy.w3c.test_converter_unittest.W3CTestConverterTest.test_convert_prefixed_properties is failing
+        https://bugs.webkit.org/show_bug.cgi?id=235961
+        <rdar://problem/88332029>
+
+        Reviewed by Ryan Haddad.
+
+        * Scripts/webkitpy/w3c/test_converter_unittest.py:
+        (test_convert_prefixed_properties): Correct magic constant for number of tests.
+        (generate_test_content): Simplify, add clear assertion to catch in future.
+
 2022-02-02  Jonathan Bedard  <jbed...@apple.com>
 
         [EWS] unit tests have become slower

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py (288961 => 288962)


--- trunk/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py	2022-02-02 18:14:25 UTC (rev 288961)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py	2022-02-02 18:32:06 UTC (rev 288962)
@@ -264,7 +264,7 @@
 </html>
 """
         converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None)
-        test_content = self.generate_test_content_properties_and_values(converter.prefixed_properties, converter.prefixed_property_values, 20, test_html)
+        test_content = self.generate_test_content_properties_and_values(converter.prefixed_properties, converter.prefixed_property_values, 19, test_html)
 
         with OutputCapture():
             converter.feed(test_content[2])
@@ -403,11 +403,8 @@
         return (test_content_properties[0], test_content_property_values[0], test_content_property_values[1])
 
     def generate_test_content(self, full_list, num_test, suffix, html):
-        test_list = []
-        count = 0
-        while count < num_test:
-            test_list.append(full_list[count])
-            count += 1
+        assert num_test <= len(full_list), "can't generate more tests than we have input data for"
+        test_list = full_list[:num_test]
 
         # Replace the tokens in the testhtml with the test properties or values.
         # Walk backward through the list to replace the double-digit tokens first.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to