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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/document-metadata/the-title-element/title.text-03.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title> title.text and space normalization </title>
3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-title-text">
5 <script src="../../../../../../resources/testharness.js"></script>
6 <script src="../../../../../../resources/testharnessreport.js"></script>
7 <div id="log"></div>
8 <script>
9 test(function() {
10 assert_equals(document.getElementsByTagName("title")[0].text,
11 " title.text and space normalization ");
12 assert_equals(document.getElementsByTagName("title")[0].textContent,
13 " title.text and space normalization ");
14 assert_equals(document.getElementsByTagName("title")[0].firstChild.nodeValue,
15 " title.text and space normalization ");
16 }, "title.text and space normalization (markup)");
17 [
18 "one space", "two spaces",
19 "one\ttab", "two\t\ttabs",
20 "one\nnewline", "two\n\nnewlines",
21 "one\fform feed", "two\f\fform feeds",
22 "one\rcarriage return", "two\r\rcarriage returns"
23 ].forEach(function(str) {
24 test(function() {
25 document.title = str;
26 var title = document.getElementsByTagName("title")[0];
27 assert_equals(title.text, str);
28 assert_equals(title.textContent, str);
29 assert_equals(title.firstChild.nodeValue, str);
30 }, "title.text and space normalization: " + format_value(str))
31 });
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698