1*3ac0a46fSAndroid Build Coastguard Worker{{header}} 2*3ac0a46fSAndroid Build Coastguard Worker{{object 1 0}} << 3*3ac0a46fSAndroid Build Coastguard Worker /Type /Catalog 4*3ac0a46fSAndroid Build Coastguard Worker /Pages 2 0 R 5*3ac0a46fSAndroid Build Coastguard Worker /AcroForm << 6*3ac0a46fSAndroid Build Coastguard Worker /Fields [ 7*3ac0a46fSAndroid Build Coastguard Worker 4 0 R 8*3ac0a46fSAndroid Build Coastguard Worker 10 0 R 9*3ac0a46fSAndroid Build Coastguard Worker 11 0 R 10*3ac0a46fSAndroid Build Coastguard Worker 12 0 R 11*3ac0a46fSAndroid Build Coastguard Worker ] 12*3ac0a46fSAndroid Build Coastguard Worker /DR 5 0 R 13*3ac0a46fSAndroid Build Coastguard Worker >> 14*3ac0a46fSAndroid Build Coastguard Worker>> 15*3ac0a46fSAndroid Build Coastguard Workerendobj 16*3ac0a46fSAndroid Build Coastguard Worker{{object 2 0}} << 17*3ac0a46fSAndroid Build Coastguard Worker /Count 1 18*3ac0a46fSAndroid Build Coastguard Worker /Kids [ 3 0 R ] 19*3ac0a46fSAndroid Build Coastguard Worker /Type /Pages 20*3ac0a46fSAndroid Build Coastguard Worker>> 21*3ac0a46fSAndroid Build Coastguard Workerendobj 22*3ac0a46fSAndroid Build Coastguard Worker{{object 3 0}} << 23*3ac0a46fSAndroid Build Coastguard Worker /Type /Page 24*3ac0a46fSAndroid Build Coastguard Worker /Parent 2 0 R 25*3ac0a46fSAndroid Build Coastguard Worker /Resources 5 0 R 26*3ac0a46fSAndroid Build Coastguard Worker /MediaBox [ 0 0 300 200 ] 27*3ac0a46fSAndroid Build Coastguard Worker /Contents 8 0 R 28*3ac0a46fSAndroid Build Coastguard Worker /Annots [ 29*3ac0a46fSAndroid Build Coastguard Worker 4 0 R 30*3ac0a46fSAndroid Build Coastguard Worker 10 0 R 31*3ac0a46fSAndroid Build Coastguard Worker 11 0 R 32*3ac0a46fSAndroid Build Coastguard Worker 12 0 R 33*3ac0a46fSAndroid Build Coastguard Worker ] 34*3ac0a46fSAndroid Build Coastguard Worker>> 35*3ac0a46fSAndroid Build Coastguard Workerendobj 36*3ac0a46fSAndroid Build Coastguard Worker{{object 4 0}} << 37*3ac0a46fSAndroid Build Coastguard Worker /Type /Annot 38*3ac0a46fSAndroid Build Coastguard Worker /FT /Tx 39*3ac0a46fSAndroid Build Coastguard Worker /T (Text Box) 40*3ac0a46fSAndroid Build Coastguard Worker /DA (0 0 0 rg /F1 12 Tf) 41*3ac0a46fSAndroid Build Coastguard Worker /Rect [ 100 160 200 190 ] 42*3ac0a46fSAndroid Build Coastguard Worker /Subtype /Widget 43*3ac0a46fSAndroid Build Coastguard Worker /AA << 44*3ac0a46fSAndroid Build Coastguard Worker /C 16 0 R 45*3ac0a46fSAndroid Build Coastguard Worker /F 17 0 R 46*3ac0a46fSAndroid Build Coastguard Worker /K 18 0 R 47*3ac0a46fSAndroid Build Coastguard Worker /V 19 0 R 48*3ac0a46fSAndroid Build Coastguard Worker >> 49*3ac0a46fSAndroid Build Coastguard Worker>> 50*3ac0a46fSAndroid Build Coastguard Workerendobj 51*3ac0a46fSAndroid Build Coastguard Worker{{object 5 0}} << 52*3ac0a46fSAndroid Build Coastguard Worker /Font 6 0 R 53*3ac0a46fSAndroid Build Coastguard Worker>> 54*3ac0a46fSAndroid Build Coastguard Workerendobj 55*3ac0a46fSAndroid Build Coastguard Worker{{object 6 0}} << 56*3ac0a46fSAndroid Build Coastguard Worker /F1 7 0 R 57*3ac0a46fSAndroid Build Coastguard Worker>> 58*3ac0a46fSAndroid Build Coastguard Workerendobj 59*3ac0a46fSAndroid Build Coastguard Worker{{object 7 0}} << 60*3ac0a46fSAndroid Build Coastguard Worker /Type /Font 61*3ac0a46fSAndroid Build Coastguard Worker /Subtype /Type1 62*3ac0a46fSAndroid Build Coastguard Worker /BaseFont /Helvetica 63*3ac0a46fSAndroid Build Coastguard Worker>> 64*3ac0a46fSAndroid Build Coastguard Workerendobj 65*3ac0a46fSAndroid Build Coastguard Worker{{object 8 0}} << 66*3ac0a46fSAndroid Build Coastguard Worker {{streamlen}} 67*3ac0a46fSAndroid Build Coastguard Worker>> 68*3ac0a46fSAndroid Build Coastguard Workerstream 69*3ac0a46fSAndroid Build Coastguard Workerendstream 70*3ac0a46fSAndroid Build Coastguard Workerendobj 71*3ac0a46fSAndroid Build Coastguard Worker{{object 10 0}} << 72*3ac0a46fSAndroid Build Coastguard Worker /Type /Annot 73*3ac0a46fSAndroid Build Coastguard Worker /Subtype /Widget 74*3ac0a46fSAndroid Build Coastguard Worker /FT /Tx 75*3ac0a46fSAndroid Build Coastguard Worker /T (Text2) 76*3ac0a46fSAndroid Build Coastguard Worker /DA (0 0 0 rg /F1 12 Tf) 77*3ac0a46fSAndroid Build Coastguard Worker /Rect [100 0 200 30] 78*3ac0a46fSAndroid Build Coastguard Worker /V (123) 79*3ac0a46fSAndroid Build Coastguard Worker>> 80*3ac0a46fSAndroid Build Coastguard Workerendobj 81*3ac0a46fSAndroid Build Coastguard Worker{{object 11 0}} << 82*3ac0a46fSAndroid Build Coastguard Worker /Type /Annot 83*3ac0a46fSAndroid Build Coastguard Worker /Subtype /Widget 84*3ac0a46fSAndroid Build Coastguard Worker /FT /Tx 85*3ac0a46fSAndroid Build Coastguard Worker /T (Text3) 86*3ac0a46fSAndroid Build Coastguard Worker /DA (0 0 0 rg /F1 12 Tf) 87*3ac0a46fSAndroid Build Coastguard Worker /Rect [100 40 200 70] 88*3ac0a46fSAndroid Build Coastguard Worker /V (456) 89*3ac0a46fSAndroid Build Coastguard Worker>> 90*3ac0a46fSAndroid Build Coastguard Workerendobj 91*3ac0a46fSAndroid Build Coastguard Worker{{object 12 0}} << 92*3ac0a46fSAndroid Build Coastguard Worker /Type /Annot 93*3ac0a46fSAndroid Build Coastguard Worker /Subtype /Widget 94*3ac0a46fSAndroid Build Coastguard Worker /FT /Tx 95*3ac0a46fSAndroid Build Coastguard Worker /T (Text4) 96*3ac0a46fSAndroid Build Coastguard Worker /DA (0 0 0 rg /F1 12 Tf) 97*3ac0a46fSAndroid Build Coastguard Worker /Rect [100 80 200 110] 98*3ac0a46fSAndroid Build Coastguard Worker /V (407.96) 99*3ac0a46fSAndroid Build Coastguard Worker>> 100*3ac0a46fSAndroid Build Coastguard Workerendobj 101*3ac0a46fSAndroid Build Coastguard Worker{{object 16 0}} << 102*3ac0a46fSAndroid Build Coastguard Worker /S /JavaScript 103*3ac0a46fSAndroid Build Coastguard Worker /JS ( 104*3ac0a46fSAndroid Build Coastguard Worker app.alert('Unexpected script 16'); 105*3ac0a46fSAndroid Build Coastguard Worker ) 106*3ac0a46fSAndroid Build Coastguard Worker>> 107*3ac0a46fSAndroid Build Coastguard Workerendobj 108*3ac0a46fSAndroid Build Coastguard Worker{{object 17 0}} << 109*3ac0a46fSAndroid Build Coastguard Worker /S /JavaScript 110*3ac0a46fSAndroid Build Coastguard Worker /JS ( 111*3ac0a46fSAndroid Build Coastguard Worker function expect(initial, expression, expected) { 112*3ac0a46fSAndroid Build Coastguard Worker try { 113*3ac0a46fSAndroid Build Coastguard Worker event.value = initial; 114*3ac0a46fSAndroid Build Coastguard Worker var actual = eval(expression); 115*3ac0a46fSAndroid Build Coastguard Worker if (actual == expected) { 116*3ac0a46fSAndroid Build Coastguard Worker app.alert('PASS: ' + expression + ' = ' + actual); 117*3ac0a46fSAndroid Build Coastguard Worker } else { 118*3ac0a46fSAndroid Build Coastguard Worker app.alert('FAIL: ' + expression + ' = ' + actual + ', expected ' + expected + " "); 119*3ac0a46fSAndroid Build Coastguard Worker } 120*3ac0a46fSAndroid Build Coastguard Worker } catch (e) { 121*3ac0a46fSAndroid Build Coastguard Worker app.alert('ERROR: ' + e); 122*3ac0a46fSAndroid Build Coastguard Worker } 123*3ac0a46fSAndroid Build Coastguard Worker } 124*3ac0a46fSAndroid Build Coastguard Worker 125*3ac0a46fSAndroid Build Coastguard Worker function expectEventValue(initial, expression, expected) { 126*3ac0a46fSAndroid Build Coastguard Worker try { 127*3ac0a46fSAndroid Build Coastguard Worker event.value = initial; 128*3ac0a46fSAndroid Build Coastguard Worker eval(expression); 129*3ac0a46fSAndroid Build Coastguard Worker var actual = event.value; 130*3ac0a46fSAndroid Build Coastguard Worker if (actual == expected) { 131*3ac0a46fSAndroid Build Coastguard Worker app.alert('PASS: ' + expression + ' = ' + actual); 132*3ac0a46fSAndroid Build Coastguard Worker } else { 133*3ac0a46fSAndroid Build Coastguard Worker app.alert('FAIL: ' + expression + ' = ' + actual + ', expected ' + expected + " "); 134*3ac0a46fSAndroid Build Coastguard Worker } 135*3ac0a46fSAndroid Build Coastguard Worker } catch (e) { 136*3ac0a46fSAndroid Build Coastguard Worker app.alert('ERROR: ' + e); 137*3ac0a46fSAndroid Build Coastguard Worker } 138*3ac0a46fSAndroid Build Coastguard Worker } 139*3ac0a46fSAndroid Build Coastguard Worker 140*3ac0a46fSAndroid Build Coastguard Worker function expectError(initial, expression) { 141*3ac0a46fSAndroid Build Coastguard Worker try { 142*3ac0a46fSAndroid Build Coastguard Worker event.value = initial; 143*3ac0a46fSAndroid Build Coastguard Worker var actual = eval(expression); 144*3ac0a46fSAndroid Build Coastguard Worker app.alert('FAIL: ' + expression + ' = ' + actual + ', expected to throw'); 145*3ac0a46fSAndroid Build Coastguard Worker } catch (e) { 146*3ac0a46fSAndroid Build Coastguard Worker app.alert('PASS: ' + expression + ' threw ' + e); 147*3ac0a46fSAndroid Build Coastguard Worker } 148*3ac0a46fSAndroid Build Coastguard Worker } 149*3ac0a46fSAndroid Build Coastguard Worker 150*3ac0a46fSAndroid Build Coastguard Worker try { 151*3ac0a46fSAndroid Build Coastguard Worker app.alert("*** starting test 1 ***"); 152*3ac0a46fSAndroid Build Coastguard Worker 153*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_Format()"); 154*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_Format(1, 2)"); 155*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("GMT", "AFDate_Format(1)", "1/1/70"); 156*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("PDT", "AFDate_Format(1)", "5/9/14"); 157*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("GMT", "AFDate_Format('blooey')", "1/1"); 158*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("PDT", "AFDate_Format('blooey')", "5/9"); 159*3ac0a46fSAndroid Build Coastguard Worker 160*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 161*3ac0a46fSAndroid Build Coastguard Worker 162*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_FormatEx()"); 163*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_FormatEx(1, 2)"); 164*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("x", "AFDate_FormatEx(2)", "2"); 165*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("x", "AFDate_FormatEx('blooey')", "blooey"); 166*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("x", "AFDate_FormatEx('m/d')", "5/9"); 167*3ac0a46fSAndroid Build Coastguard Worker // TODO(crbug.com/572901): This is wrong. AFDate_FormatEx() should throw 168*3ac0a46fSAndroid Build Coastguard Worker // an error like Adobe Acrobat. 169*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("12302015", "AFDate_FormatEx('mm/dd/yyyy')", "12/02/2015"); 170*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("20122015", "AFDate_FormatEx('mm/dd/yyyy')", "05/09/2014"); 171*3ac0a46fSAndroid Build Coastguard Worker 172*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 173*3ac0a46fSAndroid Build Coastguard Worker 174*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_Keystroke()"); 175*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_Keystroke(1, 2)"); 176*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("04/19", "AFDate_Keystroke(2)", "04/19"); 177*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("04/19/15", "AFDate_Keystroke('blooey')", "04/19/15"); 178*3ac0a46fSAndroid Build Coastguard Worker 179*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 180*3ac0a46fSAndroid Build Coastguard Worker 181*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_KeystrokeEx()"); 182*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_KeystrokeEx(1, 2)"); 183*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("x", "AFDate_KeystrokeEx(2)", "x"); 184*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("x", "AFDate_KeystrokeEx('blooey')", "x"); 185*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("x", "AFDate_KeystrokeEx('m/d')", "x"); 186*3ac0a46fSAndroid Build Coastguard Worker 187*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 188*3ac0a46fSAndroid Build Coastguard Worker 189*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFExtractNums()"); 190*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFExtractNums(1, 2)"); 191*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFExtractNums('100 200')", "100,200"); 192*3ac0a46fSAndroid Build Coastguard Worker 193*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 194*3ac0a46fSAndroid Build Coastguard Worker 195*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFMakeNumber()"); 196*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFMakeNumber(1, 2)"); 197*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFMakeNumber('2blooey')", 0); 198*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFMakeNumber(1)", 1); 199*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFMakeNumber('1.2')", 1.2); 200*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFMakeNumber('1,2')", 1.2); 201*3ac0a46fSAndroid Build Coastguard Worker 202*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 203*3ac0a46fSAndroid Build Coastguard Worker 204*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFMergeChange()"); 205*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFMergeChange(1, 2)"); 206*3ac0a46fSAndroid Build Coastguard Worker expect("one", "AFMergeChange(undefined)", "one"); 207*3ac0a46fSAndroid Build Coastguard Worker 208*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 209*3ac0a46fSAndroid Build Coastguard Worker 210*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFNumber_Format()"); 211*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFNumber_Format(0, 1, 0, 0, '', false, 42)"); 212*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("blooey", "AFNumber_Format(0, 1, 0, 0, '', false)", 0); 213*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(12, "AFNumber_Format(0, 1, 0, 0, '', false)", 12); 214*3ac0a46fSAndroid Build Coastguard Worker 215*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 216*3ac0a46fSAndroid Build Coastguard Worker 217*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFNumber_Keystroke()"); 218*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFNumber_Keystroke(1)"); 219*3ac0a46fSAndroid Build Coastguard Worker expectError("abc", "AFNumber_Keystroke(1, 2)"); 220*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("123", "AFNumber_Keystroke(1, 2)", "123"); 221*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("123", "AFNumber_Keystroke(1, 2, 3)", "123"); 222*3ac0a46fSAndroid Build Coastguard Worker 223*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 224*3ac0a46fSAndroid Build Coastguard Worker 225*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFParseDateEx()"); 226*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFParseDateEx(1, 2, 3)"); 227*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFParseDateEx(1, 2)", "1399672130000"); 228*3ac0a46fSAndroid Build Coastguard Worker 229*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 230*3ac0a46fSAndroid Build Coastguard Worker 231*3ac0a46fSAndroid Build Coastguard Worker // Requires at least 2 arguments. 232*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFPercent_Format()"); 233*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFPercent_Format(0)"); 234*3ac0a46fSAndroid Build Coastguard Worker 235*3ac0a46fSAndroid Build Coastguard Worker // Extra arguments are ignored. 236*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0, 0)", "-512.3%"); 237*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0, 0, 0)", "-512.3%"); 238*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0, 0, 0, 0)", "-512.3%"); 239*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0, 0, 0, 0, 0)", "-512.3%"); 240*3ac0a46fSAndroid Build Coastguard Worker 241*3ac0a46fSAndroid Build Coastguard Worker // There seems to be an extra bPercentPrepend parameter that may have been 242*3ac0a46fSAndroid Build Coastguard Worker // added in later versions. 243*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0, 0)", "-512.3%"); 244*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0, 1)", "%-512.3"); 245*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0, 2)", "%-512.3"); 246*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 0, 0)", "0.0000000000%"); 247*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 0, 1)", "%0.0000000000"); 248*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 0, 2)", "%0.0000000000"); 249*3ac0a46fSAndroid Build Coastguard Worker 250*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 0, 0)", "98,765,432,100%"); 251*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 1, 0)", "98765432100%"); 252*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 2, 0)", "98.765.432.100%"); 253*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 0, 1)", "%98,765,432,100"); 254*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 1, 1)", "%98765432100"); 255*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 2, 1)", "%98.765.432.100"); 256*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 0, 2)", "%98,765,432,100"); 257*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 1, 2)", "%98765432100"); 258*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 2, 2)", "%98.765.432.100"); 259*3ac0a46fSAndroid Build Coastguard Worker 260*3ac0a46fSAndroid Build Coastguard Worker // InvalidArgsError 261*3ac0a46fSAndroid Build Coastguard Worker expectError(0, "AFPercent_Format(-3, 0)"); 262*3ac0a46fSAndroid Build Coastguard Worker expectError(0, "AFPercent_Format(-3, 1)"); 263*3ac0a46fSAndroid Build Coastguard Worker expectError(0, "AFPercent_Format(-1, 3)"); 264*3ac0a46fSAndroid Build Coastguard Worker expectError(0, "AFPercent_Format(0, -3)"); 265*3ac0a46fSAndroid Build Coastguard Worker expectError(0, "AFPercent_Format(0, -1)"); 266*3ac0a46fSAndroid Build Coastguard Worker expectError(0, "AFPercent_Format(0, 50)"); 267*3ac0a46fSAndroid Build Coastguard Worker expectError(0, "AFPercent_Format(0, 51)"); 268*3ac0a46fSAndroid Build Coastguard Worker 269*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(0, 0)", "0%"); 270*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(0, 1)", "0%"); 271*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(0, 2)", "0%"); 272*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(0, 3)", "0%"); 273*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(0, 4)", "0%"); 274*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(1, 0)", "0.0%"); 275*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(1, 1)", "0.0%"); 276*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(1, 2)", "0,0%"); 277*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(1, 3)", "0,0%"); 278*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(1, 4)", "0.0%"); 279*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(2, 0)", "0.00%"); 280*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(2, 1)", "0.00%"); 281*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(2, 2)", "0,00%"); 282*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(2, 3)", "0,00%"); 283*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(2, 4)", "0.00%"); 284*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(3, 0)", "0.000%"); 285*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(3, 1)", "0.000%"); 286*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(3, 2)", "0,000%"); 287*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(3, 3)", "0,000%"); 288*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(3, 4)", "0.000%"); 289*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 0)", "0.0000000000%"); 290*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 1)", "0.0000000000%"); 291*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 2)", "0,0000000000%"); 292*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 3)", "0,0000000000%"); 293*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFPercent_Format(10, 4)", "0.0000000000%"); 294*3ac0a46fSAndroid Build Coastguard Worker 295*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(0, 0)", "0%"); 296*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(0, 1)", "0%"); 297*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(0, 2)", "0%"); 298*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(0, 3)", "0%"); 299*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(0, 4)", "0%"); 300*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(1, 0)", "0.0%"); 301*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(1, 1)", "0.0%"); 302*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(1, 2)", "0,0%"); 303*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(1, 3)", "0,0%"); 304*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(1, 4)", "0.0%"); 305*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(2, 0)", "0.00%"); 306*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(2, 1)", "0.00%"); 307*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(2, 2)", "0,00%"); 308*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(2, 3)", "0,00%"); 309*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(2, 4)", "0.00%"); 310*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(3, 0)", "0.000%"); 311*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(3, 1)", "0.000%"); 312*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(3, 2)", "0,000%"); 313*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(3, 3)", "0,000%"); 314*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(3, 4)", "0.000%"); 315*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(10, 0)", "0.0000000000%"); 316*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(10, 1)", "0.0000000000%"); 317*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(10, 2)", "0,0000000000%"); 318*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(10, 3)", "0,0000000000%"); 319*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(10, 4)", "0.0000000000%"); 320*3ac0a46fSAndroid Build Coastguard Worker 321*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(0, 0)", "-512%"); 322*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(0, 1)", "-512%"); 323*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(0, 2)", "-512%"); 324*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(0, 3)", "-512%"); 325*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(0, 4)", "-512%"); 326*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 0)", "-512.3%"); 327*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 1)", "-512.3%"); 328*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 2)", "-512,3%"); 329*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 3)", "-512,3%"); 330*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(1, 4)", "-512.3%"); 331*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(2, 0)", "-512.34%"); 332*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(2, 1)", "-512.34%"); 333*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(2, 2)", "-512,34%"); 334*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(2, 3)", "-512,34%"); 335*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(2, 4)", "-512.34%"); 336*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(3, 0)", "-512.340%"); 337*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(3, 1)", "-512.340%"); 338*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(3, 2)", "-512,340%"); 339*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(3, 3)", "-512,340%"); 340*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(3, 4)", "-512.340%"); 341*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(10, 0)", "-512.3400000000%"); 342*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(10, 1)", "-512.3400000000%"); 343*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(10, 2)", "-512,3400000000%"); 344*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(10, 3)", "-512,3400000000%"); 345*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(-5.1234, "AFPercent_Format(10, 4)", "-512.3400000000%"); 346*3ac0a46fSAndroid Build Coastguard Worker 347*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(0, 0)", "512%"); 348*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(0, 1)", "512%"); 349*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(0, 2)", "512%"); 350*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(0, 3)", "512%"); 351*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(0, 4)", "512%"); 352*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(1, 0)", "512.3%"); 353*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(1, 1)", "512.3%"); 354*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(1, 2)", "512,3%"); 355*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(1, 3)", "512,3%"); 356*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(1, 4)", "512.3%"); 357*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(2, 0)", "512.34%"); 358*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(2, 1)", "512.34%"); 359*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(2, 2)", "512,34%"); 360*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(2, 3)", "512,34%"); 361*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(2, 4)", "512.34%"); 362*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(3, 0)", "512.340%"); 363*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(3, 1)", "512.340%"); 364*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(3, 2)", "512,340%"); 365*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(3, 3)", "512,340%"); 366*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(3, 4)", "512.340%"); 367*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(10, 0)", "512.3400000000%"); 368*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(10, 1)", "512.3400000000%"); 369*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(10, 2)", "512,3400000000%"); 370*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(10, 3)", "512,3400000000%"); 371*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(5.1234, "AFPercent_Format(10, 4)", "512.3400000000%"); 372*3ac0a46fSAndroid Build Coastguard Worker 373*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(12.3456, "AFPercent_Format(1, 0)", "1,234.6%"); 374*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(12.3456, "AFPercent_Format(4, 1)", "1234.5600%"); 375*3ac0a46fSAndroid Build Coastguard Worker 376*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(0, 0)", "1%"); 377*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(0, 1)", "1%"); 378*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(0, 2)", "1%"); 379*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(0, 3)", "1%"); 380*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(0, 4)", "1%"); 381*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(1, 0)", "1.0%"); 382*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(1, 1)", "1.0%"); 383*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(1, 2)", "1,0%"); 384*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(1, 3)", "1,0%"); 385*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(1, 4)", "1.0%"); 386*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(2, 0)", "0.99%"); 387*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(2, 1)", "0.99%"); 388*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(2, 2)", "0,99%"); 389*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(2, 3)", "0,99%"); 390*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(2, 4)", "0.99%"); 391*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(3, 0)", "0.988%"); 392*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(3, 1)", "0.988%"); 393*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(3, 2)", "0,988%"); 394*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(3, 3)", "0,988%"); 395*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(3, 4)", "0.988%"); 396*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(10, 0)", "0.9876000000%"); 397*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(10, 1)", "0.9876000000%"); 398*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(10, 2)", "0,9876000000%"); 399*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(10, 3)", "0,9876000000%"); 400*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.009876, "AFPercent_Format(10, 4)", "0.9876000000%"); 401*3ac0a46fSAndroid Build Coastguard Worker 402*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 0)", "98,765,432,100%"); 403*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 1)", "98765432100%"); 404*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 2)", "98.765.432.100%"); 405*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 3)", "98765432100%"); 406*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(0, 4)", "98'765'432'100%"); 407*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(1, 0)", "98,765,432,100.1%"); 408*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(1, 1)", "98765432100.1%"); 409*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(1, 2)", "98.765.432.100,1%"); 410*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(1, 3)", "98765432100,1%"); 411*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(1, 4)", "98'765'432'100.1%"); 412*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(2, 0)", "98,765,432,100.12%"); 413*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(2, 1)", "98765432100.12%"); 414*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(2, 2)", "98.765.432.100,12%"); 415*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(2, 3)", "98765432100,12%"); 416*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(2, 4)", "98'765'432'100.12%"); 417*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(3, 0)", "98,765,432,100.123%"); 418*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(3, 1)", "98765432100.123%"); 419*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(3, 2)", "98.765.432.100,123%"); 420*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(3, 3)", "98765432100,123%"); 421*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(3, 4)", "98'765'432'100.123%"); 422*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(10, 0)", "98,765,432,100.1234130859%"); 423*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(10, 1)", "98765432100.1234130859%"); 424*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(10, 2)", "98.765.432.100,1234130859%"); 425*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(10, 3)", "98765432100,1234130859%"); 426*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321.001234, "AFPercent_Format(10, 4)", "98'765'432'100.1234130859%"); 427*3ac0a46fSAndroid Build Coastguard Worker 428*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(0, 0)", "98,765,432,100%"); 429*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(0, 1)", "98765432100%"); 430*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(0, 2)", "98.765.432.100%"); 431*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(0, 3)", "98765432100%"); 432*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(0, 4)", "98'765'432'100%"); 433*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(1, 0)", "98,765,432,100.0%"); 434*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(1, 1)", "98765432100.0%"); 435*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(1, 2)", "98.765.432.100,0%"); 436*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(1, 3)", "98765432100,0%"); 437*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(1, 4)", "98'765'432'100.0%"); 438*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(2, 0)", "98,765,432,100.00%"); 439*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(2, 1)", "98765432100.00%"); 440*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(2, 2)", "98.765.432.100,00%"); 441*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(2, 3)", "98765432100,00%"); 442*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(2, 4)", "98'765'432'100.00%"); 443*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(3, 0)", "98,765,432,100.000%"); 444*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(3, 1)", "98765432100.000%"); 445*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(3, 2)", "98.765.432.100,000%"); 446*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(3, 3)", "98765432100,000%"); 447*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(3, 4)", "98'765'432'100.000%"); 448*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(10, 0)", "98,765,432,100.0000000000%"); 449*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(10, 1)", "98765432100.0000000000%"); 450*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(10, 2)", "98.765.432.100,0000000000%"); 451*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(10, 3)", "98765432100,0000000000%"); 452*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(987654321, "AFPercent_Format(10, 4)", "98'765'432'100.0000000000%"); 453*3ac0a46fSAndroid Build Coastguard Worker 454*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.01, "AFPercent_Format(1, 0)", "1.0%"); 455*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.001, "AFPercent_Format(1, 0)", "0.1%"); 456*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.0001, "AFPercent_Format(1, 0)", "0.0%"); 457*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.00001, "AFPercent_Format(1, 0)", "0.0%"); 458*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.000001, "AFPercent_Format(1, 0)", "0.0%"); 459*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.000001, "AFPercent_Format(10, 2)", "0,0001000000%"); 460*3ac0a46fSAndroid Build Coastguard Worker 461*3ac0a46fSAndroid Build Coastguard Worker // Acrobat behaves strangely with smaller values. 462*3ac0a46fSAndroid Build Coastguard Worker // expectEventValue(0.0000001, "AFPercent_Format(1, 0)", "-170.0%"); 463*3ac0a46fSAndroid Build Coastguard Worker // expectEventValue(0.00000001, "AFPercent_Format(1, 0)", "-180.0%"); 464*3ac0a46fSAndroid Build Coastguard Worker 465*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(20, 0)", "0.00000000000000000000%"); 466*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(308, 0)", "0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000%"); 467*3ac0a46fSAndroid Build Coastguard Worker // Acrobat starts failing here. 468*3ac0a46fSAndroid Build Coastguard Worker // expectEventValue(0, "AFPercent_Format(309, 0)", "-1.#IND000...000%"); 469*3ac0a46fSAndroid Build Coastguard Worker 470*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0.000001, "AFPercent_Format(308, 0)", "0.00009999999999999999123964644631712417321978136897087097167968750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000%"); 471*3ac0a46fSAndroid Build Coastguard Worker // After 512, Acrobat probably ran out of buffer space. 472*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFPercent_Format(513, 0)", "%"); 473*3ac0a46fSAndroid Build Coastguard Worker 474*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 475*3ac0a46fSAndroid Build Coastguard Worker 476*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFPercent_Keystroke()"); 477*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFPercent_Keystroke(1)"); 478*3ac0a46fSAndroid Build Coastguard Worker expectError("abc", "AFPercent_Keystroke(1, 0)"); 479*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(".123", "AFPercent_Keystroke(1, 0)", ".123"); 480*3ac0a46fSAndroid Build Coastguard Worker 481*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 482*3ac0a46fSAndroid Build Coastguard Worker 483*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFRange_Validate()", ''); 484*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFRange_Validate(1, 2, 3, 4, 5)", ''); 485*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("1", "AFRange_Validate(true, 2, true, 4)", "1"); // Notifies "between". 486*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("5", "AFRange_Validate(true, 2, true, 4)", "5"); // Notifies "between". 487*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("1", "AFRange_Validate(true, 2, false, 4)", "1"); // Notifies "greater". 488*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("5", "AFRange_Validate(false, 2, true, 4)", "5"); // Notifies "less". 489*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("3", "AFRange_Validate(true, 2, true, 4)", "3"); // No notification. 490*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("1", "AFRange_Validate(false, 2, true, 4)", "1"); // No notification. 491*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("5", "AFRange_Validate(true, 2, false, 4)", "5"); // No notification. 492*3ac0a46fSAndroid Build Coastguard Worker 493*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 494*3ac0a46fSAndroid Build Coastguard Worker 495*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple()", 2); 496*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple(1, 2, 3, 4)"); 497*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple(1, 2, 3)"); 498*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple('nonesuch', 2, 3)"); 499*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFSimple('AVG', 2, 3)", 2.5); 500*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFSimple('MIN', 2, 3)", 2); 501*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFSimple('MAX', 2, 3)", 3); 502*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFSimple('SUM', 2, 3)", 5); 503*3ac0a46fSAndroid Build Coastguard Worker expect('', "AFSimple('PRD', 2, 3)", 6); 504*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple('AVG', 2, 'nonesuch')"); 505*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple('MIN', 2, 'nonesuch')"); 506*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple('MAX', 2, 'nonesuch')"); 507*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple('SUM', 2, 'nonesuch')"); 508*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple('PRD', 2, 'nonesuch')"); 509*3ac0a46fSAndroid Build Coastguard Worker 510*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 511*3ac0a46fSAndroid Build Coastguard Worker 512*3ac0a46fSAndroid Build Coastguard Worker // These two should throw "TypeError", not "AFSimple_Calculate". 513*3ac0a46fSAndroid Build Coastguard Worker // https://crbug.com/pdfium/1396 514*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple_Calculate()"); 515*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSimple_Calculate(1)"); 516*3ac0a46fSAndroid Build Coastguard Worker // This should "pass", but currently throws an error. 517*3ac0a46fSAndroid Build Coastguard Worker // https://crbug.com/pdfium/1396 518*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('blooey', ['Text2', 'Text3'])", 0); 519*3ac0a46fSAndroid Build Coastguard Worker // This should fail with TypeError, since a field does not exist, but 520*3ac0a46fSAndroid Build Coastguard Worker // currently passes. https://crbug.com/pdfium/1396 521*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('AVG', [1, 'nonesuch', {'crud': 32}])", 0); 522*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('AVG', ['Text2', 'Text3'])", (123 + 456) / 2); 523*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('SUM', ['Text2', 'Text3'])", 123 + 456); 524*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('PRD', ['Text2', 'Text3'])", 123 * 456); 525*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('MIN', ['Text2', 'Text3'])", 123); 526*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('MAX', ['Text2', 'Text3'])", 456); 527*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('AVG', 'Text2, Text3')", (123 + 456) / 2); 528*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('AVG', ['Text4'])", 407.96); 529*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('SUM', ['Text4'])", 407.96); 530*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('MIN', ['Text4'])", 407.96); 531*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('MAX', ['Text4'])", 407.96); 532*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('AVG', ['Text2', 'Text4'])", (123 + 407.96) / 2); 533*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('SUM', ['Text2', 'Text4'])", 123 + 407.96); 534*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSimple_Calculate('PRD', ['Text2', 'Text4'])", 50179.08); 535*3ac0a46fSAndroid Build Coastguard Worker 536*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 537*3ac0a46fSAndroid Build Coastguard Worker 538*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSpecial_Format()", ''); 539*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSpecial_Format(1, 2)", ''); 540*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSpecial_Format(0)", ""); 541*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSpecial_Format(1)", "-"); 542*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSpecial_Format(2)", "-"); 543*3ac0a46fSAndroid Build Coastguard Worker expectEventValue('', "AFSpecial_Format(3)", "--"); 544*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("0123456789", "AFSpecial_Format(0)", "01234"); 545*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("0123456789", "AFSpecial_Format(1)", "01234-5678"); 546*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("0123456789", "AFSpecial_Format(2)", "(012) 345-6789"); 547*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("0123456789", "AFSpecial_Format(3)", "012-34-5678"); 548*3ac0a46fSAndroid Build Coastguard Worker 549*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 550*3ac0a46fSAndroid Build Coastguard Worker 551*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSpecial_Keystroke()"); 552*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSpecial_Keystroke(65, 66)"); 553*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("abc", "AFSpecial_Keystroke(65)", "abc"); 554*3ac0a46fSAndroid Build Coastguard Worker 555*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 556*3ac0a46fSAndroid Build Coastguard Worker 557*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSpecial_KeystrokeEx()", ''); 558*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("12345", "AFSpecial_KeystrokeEx('')", "12345"); // No notification. 559*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("123", "AFSpecial_KeystrokeEx('9999')", "123"); // Notifies invalid. 560*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("12345", "AFSpecial_KeystrokeEx('9999')", "12345"); // Notifies too long. 561*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("abcd", "AFSpecial_KeystrokeEx('9999')", "abcd"); // Notifies invalid. 562*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("1234", "AFSpecial_KeystrokeEx('9999')", "1234"); 563*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("abcd", "AFSpecial_KeystrokeEx('XXXX')", "abcd"); 564*3ac0a46fSAndroid Build Coastguard Worker 565*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 566*3ac0a46fSAndroid Build Coastguard Worker 567*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_Format()"); 568*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_Format(1, 2)"); 569*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFTime_Format(1)", "9:48 pm"); 570*3ac0a46fSAndroid Build Coastguard Worker 571*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 572*3ac0a46fSAndroid Build Coastguard Worker 573*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_FormatEx()"); 574*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_FormatEx('blooey', 42)"); 575*3ac0a46fSAndroid Build Coastguard Worker expectEventValue(0, "AFTime_FormatEx('blooey')", "blooey"); 576*3ac0a46fSAndroid Build Coastguard Worker 577*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 578*3ac0a46fSAndroid Build Coastguard Worker 579*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_Keystroke()", ''); 580*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_Keystroke(1, 2)", ''); 581*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("12:03", "AFTime_Keystroke(65)", "12:03"); 582*3ac0a46fSAndroid Build Coastguard Worker 583*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 584*3ac0a46fSAndroid Build Coastguard Worker 585*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_KeystrokeEx()"); 586*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFTime_KeystrokeEx(1, 2)"); 587*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("12:04", "AFTime_KeystrokeEx('blooey')", "12:04"); 588*3ac0a46fSAndroid Build Coastguard Worker 589*3ac0a46fSAndroid Build Coastguard Worker app.alert("*** ending test 1 ***"); 590*3ac0a46fSAndroid Build Coastguard Worker } catch (e) { 591*3ac0a46fSAndroid Build Coastguard Worker app.alert("Truly unexpected error occured: " + e); 592*3ac0a46fSAndroid Build Coastguard Worker } 593*3ac0a46fSAndroid Build Coastguard Worker ) 594*3ac0a46fSAndroid Build Coastguard Worker>> 595*3ac0a46fSAndroid Build Coastguard Workerendobj 596*3ac0a46fSAndroid Build Coastguard Worker{{object 18 0}} << 597*3ac0a46fSAndroid Build Coastguard Worker /S /JavaScript 598*3ac0a46fSAndroid Build Coastguard Worker /JS ( 599*3ac0a46fSAndroid Build Coastguard Worker // Re-run tests that depend on the "will commit" status of the event 600*3ac0a46fSAndroid Build Coastguard Worker // that triggered their execution. 601*3ac0a46fSAndroid Build Coastguard Worker try { 602*3ac0a46fSAndroid Build Coastguard Worker app.alert("*** starting test 2 ***"); 603*3ac0a46fSAndroid Build Coastguard Worker 604*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_Keystroke()"); 605*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFDate_Keystroke(1, 2)"); 606*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("04/19", "AFDate_Keystroke(2)", "04/19"); 607*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("04/19/15", "AFDate_Keystroke('blooey')", "04/19/15"); 608*3ac0a46fSAndroid Build Coastguard Worker 609*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 610*3ac0a46fSAndroid Build Coastguard Worker 611*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFNumber_Keystroke()"); 612*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFNumber_Keystroke(1)"); 613*3ac0a46fSAndroid Build Coastguard Worker expectError("abc", "AFNumber_Keystroke(1, 2)"); 614*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("123", "AFNumber_Keystroke(1, 2)", "123"); 615*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("123", "AFNumber_Keystroke(1, 2, 3)", "123"); 616*3ac0a46fSAndroid Build Coastguard Worker 617*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 618*3ac0a46fSAndroid Build Coastguard Worker 619*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFSpecial_KeystrokeEx()", ''); 620*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("12345", "AFSpecial_KeystrokeEx('')", "12345"); // No notification. 621*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("123", "AFSpecial_KeystrokeEx('9999')", "123"); // Notifies invalid. 622*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("12345", "AFSpecial_KeystrokeEx('9999')", "12345"); // Notifies too long. 623*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("abcd", "AFSpecial_KeystrokeEx('9999')", "abcd"); // Notifies invalid. 624*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("1234", "AFSpecial_KeystrokeEx('9999')", "1234"); 625*3ac0a46fSAndroid Build Coastguard Worker expectEventValue("abcd", "AFSpecial_KeystrokeEx('XXXX')", "abcd"); 626*3ac0a46fSAndroid Build Coastguard Worker 627*3ac0a46fSAndroid Build Coastguard Worker app.alert("**********************"); 628*3ac0a46fSAndroid Build Coastguard Worker 629*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFMergeChange()"); 630*3ac0a46fSAndroid Build Coastguard Worker expectError('', "AFMergeChange(1, 2)"); 631*3ac0a46fSAndroid Build Coastguard Worker expect("one", "AFMergeChange(undefined)", "Aone"); 632*3ac0a46fSAndroid Build Coastguard Worker 633*3ac0a46fSAndroid Build Coastguard Worker app.alert("*** ending test 2 ***"); 634*3ac0a46fSAndroid Build Coastguard Worker } catch (e) { 635*3ac0a46fSAndroid Build Coastguard Worker app.alert("Truly unexpected error occured: " + e); 636*3ac0a46fSAndroid Build Coastguard Worker } 637*3ac0a46fSAndroid Build Coastguard Worker ) 638*3ac0a46fSAndroid Build Coastguard Worker>> 639*3ac0a46fSAndroid Build Coastguard Workerendobj 640*3ac0a46fSAndroid Build Coastguard Worker{{object 19 0}} << 641*3ac0a46fSAndroid Build Coastguard Worker /S /JavaScript 642*3ac0a46fSAndroid Build Coastguard Worker /JS ( 643*3ac0a46fSAndroid Build Coastguard Worker app.alert('Unexpected script 19'); 644*3ac0a46fSAndroid Build Coastguard Worker ) 645*3ac0a46fSAndroid Build Coastguard Worker>> 646*3ac0a46fSAndroid Build Coastguard Workerendobj 647*3ac0a46fSAndroid Build Coastguard Worker{{xref}} 648*3ac0a46fSAndroid Build Coastguard Worker{{trailer}} 649*3ac0a46fSAndroid Build Coastguard Worker{{startxref}} 650*3ac0a46fSAndroid Build Coastguard Worker%%EOF 651