2009-11-26 Kinuko Yasuda <kinuko@chromium.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Nov 2009 05:53:00 +0000 (05:53 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Nov 2009 05:53:00 +0000 (05:53 +0000)
        Reviewed by Eric Seidel.

        Rewrite the test fast/parser/comment-in-textarea to use dumpAsText
        so that the expected results can be independent of platform differences.
        https://bugs.webkit.org/show_bug.cgi?id=31580

        * fast/parser/comment-in-textarea-expected.txt: Added.
        * fast/parser/comment-in-textarea.html:
        * fast/parser/script-tests/comment-in-textarea.js: Added.
        * platform/mac/fast/parser/comment-in-textarea-expected.checksum: Removed.
        * platform/mac/fast/parser/comment-in-textarea-expected.png: Removed.
        * platform/mac/fast/parser/comment-in-textarea-expected.txt: Removed.
        * platform/win/fast/parser/comment-in-textarea-expected.txt: Removed.

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

LayoutTests/ChangeLog
LayoutTests/fast/parser/comment-in-textarea-expected.txt [new file with mode: 0644]
LayoutTests/fast/parser/comment-in-textarea.html
LayoutTests/fast/parser/script-tests/comment-in-textarea.js [new file with mode: 0644]
LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.checksum [deleted file]
LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.png [deleted file]
LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.txt [deleted file]
LayoutTests/platform/win/fast/parser/comment-in-textarea-expected.txt [deleted file]

index 19329e992f3aca5b51f9cf508ce6cb61d538fafb..cba1f585a4d1308f9b259e9742e248192f3ec35c 100644 (file)
@@ -1,3 +1,19 @@
+2009-11-26  Kinuko Yasuda  <kinuko@chromium.com>
+
+        Reviewed by Eric Seidel.
+
+        Rewrite the test fast/parser/comment-in-textarea to use dumpAsText
+        so that the expected results can be independent of platform differences.
+        https://bugs.webkit.org/show_bug.cgi?id=31580
+
+        * fast/parser/comment-in-textarea-expected.txt: Added.
+        * fast/parser/comment-in-textarea.html:
+        * fast/parser/script-tests/comment-in-textarea.js: Added.
+        * platform/mac/fast/parser/comment-in-textarea-expected.checksum: Removed.
+        * platform/mac/fast/parser/comment-in-textarea-expected.png: Removed.
+        * platform/mac/fast/parser/comment-in-textarea-expected.txt: Removed.
+        * platform/win/fast/parser/comment-in-textarea-expected.txt: Removed.
+
 2009-11-26  Daniel Bates  <dbates@webkit.org>
 
         Reviewed by Pavel Feldman.
diff --git a/LayoutTests/fast/parser/comment-in-textarea-expected.txt b/LayoutTests/fast/parser/comment-in-textarea-expected.txt
new file mode 100644 (file)
index 0000000..e1f01ff
--- /dev/null
@@ -0,0 +1,11 @@
+Test that the HTML parser correctly parses the comment-like string in the textarea.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS textAreas.length is 1
+PASS textAreas[0].innerHTML is "<!-- </textarea> --> This should be part of the textarea"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index d19adde1c36c69802f3968fe9e5711a7f8476228..bb9b2c41281c3d4ef2230604492e8a2d6de4f92e 100644 (file)
@@ -1,8 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
 <body>
-<textarea>
-<!-- </textarea> -->
-This should be part of the textarea
-</textarea>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/comment-in-textarea.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/fast/parser/script-tests/comment-in-textarea.js b/LayoutTests/fast/parser/script-tests/comment-in-textarea.js
new file mode 100644 (file)
index 0000000..bc80e73
--- /dev/null
@@ -0,0 +1,11 @@
+description("Test that the HTML parser correctly parses the comment-like string in the textarea.");
+
+var element = document.createElement("div");
+element.innerHTML = "<textarea><!-- </textarea> --> This should be part of the textarea</textarea>";
+document.body.appendChild(element);
+
+var textAreas = document.getElementsByTagName("textarea");
+shouldBe("textAreas.length", "1");
+shouldBeEqualToString("textAreas[0].innerHTML", "<!-- </textarea> --> This should be part of the textarea");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.checksum b/LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.checksum
deleted file mode 100644 (file)
index 3bf182e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-92f3bd5cd9dd9391b6011237f8bb858a
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.png b/LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.png
deleted file mode 100644 (file)
index 5b069b6..0000000
Binary files a/LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.txt b/LayoutTests/platform/mac/fast/parser/comment-in-textarea-expected.txt
deleted file mode 100644 (file)
index e4f6513..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-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
-      RenderText {#text} at (0,0) size 0x0
-      RenderText {#text} at (0,0) size 0x0
-      RenderText {#text} at (0,0) size 0x0
-layer at (10,10) size 129x32 clip at (11,11) size 112x30 scrollHeight 69
-  RenderTextControl {TEXTAREA} at (2,2) size 129x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
-    RenderBlock {DIV} at (3,3) size 108x65
-      RenderText {#text} at (0,0) size 108x52
-        text run at (0,0) width 108: "<!-- </textarea> -"
-        text run at (0,13) width 16: "->"
-        text run at (16,13) width 0: " "
-        text run at (0,26) width 105: "This should be part"
-        text run at (105,26) width 3: " "
-        text run at (0,39) width 79: "of the textarea"
-        text run at (79,39) width 0: " "
-      RenderBR {BR} at (0,52) size 0x13
diff --git a/LayoutTests/platform/win/fast/parser/comment-in-textarea-expected.txt b/LayoutTests/platform/win/fast/parser/comment-in-textarea-expected.txt
deleted file mode 100644 (file)
index 4e4545e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-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
-      RenderText {#text} at (0,0) size 0x0
-      RenderText {#text} at (0,0) size 0x0
-      RenderText {#text} at (0,0) size 0x0
-layer at (10,10) size 161x32 clip at (11,11) size 144x30 scrollHeight 56
-  RenderTextControl {TEXTAREA} at (2,2) size 161x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
-    RenderBlock {DIV} at (3,3) size 140x52
-      RenderText {#text} at (0,0) size 140x39
-        text run at (0,0) width 124: "<!-- </textarea> -->"
-        text run at (124,0) width 0: " "
-        text run at (0,13) width 140: "This should be part of the"
-        text run at (140,13) width 0: " "
-        text run at (0,26) width 44: "textarea"
-        text run at (44,26) width 0: " "
-      RenderBR {BR} at (0,39) size 0x13