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

Unified Diff: third_party/WebKit/LayoutTests/svg/as-iframe/svg-in-iframe.html

Issue 1729073002: Update SVG tests ahead of offset* removal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update flexitem.html and grid-item-display.html too Created 4 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/as-iframe/svg-in-iframe.html
diff --git a/third_party/WebKit/LayoutTests/svg/as-iframe/svg-in-iframe.html b/third_party/WebKit/LayoutTests/svg/as-iframe/svg-in-iframe.html
index 5434e57945a9725adb117a80f328752ec9e5fe34..13da0738113934cc75e4076c191081c2ac551f80 100644
--- a/third_party/WebKit/LayoutTests/svg/as-iframe/svg-in-iframe.html
+++ b/third_party/WebKit/LayoutTests/svg/as-iframe/svg-in-iframe.html
@@ -8,12 +8,14 @@
t = async_test("Test <iframe> and <svg> size");
function check() {
var iframe = document.querySelector('iframe');
+ var iframeRect = iframe.getBoundingClientRect();
var svg = iframe.contentDocument.documentElement;
+ var svgRect = svg.getBoundingClientRect();
- assert_equals(iframe.offsetWidth, 300, "width should be fallback width.");
- assert_equals(iframe.offsetHeight, 150, "height should be the fallback height 150.");
- assert_equals(svg.offsetWidth, svg.width.baseVal.value, "width should be what the <svg> requests.");
- assert_equals(svg.offsetHeight, svg.height.baseVal.value, "height should be what the <svg> requests.");
+ assert_equals(iframeRect.width, 300, "width should be fallback width.");
+ assert_equals(iframeRect.height, 150, "height should be the fallback height 150.");
+ assert_equals(svgRect.width, svg.width.baseVal.value, "width should be what the <svg> requests.");
+ assert_equals(svgRect.height, svg.height.baseVal.value, "height should be what the <svg> requests.");
t.done();
}

Powered by Google App Engine
This is Rietveld 408576698