Index: third_party/WebKit/LayoutTests/svg/as-object/sizing/buildtests.py |
diff --git a/third_party/WebKit/LayoutTests/svg/as-object/sizing/buildtests.py b/third_party/WebKit/LayoutTests/svg/as-object/sizing/buildtests.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..e6a82bbbb89238691b18e086d9524d1ee3665c3d |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/as-object/sizing/buildtests.py |
@@ -0,0 +1,35 @@ |
+#!/usr/bin/python |
+ |
+test_template = """<!DOCTYPE html> |
+<title>SVG sizing: <object></title> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<style> |
+ #testContainer {{ |
+ position: absolute; |
+ left: 0; |
+ top: 0; |
+ width: 800px; |
+ height: 600px; |
+ }} |
+</style> |
+<link rel="help" href="http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width"> |
+<link rel="help" href="http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-height"> |
+<link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/#replaced-elements"> |
+<link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/#attr-dim-width"> |
+<link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewportSpace"> |
+<div id="log"></div> |
+<div id="testContainer"></div> |
+<script src="svg-in-object.js"></script> |
+<!-- Test generated by buildtests.py --> |
+<script>testSVGInObjectWithPlaceholder({}, {});</script> |
+""" |
+ |
+lengths = [{'type': 'auto', 'value': 'null'}, |
+ {'type': 'fixed', 'value': '"100"'}, |
+ {'type': 'percentage', 'value': '"50%"'}] |
+ |
+for w in lengths: |
+ for h in lengths: |
+ with open("svg-in-object-placeholder-{}-{}.html".format(w['type'], h['type']), "w") as f: |
+ f.write(test_template.format(w['value'], h['value'])) |