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

Unified Diff: third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html

Issue 2376613004: Add use counters for SVGCursorElement (Closed)
Patch Set: Add test Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698