OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/python |
| 2 |
| 3 test_template = """<!DOCTYPE html> |
| 4 <title>SVG sizing: <object></title> |
| 5 <script src="../../../resources/testharness.js"></script> |
| 6 <script src="../../../resources/testharnessreport.js"></script> |
| 7 <style> |
| 8 #testContainer {{ |
| 9 position: absolute; |
| 10 left: 0; |
| 11 top: 0; |
| 12 width: 800px; |
| 13 height: 600px; |
| 14 }} |
| 15 </style> |
| 16 <link rel="help" href="http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-wi
dth"> |
| 17 <link rel="help" href="http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-he
ight"> |
| 18 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/#replac
ed-elements"> |
| 19 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/#attr-d
im-width"> |
| 20 <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewportSpace"> |
| 21 <div id="log"></div> |
| 22 <div id="testContainer"></div> |
| 23 <script src="svg-in-object.js"></script> |
| 24 <!-- Test generated by buildtests.py --> |
| 25 <script>testSVGInObjectWithPlaceholder({}, {});</script> |
| 26 """ |
| 27 |
| 28 lengths = [{'type': 'auto', 'value': 'null'}, |
| 29 {'type': 'fixed', 'value': '"100"'}, |
| 30 {'type': 'percentage', 'value': '"50%"'}] |
| 31 |
| 32 for w in lengths: |
| 33 for h in lengths: |
| 34 with open("svg-in-object-placeholder-{}-{}.html".format(w['type'], h['ty
pe']), "w") as f: |
| 35 f.write(test_template.format(w['value'], h['value'])) |
OLD | NEW |