Index: third_party/WebKit/LayoutTests/fast/images/image-use-counters.html |
diff --git a/third_party/WebKit/LayoutTests/fast/images/image-use-counters.html b/third_party/WebKit/LayoutTests/fast/images/image-use-counters.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..29e037658a5873681ca735f90205b55d128724ca |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/images/image-use-counters.html |
@@ -0,0 +1,20 @@ |
+<!DOCTYPE html> |
+<title>ImageDocument UseCounters</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<iframe></iframe> |
+<script> |
+async_test(function() { |
+ // From UseCounter.h |
+ var ImageDocument = 1274; |
+ var ImageDocumentInFrame = 1310; |
+ assert_false(internals.isUseCounted(document, ImageDocument)); |
+ assert_false(internals.isUseCounted(document, ImageDocumentInFrame)); |
+ var iframe = document.querySelector("iframe"); |
+ iframe.src = "resources/dice.png"; |
+ iframe.onload = this.step_func_done(function() { |
+ assert_true(internals.isUseCounted(document, ImageDocument)); |
+ assert_true(internals.isUseCounted(document, ImageDocumentInFrame)); |
+ }); |
+}); |
+</script> |