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

Side by Side Diff: testing/resources/javascript/consts.in

Issue 908023003: Add JavaScript test for constants in Consts.cpp. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: try-catch block Created 5 years, 10 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
« no previous file with comments | « no previous file | testing/resources/javascript/consts.pdf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 {{header}}
2 {{object 1 0}} <<
3 /Type /Catalog
4 /Pages 2 0 R
5 /OpenAction 10 0 R
6 >>
7 endobj
8 {{object 2 0}} <<
9 /Type /Pages
10 /Count 1
11 /Kids [
12 3 0 R
13 ]
14 >>
15 endobj
16 % Page number 0.
17 {{object 3 0}} <<
18 /Type /Page
19 /Parent 2 0 R
20 /Resources <<
21 /Font <</F1 15 0 R>>
22 >>
23 /Contents [21 0 R]
24 /MediaBox [0 0 612 792]
25 >>
26 % OpenAction action
27 {{object 10 0}} <<
28 /Type /Action
29 /S /JavaScript
30 /JS 11 0 R
31 >>
32 endobj
33 % JS program to exexute
34 {{object 11 0}} <<
35 >>
36 stream
37
38 function doTest(name, props) {
39 for (var i = 0; i < props.length; ++i) {
40 var expr = name + "." + props[i];
41 app.alert(expr + " is " + eval(expr));
42 }
43 }
44
45 try {
46 doTest("border", ["s", "b", "d", "i", "u", "nonesuch"]);
47 doTest("display", ["visible", "hidden", "noPrint", "noView", "nonesuch"]);
48 doTest("font", ["Times", "TimesB", "TimesI", "TimesBI", "Helv", "HelvB",
49 "HelvI", "HelvBI", "Cour", "CourB", "CourI", "CourBI",
50 "Symbol", "ZapfD", "Nonesuch"]);
51
52 doTest("highlight", ["n", "i", "p", "o", "nonesuch"]);
53 doTest("position", ["textOnly", "iconOnly", "iconTextV", "textIconV",
54 "iconTextH", "textIconH", "overlay", "nonesuch"]);
55
56 doTest("scaleHow", ["proportional", "anamorphic", "nonesuch"]);
57 doTest("scaleWhen", ["always", "never", "tooBig", "tooSmall", "nonesuch"]);
58 doTest("style", ["ch", "cr", "di", "ci", "st", "sq", "nonesuch"]);
59 doTest("zoomtype", ["none", "fitP", "fitW", "fitH", "fitV", "pref", "refW",
60 "nonesuch"]);
61 } catch (e) {
62 app.alert("ERROR: " + e.toString());
63 }
64 endstream
65 endobj
66 {{xref}}
67 trailer <<
68 /Root 1 0 R
69 >>
70 {{startxref}}
71 %%EOF
OLDNEW
« no previous file with comments | « no previous file | testing/resources/javascript/consts.pdf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698