| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 test_template = """<!DOCTYPE html> | 3 test_template = """<!DOCTYPE html> |
| 4 <title>SVG sizing: <object></title> | 4 <title>SVG sizing: <object></title> |
| 5 <meta name="timeout" content="long"> |
| 5 <script src="../../../resources/testharness.js"></script> | 6 <script src="../../../resources/testharness.js"></script> |
| 6 <script src="../../../resources/testharnessreport.js"></script> | 7 <script src="../../../resources/testharnessreport.js"></script> |
| 7 <style> | 8 <style> |
| 8 #testContainer {{ | 9 #testContainer {{ |
| 9 position: absolute; | 10 position: absolute; |
| 10 left: 0; | 11 left: 0; |
| 11 top: 0; | 12 top: 0; |
| 12 width: 800px; | 13 width: 800px; |
| 13 height: 600px; | 14 height: 600px; |
| 14 }} | 15 }} |
| 15 </style> | 16 </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-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.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/#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.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 <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewportSpace"> |
| 21 <div id="log"></div> | 22 <div id="log"></div> |
| 22 <div id="testContainer"></div> | 23 <div id="testContainer"></div> |
| 23 <script src="svg-in-object.js"></script> | 24 <script src="svg-in-object.js"></script> |
| 24 <!-- Test generated by buildtests.py --> | 25 <!-- Test generated by buildtests.py --> |
| 25 <script>testSVGInObjectWithPlaceholder({}, {});</script> | 26 <script>testSVGInObjectWithPlaceholder({}, {}, {});</script> |
| 26 """ | 27 """ |
| 27 | 28 |
| 29 intrinsicRatios = [{'type': 'no-intrinsic-ratio', 'value': 'null'}, |
| 30 {'type': 'intrinsic-ratio', 'value': '"0 0 100 200"'}]; |
| 31 |
| 28 lengths = [{'type': 'auto', 'value': 'null'}, | 32 lengths = [{'type': 'auto', 'value': 'null'}, |
| 29 {'type': 'fixed', 'value': '"100"'}, | 33 {'type': 'fixed', 'value': '"100"'}, |
| 30 {'type': 'percentage', 'value': '"50%"'}] | 34 {'type': 'percentage', 'value': '"50%"'}] |
| 31 | 35 |
| 32 for w in lengths: | 36 for intrinsicRatio in intrinsicRatios: |
| 33 for h in lengths: | 37 for w in lengths: |
| 34 with open("svg-in-object-placeholder-{}-{}.html".format(w['type'], h['ty
pe']), "w") as f: | 38 for h in lengths: |
| 35 f.write(test_template.format(w['value'], h['value'])) | 39 with open("svg-in-object-placeholder-{}-{}-{}.html".format(w['type']
, h['type'], intrinsicRatio['type']), "w") as f: |
| 40 f.write(test_template.format(w['value'], h['value'], intrinsicRa
tio['value'])) |
| OLD | NEW |