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

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

Issue 2430583002: Add a test case for bug 494057. (Closed)
Patch Set: Created 4 years, 2 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_494057_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
1 {{header}} 1 {{header}}
2 {{object 1 0}} << 2 {{object 1 0}} <<
3 /Type /Catalog 3 /Type /Catalog
4 /Pages 2 0 R 4 /Pages 2 0 R
5 /AcroForm 4 0 R 5 /AcroForm 4 0 R
6 /OpenAction 10 0 R 6 /OpenAction 10 0 R
7 >> 7 >>
8 endobj 8 endobj
9 {{object 2 0}} << 9 {{object 2 0}} <<
10 /Type /Pages 10 /Type /Pages
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 {{object 10 0}} << 84 {{object 10 0}} <<
85 /Type /Action 85 /Type /Action
86 /S /JavaScript 86 /S /JavaScript
87 /JS 11 0 R 87 /JS 11 0 R
88 >> 88 >>
89 endobj 89 endobj
90 % JS program to exexute 90 % JS program to exexute
91 {{object 11 0}} << 91 {{object 11 0}} <<
92 >> 92 >>
93 stream 93 stream
94 function TestGetField() { 94 function TestGetFieldWithDelay() {
95 try { 95 try {
96 var field = this.getField("MyField"); 96 var ff = this.getField("MyField");
97 app.alert("field is " + field.name); 97 app.alert("field is " + ff.name);
98 var sub_a = this.getField("MyField.Sub_A"); 98 app.alert("field value is '" + ff.value + "'");
99 app.alert("sub_a is " + sub_a.name); 99 ff.delay = true;
100 var nonesuch = this.getField("MyField.nonesuch"); 100 ff.value = "new value";
101 app.alert("nonesuch is " + nonesuch); 101 this.delay=true;
102 ff.delay = false;
103 app.alert("field value is '" + ff.value + "'");
102 } catch (e) { 104 } catch (e) {
103 app.alert("Unexpected error: " + e); 105 app.alert("Unexpected error: " + e);
104 } 106 }
105 } 107 }
106 function TestGetArray() { 108 TestGetFieldWithDelay();
107 try {
108 var subs = this.getField("MyField").getArray();
109 app.alert("found " + subs.length + " sub-fields:");
110 for (i = 0; i < subs.length; ++i) {
111 app.alert(subs[i].name);
112 }
113 } catch (e) {
114 app.alert("Unexpected error: " + e);
115 }
116 }
117 TestGetField();
118 TestGetArray();
119 endstream 109 endstream
120 endobj 110 endobj
121 {{xref}} 111 {{xref}}
122 trailer << 112 trailer <<
123 /Root 1 0 R 113 /Root 1 0 R
124 >> 114 >>
125 {{startxref}} 115 {{startxref}}
126 %%EOF 116 %%EOF
OLDNEW
« no previous file with comments | « no previous file | testing/resources/javascript/bug_494057_expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698