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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/XMLSerializer.html

Issue 2667303004: Move tests for DOMParser and XMLSerializer to dom/domparsing/. (Closed)
Patch Set: Created 3 years, 11 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/fast/dom/XMLSerializer.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/XMLSerializer.html b/third_party/WebKit/LayoutTests/fast/dom/XMLSerializer.html
deleted file mode 100644
index d41cb53f38df7d85ff5a5ee5af96aa048f49102e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/XMLSerializer.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-// TODO(tkent): This should be merged to web-platform-tests/domparsing/XMLSerializer-serializeToString.html.
-
-function parseDocument() {
- str = '<test><child1>First child</child1>';
- str += '<child2 attr="an attribute">Second child</child2>';
- str += '<!-- A comment --></test>';
-
- parser = new DOMParser();
- return parser.parseFromString(str, 'text/xml');
-}
-
-var doc = parseDocument();
-var child1 = doc.documentElement.firstChild;
-var child2 = child1.nextSibling
-var serializer = new XMLSerializer();
-var comment = child2.nextSibling;
-
-test(function() {
- assert_equals(serializer.serializeToString(child1), '<child1>First child</child1>');
- assert_equals(serializer.serializeToString(child2), '<child2 attr="an attribute">Second child</child2>');
-}, 'Check Element serialization.');
-
-test(function() {
- assert_equals(serializer.serializeToString(comment), '<!-- A comment -->');
-}, 'Check Comment serialization.');
-
-test(function() {
- assert_equals(serializer.serializeToString(doc), '<test><child1>First child</child1><child2 attr="an attribute">Second child</child2><!-- A comment --></test>');
-}, 'Check Document serialization.');
-
-test(function() {
- var fragment = doc.createDocumentFragment();
- fragment.appendChild(doc.documentElement.cloneNode(true));
- assert_equals(serializer.serializeToString(fragment), '<test><child1>First child</child1><child2 attr="an attribute">Second child</child2><!-- A comment --></test>');
-}, 'Check DocumentFragment serialization.');
-
-test(function() {
- var attr = child2.getAttributeNode('attr');
- assert_equals(serializer.serializeToString(attr), 'an attribute');
-
- var element = doc.createElement('foo');
- element.setAttribute('attr1', ' abc\ndef\tghi\r');
- assert_equals(serializer.serializeToString(element), '<foo attr1=" abc&#10;def&#9;ghi&#13;"/>');
-}, 'Check Attr serializiation.');
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698