Better tests for CJS_Field properties. Fixes some longstanding issues - Make x,y coordinates used in test have unique values from each other. - run text widget tests on text widget, not its parent. - run subset of these tests on the parent itself. - provide some text values for the text widget. - fix test helpers to compare distinct arrays/objects for "sameness". - update an error message to indicate the problem is with caller argument, not the object bound across the fxjs interface. Change-Id: I60834021b64eb275d3ec36bcdea7f71fc11d18ab Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/63390 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/testing/resources/javascript/field.fragment b/testing/resources/javascript/field.fragment index 1dbcb0b..d366361 100644 --- a/testing/resources/javascript/field.fragment +++ b/testing/resources/javascript/field.fragment
@@ -8,9 +8,7 @@ {{object 2 0}} << /Type /Pages /Count 1 - /Kids [ - 3 0 R - ] + /Kids [3 0 R] >> endobj % Page number 0. @@ -39,7 +37,7 @@ /T (MyField) /Type /Annot /Subtype /Widget - /Rect [100 100 400 400] + /Rect [100 101 400 401] /Kids [ 6 0 R 7 0 R @@ -56,7 +54,9 @@ /T (MyText) /Type /Annot /Subtype /Widget - /Rect [200 200 220 220] + /Rect [200 201 220 221] + /V (bleen) + /DV (grue) >> endobj {{object 7 0}} << @@ -66,7 +66,7 @@ /T (MyPushButton) /Type /Annot /Subtype /Widget - /Rect [220 220 240 240] + /Rect [220 221 240 241] >> endobj {{object 8 0}} << @@ -76,7 +76,7 @@ /T (MyRadio) /Type /Annot /Subtype /Widget - /Rect [240 240 260 260] + /Rect [240 241 260 261] >> endobj {{object 9 0}} << @@ -86,7 +86,7 @@ /T (MyCheckBox) /Type /Annot /Subtype /Widget - /Rect [260 260 280 280] + /Rect [260 261 280 281] >> endobj {{object 10 0}} << @@ -96,7 +96,7 @@ /T (MyMultiSelect) /Type /Annot /Subtype /Widget - /Rect [ 280 280 300 300 ] + /Rect [ 280 281 300 301 ] /Opt [ (foo) (bar) (qux) ] /V (qux) >> @@ -108,7 +108,7 @@ /T (MySingleSelect) /Type /Annot /Subtype /Widget - /Rect [ 300 300 320 320 ] + /Rect [ 300 301 320 321 ] /Opt [ [ (foo) (Foo) ] [ (bar) (Bar) ] @@ -116,7 +116,6 @@ ] >> endobj - % OpenAction action {{object 15 0}} << /Type /Action