Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/syntax/serializing-html-fragments/initial-linefeed-pre.html

Issue 1933203002: Import web-platform-tests@343606cdf8f6c7442d1a0309a9fcdd47d6244eca (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase against web-platform tests to pick up my whitespace fix upstream Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/syntax/serializing-html-fragments/initial-linefeed-pre.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/syntax/serializing-html-fragments/initial-linefeed-pre.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/syntax/serializing-html-fragments/initial-linefeed-pre.html
new file mode 100644
index 0000000000000000000000000000000000000000..4a7faf985680955b2539b97891db5c942842ba28
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/syntax/serializing-html-fragments/initial-linefeed-pre.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<title>innerHTML getter for pre/textarea/listing with initial LF</title>
+<script src=../../../../../resources/testharness.js></script>
+<script src=../../../../../resources/testharnessreport.js></script>
+<div id="outer">
+<div id="inner">
+<pre id="pre1">
+x</pre>
+<pre id="pre2">
+
+x</pre>
+<textarea id="textarea1">
+x</textarea>
+<textarea id="textarea2">
+
+x</textarea>
+<listing id="listing1">
+x</listing>
+<listing id="listing2">
+
+x</listing>
+</div>
+</div>
+
+<script>
+var expected_outer = '\n<div id="inner">\n<pre id="pre1">x</pre>\n<pre id="pre2">\n\nx</pre>\n<textarea id="textarea1">x</textarea>\n<textarea id="textarea2">\n\nx</textarea>\n<listing id="listing1">x</listing>\n<listing id="listing2">\n\nx</listing>\n</div>\n';
+var expected_inner = expected_outer.replace('\n<div id="inner">', '').replace('</div>\n', '');
+var expected_1 = 'x';
+var expected_2 = '\nx';
+
+test(function() {
+ assert_equals(outer.innerHTML, expected_outer);
+}, 'outer div');
+
+test(function() {
+ assert_equals(inner.innerHTML, expected_inner);
+}, 'inner div');
+
+['pre', 'textarea', 'listing'].forEach(function(tag) {
+ test(function() {
+ assert_equals(document.getElementById(tag + '1').innerHTML, expected_1);
+ }, tag + '1');
+
+ test(function() {
+ assert_equals(document.getElementById(tag + '2').innerHTML, expected_2);
+ }, tag + '2');
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698