Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html b/third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..70cd2df1596fc67b86c3f1bd04ab694f6c753c11 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script> |
| +test(function() { |
| + var doc = document.implementation.createDocument("http://www.w3.org/2000/svg", "SVG", null); |
| + var body = doc.createElementNS("http://www.w3.org/1999/xhtml", "body"); |
| + doc.documentElement.appendChild(body); |
| + var svgDoc = doc.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null); |
|
fs
2016/03/09 16:06:48
You don't need to create another document (to just
hyunjunekim2
2016/03/10 15:00:44
Done.
|
| + var svgElement = svgDoc.documentElement; |
| + var g = svgDoc.createElementNS("http://www.w3.org/2000/svg", "g"); |
| + svgElement.appendChild(g); |
| + body.appendChild(svgDoc.documentElement); |
| + var title1 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title"); |
| + title1.textContext = "title1"; |
| + g.appendChild(title1); |
| + assert_equals(doc.title,''); |
| + var title2 = doc.createElementNS("http://www.w3.org/1999/xhtml", "title"); |
| + title2.textContext = "title2"; |
| + svgElement.appendChild(title2); |
| + assert_equals(doc.title,''); |
| +}, "Test for setting title element of inner svg document."); |
| +</script> |