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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/image-use-counters.html

Issue 1866343002: Measure usage of image/media/plugin/text documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698