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

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

Issue 1588733003: test cast for bug_361 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add more tests and expected results file. Created 4 years, 11 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/bug_361_expected.txt » ('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 /AcroForm 4 0 R
6 /OpenAction 10 0 R
7 >>
8 endobj
9 {{object 2 0}} <<
10 /Type /Pages
11 /Count 1
12 /Kids [
13 3 0 R
14 ]
15 >>
16 endobj
17 % Page number 0.
18 {{object 3 0}} <<
19 /Type /Page
20 /Parent 2 0 R
21 /Resources <<
22 /Font <</F1 15 0 R>>
23 >>
24 /Contents [21 0 R]
25 /MediaBox [0 0 612 792]
26 >>
27 % Forms
28 {{object 4 0}} <<
29 /Fields [5 0 R]
30 >>
31 % Field
32 {{object 5 0}} <<
33 /FT /Tx
34 /T (MyField)
35 >>
36 % OpenAction action
37 {{object 10 0}} <<
38 /Type /Action
39 /S /JavaScript
40 /JS 11 0 R
41 >>
42 endobj
43 % JS program to exexute
44 {{object 11 0}} <<
45 >>
46 stream
47 function testField(x) {
48 var field = this.getField("MyField");
49 field.value = x;
50 var y = field.value;
51 app.alert("Answer for \"" + x + "\" is: " + typeof(y) + " " + y);
52 }
53 testField("goats");
54 testField("b4");
55 testField("b4.5");
56 testField("4x");
57 testField("4.5x");
58 testField("4");
59 testField(" 4");
60 testField("4 ");
61 testField(" 4 ");
62 testField("4 3 2 1");
63 testField("-4");
64 testField("23.00000001");
65 testField("23.00000000000000001");
66 testField("25,5");
67 testField("1e+5");
68 testField("1e5");
69 testField("1e-5");
70 testField("-1e-5");
71 testField("1.2e5");
72 testField("NAN");
73 testField("INF");
74 testField("0x100");
75 testField("123x6");
76 testField("123xy6");
77 testField("123.y6");
78 testField("1,000,000");
79 testField("1.2.3");
80 testField("1-3");
81 testField("1+3");
82 testField("1.-3");
83 testField("1.+3");
84 endstream
85 endobj
86 {{xref}}
87 trailer <<
88 /Root 1 0 R
89 >>
90 {{startxref}}
91 %%EOF
OLDNEW
« no previous file with comments | « no previous file | testing/resources/javascript/bug_361_expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698