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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/as-image/svgview-references-use-counters.html

Issue 1471963007: Count usage of #svgView(...) and plain SVG <view> targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing expected file Created 5 years 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698