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

Side by Side Diff: LayoutTests/svg/dom/viewspec-parser-1.html

Issue 17143003: Rewrite SVG viewspec tests to not be fuzzer tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update for landing Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 "svgView(viewBox(0,0,200,200)))",
22 "svgView(preserveAspectRatio(xMaxYMin slice))",
23 "svgView(preserveAspectRatio(xMaxYMin))",
24 "svgView(viewBox(1,2,3,4);preserveAspectRatio(xMaxYMin))",
25 "svgView(zoomAndPan(disable))",
26 "svgView(viewTarget(#myElementId))",
27 "svgView",
28 "svgView(",
29 "svgView()",
30 "svgView(" + String.fromCharCode(0),
31 "svgView(transform(scale(2));;)",
32 "svgView(transform(scale(2));x", // used to hang
33 "svgView(transform(scale(.5)))",
34 "svgView(;transform(scale(.5)))",
35 "svgView(;;transform(scale(.5)))",
36 "svgView(transform(scale(.5));transform(scale(2));transform(scale(2)))",
37 ];
38
39 for (var attribute in attributes) {
40 // attribute names that are "off by one"
41 var extraChar = attribute.charAt(attribute.length - 1);
42 tests.push("svgView(" + attribute + extraChar + "(0, 0)");
43 tests.push("svgView(" + attribute.substring(0, attribute.length - 1) + " (0, 0)");
44
45 // Empty-ish attributes
46 tests.push("svgView(" + attribute);
47 tests.push("svgView(" + attribute + String.fromCharCode(0));
48 }
49
50 if (window.testRunner)
51 testRunner.waitUntilDone();
52
53 startViewspecTests(tests);
54
55 </script>
56 </html>
OLDNEW
« no previous file with comments | « LayoutTests/svg/dom/viewspec-aspectparams-expected.html ('k') | LayoutTests/svg/dom/viewspec-parser-1-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698