OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <script src="../../resources/run-after-layout-and-paint.js"></script> |
| 4 <style> |
| 5 object { |
| 6 width: 100px; |
| 7 height: 100px; |
| 8 } |
| 9 </style> |
| 10 <body> |
| 11 </body> |
| 12 <script> |
| 13 var SVGSVGElementFragmentSVGView = 1036; // From UseCounter.h |
| 14 var SVGSVGElementFragmentSVGViewElement = 1037; // From UseCounter.h |
| 15 window.jsTestIsAsync = true; |
| 16 |
| 17 var obj = document.createElement('object'); |
| 18 obj.data = "resources/svglogo.svg"; |
| 19 document.body.appendChild(obj); |
| 20 |
| 21 obj.onload = function() { |
| 22 runAfterLayoutAndPaint(function() { |
| 23 shouldBeFalse("window.internals.isUseCounted(document.querySelector(
'object').contentDocument, SVGSVGElementFragmentSVGView)"); |
| 24 shouldBeFalse("window.internals.isUseCounted(document.querySelector(
'object').contentDocument, SVGSVGElementFragmentSVGViewElement)"); |
| 25 |
| 26 var obj = document.createElement('object'); |
| 27 obj.data = "resources/svglogo.svg#svgView(viewBox(0,0,150,150))"; |
| 28 document.body.appendChild(obj); |
| 29 |
| 30 obj.onload = function() { |
| 31 runAfterLayoutAndPaint(function() { |
| 32 shouldBeTrue("window.internals.isUseCounted(document.querySe
lector('object').contentDocument, SVGSVGElementFragmentSVGView)"); |
| 33 shouldBeFalse("window.internals.isUseCounted(document.queryS
elector('object').contentDocument, SVGSVGElementFragmentSVGViewElement)"); |
| 34 |
| 35 var obj = document.createElement('object'); |
| 36 obj.data = "resources/svglogo-viewbox.svg#original"; |
| 37 document.body.appendChild(obj); |
| 38 |
| 39 obj.onload = function() { |
| 40 runAfterLayoutAndPaint(function() { |
| 41 shouldBeTrue("window.internals.isUseCounted(document
.querySelector('object').contentDocument, SVGSVGElementFragmentSVGView)"); |
| 42 shouldBeTrue("window.internals.isUseCounted(document
.querySelector('object').contentDocument, SVGSVGElementFragmentSVGViewElement)")
; |
| 43 finishJSTest(); |
| 44 }); |
| 45 }; |
| 46 }); |
| 47 }; |
| 48 }); |
| 49 }; |
| 50 </script> |
| 51 |
OLD | NEW |