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

Side by Side Diff: LayoutTests/fast/innerHTML/innerHTML-xml.xhtml

Issue 52443003: Reland 160869 "Move innerHTML and outerHTML to Element" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <style>
6 </style>
7 </head>
8 <body>
9 <svg xmlns="http://www.w3.org/2000/svg"></svg>
10 <bar xmlns="http://test/foo"></bar>
11 <script>
12 description("Test innerHTML in XHTML/XML documents");
13
14 var namespaces = [
15 "http://www.w3.org/2000/svg",
16 "http://test/foo"
17 ];
18 var elementnames = [
19 "svg",
20 "bar"
21 ];
22 var texts = [
23 "&lt;g/>",
24 "&lt;body>&lt;/body>"
25
26 ];
27
28 var element, childns;
29 function g(ns, elementName, text, appendOrSelect) {
30 if (appendOrSelect == "append") {
31 element = document.createElementNS(ns, elementName);
32 document.body.appendChild(element);
33 childns = ns;
34 } else {
35 element = document.querySelector(elementName);
36 childns = element.namespaceURI;
37 }
38 element.innerHTML = text;
39 shouldBeEqualToString("element.firstChild.namespaceURI", childns);
40 }
41
42 namespaces.forEach(function(ns) {
43 elementnames.forEach(function(elementname) {
44 texts.forEach(function(text) {
45 g(ns, elementname, text, "append");
46 g(ns, elementname, text, "select");
47 });
48 });
49 });
50 </script>
51 <script src="../js/resources/js-test-post.js"></script>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698