Index: third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html |
diff --git a/third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html b/third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..77bf86f152063a46b2f64f0278393daa810c3579 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<title>SVGCursorElement use counters</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<style> |
+#target { |
+ cursor: url(#mycursor), auto; |
+} |
+</style> |
+<script> |
+// From UseCounter.h |
+const SVGCursorElement = 1587; |
+const SVGCursorElementHasClient = 1588; |
+ |
+test(function() { |
+ assert_false(internals.isUseCounted(document, SVGCursorElement)); |
+ assert_false(internals.isUseCounted(document, SVGCursorElementHasClient)); |
+}, document.title + ', before element parsed'); |
+</script> |
+<svg><cursor id="mycursor" href="data:image/png;base64,"></cursor></svg> |
+<script> |
+test(function() { |
+ assert_true(internals.isUseCounted(document, SVGCursorElement)); |
+ assert_false(internals.isUseCounted(document, SVGCursorElementHasClient)); |
+}, document.title + ', after element parsed'); |
+</script> |
+<svg id="target"></svg> |
+<script> |
+test(function() { |
+ document.querySelector('#target').clientLeft; |
+ |
+ assert_true(internals.isUseCounted(document, SVGCursorElement)); |
+ assert_true(internals.isUseCounted(document, SVGCursorElementHasClient)); |
+}, document.title + ', after style computed'); |
+</script> |