| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../fast/js/resources/js-test-pre.js"></script> | |
| 4 <script src="resources/scripted-random.js"></script> | |
| 5 <script src="resources/viewspec-parser.js"></script> | |
| 6 </head> | |
| 7 <body> | |
| 8 <p id="description"></p> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 // maps a viewspec attribute to its minimum argument count. | |
| 12 var attributes = { | |
| 13 viewBox: 6, | |
| 14 preserveAspectRatio: 1, | |
| 15 transform: 1, | |
| 16 zoomAndPan: 1, | |
| 17 viewTarget: 1 | |
| 18 }; | |
| 19 | |
| 20 var tests = []; | |
| 21 | |
| 22 for (var attribute in attributes) { | |
| 23 // Too few / too many arguments | |
| 24 for (var i = 0; i < 5; i++) { //> | |
| 25 var attributeString = "svgView(" + attribute + "("; | |
| 26 for (var j = 0; j < i; j++) { //> | |
| 27 attributeString += "0"; | |
| 28 if (j < i - 1) //> | |
| 29 attributeString += ","; | |
| 30 } | |
| 31 attributeString += "))"; | |
| 32 tests.push(attributeString); | |
| 33 } | |
| 34 } | |
| 35 | |
| 36 if (window.testRunner) | |
| 37 testRunner.waitUntilDone(); | |
| 38 | |
| 39 startViewspecTests(tests); | |
| 40 | |
| 41 </script> | |
| 42 </html> | |
| OLD | NEW |