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

Unified Diff: third_party/WebKit/LayoutTests/svg/zoom/page/zoom-get-screen-ctm.html

Issue 2711503002: Compute a more correct "screen scope" transform for SVGSVGElement (Closed)
Patch Set: Tweak test Created 3 years, 10 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/zoom/page/zoom-get-screen-ctm.html
diff --git a/third_party/WebKit/LayoutTests/svg/zoom/page/zoom-get-screen-ctm.html b/third_party/WebKit/LayoutTests/svg/zoom/page/zoom-get-screen-ctm.html
index d9d2b7cef421f4baf1af6650fee72c2f9351ded1..92d1eeeeb292fd6eac2152ae322a620af123da8f 100644
--- a/third_party/WebKit/LayoutTests/svg/zoom/page/zoom-get-screen-ctm.html
+++ b/third_party/WebKit/LayoutTests/svg/zoom/page/zoom-get-screen-ctm.html
@@ -20,9 +20,9 @@ body { margin: 0; padding: 0; }
</svg>
</svg>
<script>
-function assert_matrix_equals(actual, expected) {
+function assert_matrix_approx_equals(actual, expected) {
for (let prop of [ 'a', 'b', 'c', 'd', 'e', 'f'])
- assert_equals(actual[prop], expected[prop], prop);
+ assert_approx_equals(actual[prop], expected[prop], 5e-6, prop);
}
async_test(t => {
@@ -30,14 +30,14 @@ async_test(t => {
eventSender.zoomPageIn();
eventSender.zoomPageIn();
- assert_matrix_equals(document.getElementById('svg1').getScreenCTM(),
- { a: 1, b: 0, c: 0, d: 1, e: 0, f: 100 });
- assert_matrix_equals(document.getElementById('svg2').getScreenCTM(),
- { a: 1, b: 0, c: 0, d: 1, e: 100, f: 200 });
- assert_matrix_equals(document.getElementById('svg3').getScreenCTM(),
- { a: 1, b: 0, c: 0, d: 1, e: 200, f: 300 });
- assert_matrix_equals(document.getElementById('svg4').getScreenCTM(),
- { a: 1, b: 0, c: 0, d: 1, e: 300, f: 400 });
+ assert_matrix_approx_equals(document.getElementById('svg1').getScreenCTM(),
+ { a: 1, b: 0, c: 0, d: 1, e: 0, f: 100 });
+ assert_matrix_approx_equals(document.getElementById('svg2').getScreenCTM(),
+ { a: 1, b: 0, c: 0, d: 1, e: 100, f: 200 });
+ assert_matrix_approx_equals(document.getElementById('svg3').getScreenCTM(),
+ { a: 1, b: 0, c: 0, d: 1, e: 200, f: 300 });
+ assert_matrix_approx_equals(document.getElementById('svg4').getScreenCTM(),
+ { a: 1, b: 0, c: 0, d: 1, e: 300, f: 400 });
}));
});
</script>

Powered by Google App Engine
This is Rietveld 408576698