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

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

Issue 246933007: Make <iframe> containing SVG behave as every other <iframe> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add NeedsRebaseline to test for landing Created 6 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 | « LayoutTests/TestExpectations ('k') | Source/core/rendering/RenderEmbeddedObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/as-iframe/svg-in-iframe.html
diff --git a/LayoutTests/svg/as-iframe/svg-in-iframe.html b/LayoutTests/svg/as-iframe/svg-in-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..5434e57945a9725adb117a80f328752ec9e5fe34
--- /dev/null
+++ b/LayoutTests/svg/as-iframe/svg-in-iframe.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<style>iframe { border:none }</style>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<iframe src="../as-image/resources/200x200-blue-rect.svg">
+</iframe>
+<script>
+ t = async_test("Test <iframe> and <svg> size");
+ function check() {
+ var iframe = document.querySelector('iframe');
+ var svg = iframe.contentDocument.documentElement;
+
+ 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.");
+
+ t.done();
+ }
+ t.step(function() {
+ addEventListener('load', t.step_func(check));
+ });
+</script>
+<div id="log"></div>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/rendering/RenderEmbeddedObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698