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

Side by Side Diff: LayoutTests/fast/dynamic/insertAdjacent-svg.html

Issue 147993006: Move insertAdjacentElement/insertAdjacentText to Element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: olc chunk mismatch Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/dynamic/insertAdjacent-svg-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <svg style="width:200px; height: 200px">
5 <g id="container" style="fill: green"></g>
6 <text id="text" y=90><text id="sentinel"></text></text>
7 <g id="container2" style="fill: green"></g>
8 </svg>
9 </body>
10 <script>
11 if (window.testRunner)
12 testRunner.dumpAsText();
13
14 var container = document.getElementById("container");
15 container.insertAdjacentHTML("beforeBegin", "<text y=10>1 (black)</text>");
16 container.insertAdjacentHTML("afterBegin", "<text y=30>2 (green)</text>");
17 container.insertAdjacentHTML("beforeEnd", "<text y=50>3 (green)</text>");
18 container.insertAdjacentHTML("afterEnd", "<text y=70>4 (black)</text>");
19
20 document.getElementById("text").insertAdjacentText("afterBegin", "5");
21 document.getElementById("sentinel").insertAdjacentText("beforeBegin", "6");
22 document.getElementById("sentinel").insertAdjacentText("afterEnd", "7");
23 document.getElementById("text").insertAdjacentText("beforeEnd", "8");
24
25 var container2 = document.getElementById("container2");
26
27 var element = document.createElementNS("http://www.w3.org/2000/svg", "text") ;
28 element.textContent = "9";
29 element.setAttribute('y', 110);
30 container2.insertAdjacentElement("beforeBegin", element);
31
32 element = document.createElementNS("http://www.w3.org/2000/svg", "text");
33 element.textContent = "10";
34 element.setAttribute('y', 130);
35 container2.insertAdjacentElement("afterBegin", element);
36
37 element = document.createElementNS("http://www.w3.org/2000/svg", "text");
38 element.textContent = "11";
39 element.setAttribute('y', 150);
40 container2.insertAdjacentElement("beforeEnd", element);
41
42 element = document.createElementNS("http://www.w3.org/2000/svg", "text");
43 element.textContent = "12";
44 element.setAttribute('y', 170);
45 container2.insertAdjacentElement("afterEnd", element);
46 </script>
47 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dynamic/insertAdjacent-svg-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698