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

Side by Side Diff: LayoutTests/fast/innerHTML/innerHTML-svg-write.html

Issue 44333002: Move innerHTML and outerHTML to Element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased to latest master 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 <html>
2 <head>
3 <script src="../js/resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <div style="visibility:hidden">
7 <svg></svg>
8 </div>
9 <script>
10 description("Test that setting innerHTML and outerHTML properties works on SVG elements");
11 var svg = document.getElementsByTagName('svg')[0];
12
13 svg.innerHTML = "<rect/>";
14 shouldBeEqualToString("svg.innerHTML", '<rect></rect>');
15 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/s vg');
16
17 svg.innerHTML = "<foreignobject><svg/></foreignobject>";
18 shouldBeEqualToString("svg.innerHTML", '<foreignObject><svg></svg></foreignObj ect>');
19 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/s vg');
20 shouldBeEqualToString("svg.firstChild.firstChild.namespaceURI", 'http://www.w3 .org/2000/svg');
21
22 svg.innerHTML = "<foreignobject><p>x</foreignobject>";
23 shouldBeEqualToString("svg.innerHTML", '<foreignObject><p>x</p></foreignObject >');
24 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/s vg');
25 shouldBeEqualToString("svg.firstChild.firstChild.namespaceURI", 'http://www.w3 .org/1999/xhtml');
26
27 svg.outerHTML = "<svg><circle/></svg>";
28 var svg = document.getElementsByTagName('svg')[0];
29 shouldBeEqualToString("svg.innerHTML", '<circle></circle>');
30 shouldBeEqualToString("svg.firstChild.namespaceURI", 'http://www.w3.org/2000/s vg');
31 </script>
32 <script src="../js/resources/js-test-post.js"></script>
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698