Title: [191158] trunk/LayoutTests
Revision
191158
Author
d...@apple.com
Date
2015-10-15 18:33:00 -0700 (Thu, 15 Oct 2015)

Log Message

Remove deprecated function insertRule(), replace with appendRule()
https://bugs.webkit.org/show_bug.cgi?id=150188

Unreviewed. This was a mistake in my review of Ryan's patch.
The CSSOM is confusing. This test was not always using a CSSKeyframesRule
object, so it should still be calling insertRule. This does produce
a console message, so added that to the expected result.

* http/tests/css/resources/shared-stylesheet-mutation.js:
(executeTests): Back to insertRule.
* http/tests/css/shared-stylesheet-mutation-expected.txt:
* http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt:

* http/tests/css/resources/shared-stylesheet-mutation.js:
(executeTests): Back to insertRule.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (191157 => 191158)


--- trunk/LayoutTests/ChangeLog	2015-10-16 00:34:38 UTC (rev 191157)
+++ trunk/LayoutTests/ChangeLog	2015-10-16 01:33:00 UTC (rev 191158)
@@ -1,3 +1,21 @@
+2015-10-15  Dean Jackson  <d...@apple.com>
+
+        Remove deprecated function insertRule(), replace with appendRule()
+        https://bugs.webkit.org/show_bug.cgi?id=150188
+
+        Unreviewed. This was a mistake in my review of Ryan's patch.
+        The CSSOM is confusing. This test was not always using a CSSKeyframesRule
+        object, so it should still be calling insertRule. This does produce
+        a console message, so added that to the expected result.
+
+        * http/tests/css/resources/shared-stylesheet-mutation.js:
+        (executeTests): Back to insertRule.
+        * http/tests/css/shared-stylesheet-mutation-expected.txt:
+        * http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt:
+
+        * http/tests/css/resources/shared-stylesheet-mutation.js:
+        (executeTests): Back to insertRule.
+
 2015-10-15  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r191156.

Modified: trunk/LayoutTests/http/tests/css/resources/shared-stylesheet-mutation.js (191157 => 191158)


--- trunk/LayoutTests/http/tests/css/resources/shared-stylesheet-mutation.js	2015-10-16 00:34:38 UTC (rev 191157)
+++ trunk/LayoutTests/http/tests/css/resources/shared-stylesheet-mutation.js	2015-10-16 01:33:00 UTC (rev 191158)
@@ -77,9 +77,9 @@
 
     mutationTest(0, '', 'red');
 
-    mutationTest(1, 'sheet.appendRule("#testdiv { background-color: green; }", 3)', 'green');
+    mutationTest(1, 'sheet.insertRule("#testdiv { background-color: green; }", 3)', 'green');
     mutationTest(2, 'sheet.deleteRule(2)');
-    mutationTest(3, 'sheet.cssRules[2].appendRule("#testdiv { background-color: green; }", 1)', 'green');
+    mutationTest(3, 'sheet.cssRules[2].insertRule("#testdiv { background-color: green; }", 1)', 'green');
     mutationTest(4, 'sheet.cssRules[2].deleteRule(0)', 'green');
     mutationTest(5, 'sheet.cssRules[2].cssRules[0].style.setProperty("background-color", "green", "")', 'green');
     mutationTest(6, 'sheet.cssRules[2].cssRules[0].style.removeProperty("background-color")', 'green');
@@ -95,7 +95,7 @@
     
     var testString = '\
         sheet.deleteRule(3);\
-        sheet.appendRule("#testdiv { background-color: green; }", 1);\
+        sheet.insertRule("#testdiv { background-color: green; }", 1);\
         sheet.deleteRule(2);\
         sheet.deleteRule(0);\
         sheet.deleteRule(3);\
@@ -105,10 +105,10 @@
     mutationTest(11, testString, 'green');
 
     var importRule = '@import "data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D";';
-    mutationTest(12, "sheet.appendRule('"+importRule+"', 1)", 'green');
+    mutationTest(12, "sheet.insertRule('"+importRule+"', 1)", 'green');
 
     mutationTest(13, 'sheet.cssRules[3].selectorText = "foo"', 'red');
-    mutationTest(14, 'sheet.cssRules[4].appendRule("40% { left: 40px; }")', 'red');
+    mutationTest(14, 'sheet.cssRules[4].insertRule("40% { left: 40px; }")', 'red');
     mutationTest(15, 'sheet.cssRules[4].deleteRule("100%")', 'red');
     mutationTest(16, 'sheet.cssRules[5].style.setProperty("font-family", "Bar", "")', 'red');
 

Modified: trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt (191157 => 191158)


--- trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt	2015-10-16 00:34:38 UTC (rev 191157)
+++ trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt	2015-10-16 01:33:00 UTC (rev 191158)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 1: CSSKeyframesRule 'insertRule' function is deprecated.  Use 'appendRule' instead.
 The test loads the same stylesheet to different frames and then mutates them. The mutations should not affect other frames.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Modified: trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt (191157 => 191158)


--- trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt	2015-10-16 00:34:38 UTC (rev 191157)
+++ trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt	2015-10-16 01:33:00 UTC (rev 191158)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 1: CSSKeyframesRule 'insertRule' function is deprecated.  Use 'appendRule' instead.
 The test loads the same stylesheet to different frames and then mutates them. The mutations should not affect other frames.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to