editing/execCommand/hilitecolor.html and editing/style/remove-underline-from-styleshe...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Jul 2010 22:17:51 +0000 (22:17 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Jul 2010 22:17:51 +0000 (22:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=42793

Reviewed by Darin Adler.

Converted the tests and removed the platform specific expected results.

* editing/execCommand/hilitecolor-expected.txt: Added.
* editing/execCommand/hilitecolor.html: Converted.
* editing/style/remove-underline-from-stylesheet-expected.txt: Converted.
* editing/style/remove-underline-from-stylesheet.html: Converted.
* platform/chromium-linux/editing/execCommand/hilitecolor-expected.checksum: Removed.
* platform/chromium-win/editing/execCommand/hilitecolor-expected.checksum: Removed.
* platform/chromium-win/editing/execCommand/hilitecolor-expected.png: Removed.
* platform/chromium-win/editing/execCommand/hilitecolor-expected.txt: Removed.
* platform/mac/editing/execCommand/hilitecolor-expected.checksum: Removed.
* platform/mac/editing/execCommand/hilitecolor-expected.png: Removed.
* platform/mac/editing/execCommand/hilitecolor-expected.txt: Removed.
* platform/qt/editing/execCommand/hilitecolor-expected.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64013 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/hilitecolor-expected.txt [moved from LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.txt with 60% similarity]
LayoutTests/editing/execCommand/hilitecolor.html
LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt
LayoutTests/editing/style/remove-underline-from-stylesheet.html
LayoutTests/platform/chromium-linux/editing/execCommand/hilitecolor-expected.checksum [deleted file]
LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.checksum [deleted file]
LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.png [deleted file]
LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.txt [deleted file]
LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.checksum [deleted file]
LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.png [deleted file]
LayoutTests/platform/qt/editing/execCommand/hilitecolor-expected.txt [deleted file]

index 28f5d14..052bf3f 100644 (file)
@@ -1,3 +1,25 @@
+2010-07-23  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        editing/execCommand/hilitecolor.html and editing/style/remove-underline-from-stylesheet.html should be dumpAsMarkup tests
+        https://bugs.webkit.org/show_bug.cgi?id=42793
+
+        Converted the tests and removed the platform specific expected results.
+
+        * editing/execCommand/hilitecolor-expected.txt: Added.
+        * editing/execCommand/hilitecolor.html: Converted.
+        * editing/style/remove-underline-from-stylesheet-expected.txt: Converted.
+        * editing/style/remove-underline-from-stylesheet.html: Converted.
+        * platform/chromium-linux/editing/execCommand/hilitecolor-expected.checksum: Removed.
+        * platform/chromium-win/editing/execCommand/hilitecolor-expected.checksum: Removed.
+        * platform/chromium-win/editing/execCommand/hilitecolor-expected.png: Removed.
+        * platform/chromium-win/editing/execCommand/hilitecolor-expected.txt: Removed.
+        * platform/mac/editing/execCommand/hilitecolor-expected.checksum: Removed.
+        * platform/mac/editing/execCommand/hilitecolor-expected.png: Removed.
+        * platform/mac/editing/execCommand/hilitecolor-expected.txt: Removed.
+        * platform/qt/editing/execCommand/hilitecolor-expected.txt: Removed.
+
 2010-07-23  James Robinson  <jamesr@chromium.org>
 
         Unreviewed.  Add chromium expectations for new tests.
@@ -9,17 +9,13 @@ EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 29x18
-          text run at (0,0) width 29: "The "
-        RenderInline {SPAN} at (0,0) size 44x18 [bgcolor=#FF0000]
-          RenderText {#text} at (29,0) size 44x18
-            text run at (29,0) width 44: "second"
-        RenderText {#text} at (73,0) size 543x18
-          text run at (73,0) width 543: " word, and only the second word of this sentence should have a red background color."
-caret: position 0 of child 0 {#text} of child 0 {DIV} of body
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+
+<DIV id="test" contentEditable="true">
+<#text><selection-caret>The </#text>
+<SPAN style="background-color: red;" class="Apple-style-span">
+<#text>second</#text>
+</SPAN>
+<#text> word, and only the second word of this sentence should have a red background color.</#text>
+</DIV>
index 6834ece..b2f6651 100644 (file)
@@ -1,10 +1,9 @@
+<script src="../../resources/dump-as-markup.js"></script>
+<div id="test" contenteditable="true">The second word, and only the second word of this sentence should have a red background color.</div>
 <script>
 if (window.layoutTestController)
      layoutTestController.dumpEditingCallbacks();
-</script>
-<div id="test" contenteditable="true">The second word, and only the second word of this sentence should have a red background color.</div>
 
-<script>
 var sel = window.getSelection();
 var e = document.getElementById("test");
 
@@ -14,4 +13,6 @@ sel.modify("move", "forward", "word");
 sel.modify("extend", "backward", "word");
 document.execCommand("HiliteColor", false, "red");
 sel.modify("move", "backward", "line");
-</script>
\ No newline at end of file
+
+Markup.setNodeToDump('test')
+</script>
index 1a3ec1b..d3b3136 100644 (file)
@@ -68,7 +68,14 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-This tests removing underline from stylesheet. For consistency, underline should NOT be removed (see bug 27809).
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+This tests removing underline from stylesheet (.editing has underline). Because text-decoration that comes from a style rule cannot be pushed down, the underline should stay. (see bug 27809).
 
-xxxxxx xxxxxx xxxxxx
-xxxxxx xxxxxx xxxxxx<span id="test"></span>
+<DIV class="editing" id="root" contentEditable="">
+<#text>xxxxxx </#text>
+<#text><selection-anchor>xxxxxx<selection-focus></#text>
+<#text> xxxxxx</#text>
+<SPAN id="test">
+</SPAN>
+</DIV>
index 95cb6ad..4ee445d 100644 (file)
@@ -1,6 +1,5 @@
 <html> 
 <head>
-
 <style>
 .editing { 
     border: 2px solid red; 
@@ -9,8 +8,8 @@
     text-decoration: underline;
 }
 </style>
+<script src="../../resources/dump-as-markup.js"></script>
 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
-
 <script>
 
 function editingTest() {
@@ -32,18 +31,16 @@ function editingTest() {
 }
 
 </script>
-
-<title>Editing Test</title> 
+<title>Editing Test</title>
 </head> 
 <body>
-<p>This tests removing underline from stylesheet.  For consistency, underline should NOT be removed (see bug 27809).</p>
 <div contenteditable id="root" class="editing">
 <span id="test"></span>
 </div>
-
 <script>
+Markup.description('This tests removing underline from stylesheet (.editing has underline). Because text-decoration that comes from a style rule cannot be pushed down, the underline should stay. (see bug 27809).');
+Markup.setNodeToDump('root');
 runEditingTest();
 </script>
-
 </body>
 </html>
diff --git a/LayoutTests/platform/chromium-linux/editing/execCommand/hilitecolor-expected.checksum b/LayoutTests/platform/chromium-linux/editing/execCommand/hilitecolor-expected.checksum
deleted file mode 100644 (file)
index 3c3b29c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-377c5a99ece86782b750c7ea16f69ad3
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.checksum b/LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.checksum
deleted file mode 100644 (file)
index 49a35d3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-e9f172ce0e023db80546b0e0331213f9
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.png b/LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.png
deleted file mode 100644 (file)
index 8af01fe..0000000
Binary files a/LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.txt b/LayoutTests/platform/chromium-win/editing/execCommand/hilitecolor-expected.txt
deleted file mode 100644 (file)
index 391847f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 6 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x20
-        RenderText {#text} at (0,0) size 27x19
-          text run at (0,0) width 27: "The "
-        RenderInline {SPAN} at (0,0) size 43x19 [bgcolor=#FF0000]
-          RenderText {#text} at (27,0) size 43x19
-            text run at (27,0) width 43: "second"
-        RenderText {#text} at (70,0) size 521x19
-          text run at (70,0) width 521: " word, and only the second word of this sentence should have a red background color."
-caret: position 0 of child 0 {#text} of child 0 {DIV} of body
diff --git a/LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.checksum b/LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.checksum
deleted file mode 100644 (file)
index e8226f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-b1d045a2891f32c3be23051e231fcdc6
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.png b/LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.png
deleted file mode 100644 (file)
index cae4aa3..0000000
Binary files a/LayoutTests/platform/mac/editing/execCommand/hilitecolor-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/qt/editing/execCommand/hilitecolor-expected.txt b/LayoutTests/platform/qt/editing/execCommand/hilitecolor-expected.txt
deleted file mode 100644 (file)
index 0586580..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 6 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x19
-        RenderText {#text} at (0,0) size 29x19
-          text run at (0,0) width 29: "The "
-        RenderInline {SPAN} at (0,0) size 46x19 [bgcolor=#FF0000]
-          RenderText {#text} at (29,0) size 46x19
-            text run at (29,0) width 46: "second"
-        RenderText {#text} at (75,0) size 546x19
-          text run at (75,0) width 546: " word, and only the second word of this sentence should have a red background color."
-caret: position 0 of child 0 {#text} of child 0 {DIV} of body