1{{header}} 2{{object 1 0}} << 3 /Type /Catalog 4 /Pages 2 0 R 5 /OpenAction 10 0 R 6>> 7endobj 8{{object 2 0}} << 9 /Type /Pages 10 /Count 1 11 /Kids [ 12 3 0 R 13 ] 14>> 15endobj 16% Page number 0. 17{{object 3 0}} << 18 /Type /Page 19 /Parent 2 0 R 20 /MediaBox [0 0 612 792] 21>> 22% OpenAction action 23{{object 10 0}} << 24 /Type /Action 25 /S /JavaScript 26 /JS 11 0 R 27>> 28endobj 29% JS program to exexute 30{{object 11 0}} << 31 {{streamlen}} 32>> 33stream 34{{include expect.js}} 35 36try { 37 expect("app.alert('message', 1, 2, 'title')", 0); 38 expect("app.alert({'cMsg': 'message', 'cTitle': 'title'})", 0); 39 expect("app.alert({'cMsg': 'message', 'cTitle': 'title', 'nIcon': 3, 'nType': 4})", 0); 40 expect("app.alert(undefined)", 0); 41 expect("app.alert(null)", 0); 42 expect("app.alert(true)", 0); 43 expect("app.alert(false)", 0); 44 expect("app.alert(42)", 0); 45 expect("app.alert([1, 2, 3])", 0); 46 expect("app.alert([1, 2, {'color': 'red'}])", 0); 47 expect("app.alert({'color': 'red'}, 5, 6, 'title')", 0); 48 expectError("app.alert()"); 49 expectError("app.alert({})"); 50 expectError("app.alert({'color': 'red', 'size': 42})"); 51 52 expect("app.beep(1)", undefined); 53 54 expectError("app.browseForDoc()"); 55 expect("app.execDialog()", undefined); 56 expectError("app.execMenuItem()"); 57 expect("app.findComponent()", undefined); 58 expect("app.goBack()", undefined); 59 expect("app.goForward()", undefined); 60 expect("app.launchURL()", undefined); 61 expectError("app.newDoc()"); 62 expect("app.newFDF()", undefined); 63 expectError("app.openDoc()"); 64 expect("app.openFDF()", undefined); 65 expectError("app.popUpMenuEx()"); 66 expectError("app.popUpMenu()"); 67 68 expect("app.mailMsg(true)", undefined); 69 expect("app.mailMsg(false, 'user@example.com')", undefined); 70 expect("app.mailMsg(false, 'user@example.com', 'cc@example.com', " + 71 "'bcc@example.com', 'subject', 'body')", undefined); 72 expect("app.mailMsg({'bUI': true})", undefined); 73 expect("app.mailMsg({'bUI': false, 'cTo': 'user@example.com'})", undefined); 74 expect("app.mailMsg({'bUI': false, 'cTo': 'user@example.com', " + 75 "'cCc': 'cc@example.com', 'cBcc': 'bcc@example.com', " + 76 "'cSubject': 'subject', 'cMsg': 'body'})", undefined); 77 expectError("app.mailMsg()"); 78 expectError("app.mailMsg(false)"); 79 expectError("app.mailMsg({'color': 'red', 'size': 42})"); 80 81 expect("app.response('question')", 'No'); 82 expect("app.response('question', 'title', 'default', true, 'label')", 'No'); 83 expect("app.response({'cQuestion': 'question'})", 'No'); 84 expect("app.response({'cQuestion': 'question', 'cTitle': 'title', " + 85 "'cDefault': 'default', 'bPassword': true, 'cLabel': 'label'})", 'No'); 86 expectError("app.response()"); 87 expectError("app.response({})"); 88 89} catch (e) { 90 app.alert('Truly unexpected error: ' + e); 91} 92endstream 93endobj 94{{xref}} 95{{trailer}} 96{{startxref}} 97%%EOF 98