Convert editing/inserting/font-size-clears-from-typing-style.html to a dump-as-markup...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 23:32:24 +0000 (23:32 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 23:32:24 +0000 (23:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90024

Reviewed by Ojan Vafai.

Converted a script test to a dump-as-markup test because the test result can be understood much eaiser that way.

* editing/inserting/font-size-clears-from-typing-style-expected.txt:
* editing/inserting/font-size-clears-from-typing-style.html:
* editing/inserting/script-tests: Removed.
* editing/inserting/script-tests/TEMPLATE.html: Removed.
* editing/inserting/script-tests/font-size-clears-from-typing-style.js: Removed.

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

LayoutTests/ChangeLog
LayoutTests/editing/inserting/font-size-clears-from-typing-style-expected.txt
LayoutTests/editing/inserting/font-size-clears-from-typing-style.html
LayoutTests/editing/inserting/script-tests/TEMPLATE.html [deleted file]
LayoutTests/editing/inserting/script-tests/font-size-clears-from-typing-style.js [deleted file]

index 0da6bfc..01a60f1 100644 (file)
@@ -1,3 +1,18 @@
+2012-06-26  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Convert editing/inserting/font-size-clears-from-typing-style.html to a dump-as-markup test
+        https://bugs.webkit.org/show_bug.cgi?id=90024
+
+        Reviewed by Ojan Vafai.
+
+        Converted a script test to a dump-as-markup test because the test result can be understood much eaiser that way.
+
+        * editing/inserting/font-size-clears-from-typing-style-expected.txt:
+        * editing/inserting/font-size-clears-from-typing-style.html:
+        * editing/inserting/script-tests: Removed.
+        * editing/inserting/script-tests/TEMPLATE.html: Removed.
+        * editing/inserting/script-tests/font-size-clears-from-typing-style.js: Removed.
+
 2012-06-26  Tom Sepez  <tsepez@chromium.org>
 
         [chromium] HTML5 audio/video tags - loading http content from https page doesn't trigger warning.
index 70d719d..11f42ed 100644 (file)
@@ -1,11 +1,4 @@
-Tests that font-size in typingStyle is correctly cleared. See https://bugs.webkit.org/show_bug.cgi?id=26279.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS 1 is 1
-PASS 3 is 3
-PASS successfullyParsed is true
-
-TEST COMPLETE
-BA
+Tests that we don't serialize redundant font-size in typingStyle. There should be no span or style attribute around A or B below.See https://bugs.webkit.org/show_bug.cgi?id=26279.
+| <div>
+|   id="wrapper"
+|   "B<#selection-caret>A"
index 2934698..526d23a 100644 (file)
@@ -1,12 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE html>
 <html>
-<head>
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
 <body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/font-size-clears-from-typing-style.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
+<script src="../../resources/dump-as-markup.js"></script>
+<script>
+
+Markup.description("Tests that we don't serialize redundant font-size in typingStyle. There should be no span or style attribute around A or B below."
+     + "See https://bugs.webkit.org/show_bug.cgi?id=26279.");
+
+var editable = document.createElement('div');
+editable.contentEditable = true;
+editable.innerHTML = '<br><div id="wrapper">A</div>';
+
+document.body.appendChild(editable);
+editable.focus();
+
+window.getSelection().setBaseAndExtent(editable, 0, editable, 0);
+document.execCommand('ForwardDelete', false, false);
+document.execCommand('InsertText', false, 'B');
+
+Markup.dump(editable);
+
+</script>
 </body>
 </html>
diff --git a/LayoutTests/editing/inserting/script-tests/TEMPLATE.html b/LayoutTests/editing/inserting/script-tests/TEMPLATE.html
deleted file mode 100644 (file)
index e439eb3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="YOUR_JS_FILE_HERE"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/editing/inserting/script-tests/font-size-clears-from-typing-style.js b/LayoutTests/editing/inserting/script-tests/font-size-clears-from-typing-style.js
deleted file mode 100644 (file)
index 49cc711..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-description("Tests that font-size in typingStyle is correctly cleared. See https://bugs.webkit.org/show_bug.cgi?id=26279.");
-
-var editable = document.createElement('div');
-editable.contentEditable = true;
-editable.innerHTML = '<br><div id="wrapper">A</div>';
-
-document.body.appendChild(editable);
-editable.focus();
-
-window.getSelection().setBaseAndExtent(editable, 0, editable, 0);
-document.execCommand('ForwardDelete', false, false);
-document.execCommand('InsertText', false, 'B');
-
-// The forward delete leaves the cursor in the "wrapper" div.
-// After typing, there should be exactly one textnode in the wrapper div.
-shouldBe(String(wrapper.childNodes.length), '1');
-shouldBe(String(wrapper.firstChild.nodeType), '3');
-
-var successfullyParsed = true;