From 2c457887402151cfde8ac4842af0c2248eb840a9 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Thu, 7 Jun 2018 20:36:23 +0000 Subject: Convert resolve_nodes.pdf into 3 test cases There are 3 elements in the PDF that can be interacted with that cause testable output. This CL creates test cases for each of these elements. 2 of them work correctly, and a new bug, pdfium:1106, has been filed for the third. BUG=pdfium:1020 Change-Id: I524911d03927a0eeeee1d1479e1a855f90269e8e Reviewed-on: https://pdfium-review.googlesource.com/34370 Reviewed-by: Henrique Nakashima Commit-Queue: Ryan Harrison --- testing/SUPPRESSIONS | 7 +++++-- .../javascript/xfa_specific/resolve_nodes_1.evt | 3 +++ .../javascript/xfa_specific/resolve_nodes_1.pdf | Bin 0 -> 213700 bytes .../xfa_specific/resolve_nodes_1_expected.txt | 1 + .../javascript/xfa_specific/resolve_nodes_2.evt | 3 +++ .../javascript/xfa_specific/resolve_nodes_2.pdf | Bin 0 -> 213700 bytes .../xfa_specific/resolve_nodes_2_expected.txt | 1 + testing/resources/pixel/xfa_specific/resolve_nodes.pdf | Bin 213700 -> 0 bytes .../resources/pixel/xfa_specific/resolve_nodes_0.evt | 3 +++ .../resources/pixel/xfa_specific/resolve_nodes_0.pdf | Bin 0 -> 213700 bytes .../xfa_specific/resolve_nodes_0_expected.pdf.0.png | Bin 0 -> 75004 bytes 11 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 testing/resources/javascript/xfa_specific/resolve_nodes_1.evt create mode 100644 testing/resources/javascript/xfa_specific/resolve_nodes_1.pdf create mode 100644 testing/resources/javascript/xfa_specific/resolve_nodes_1_expected.txt create mode 100644 testing/resources/javascript/xfa_specific/resolve_nodes_2.evt create mode 100644 testing/resources/javascript/xfa_specific/resolve_nodes_2.pdf create mode 100644 testing/resources/javascript/xfa_specific/resolve_nodes_2_expected.txt delete mode 100644 testing/resources/pixel/xfa_specific/resolve_nodes.pdf create mode 100644 testing/resources/pixel/xfa_specific/resolve_nodes_0.evt create mode 100644 testing/resources/pixel/xfa_specific/resolve_nodes_0.pdf create mode 100644 testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS index 7e4b507d9f..1f22c4c4b5 100644 --- a/testing/SUPPRESSIONS +++ b/testing/SUPPRESSIONS @@ -316,17 +316,20 @@ bug_679642.in * * noxfa bug_679643.in * * noxfa bug_735912.in * * noxfa +# xfa_specific + +TODO(dsinclair): Remove after pdfium:1106 is fixed +resolve_nodes_1.pdf * * * + # # Pixel tests # bug_492.in * nov8 * -# # xfa_specific # TODO(rharrison): Create expectations for existing files. dynamic_list_box_allow_multiple_selection.pdf * * * -resolve_nodes.pdf * * * standard_symbols.pdf * * * # TODO(rharrison): Remove after pdfium:1095 is fixed xfa_example.in win * * diff --git a/testing/resources/javascript/xfa_specific/resolve_nodes_1.evt b/testing/resources/javascript/xfa_specific/resolve_nodes_1.evt new file mode 100644 index 0000000000..baef0b419f --- /dev/null +++ b/testing/resources/javascript/xfa_specific/resolve_nodes_1.evt @@ -0,0 +1,3 @@ +mousedown,left,400,30 +mouseup,left,400,30 + diff --git a/testing/resources/javascript/xfa_specific/resolve_nodes_1.pdf b/testing/resources/javascript/xfa_specific/resolve_nodes_1.pdf new file mode 100644 index 0000000000..9694f7fe50 Binary files /dev/null and b/testing/resources/javascript/xfa_specific/resolve_nodes_1.pdf differ diff --git a/testing/resources/javascript/xfa_specific/resolve_nodes_1_expected.txt b/testing/resources/javascript/xfa_specific/resolve_nodes_1_expected.txt new file mode 100644 index 0000000000..d4cc4424d3 --- /dev/null +++ b/testing/resources/javascript/xfa_specific/resolve_nodes_1_expected.txt @@ -0,0 +1 @@ +: \Find 1 items diff --git a/testing/resources/javascript/xfa_specific/resolve_nodes_2.evt b/testing/resources/javascript/xfa_specific/resolve_nodes_2.evt new file mode 100644 index 0000000000..906fdcd905 --- /dev/null +++ b/testing/resources/javascript/xfa_specific/resolve_nodes_2.evt @@ -0,0 +1,3 @@ +mousedown,left,43,94 +mouseup,left,43,94 + diff --git a/testing/resources/javascript/xfa_specific/resolve_nodes_2.pdf b/testing/resources/javascript/xfa_specific/resolve_nodes_2.pdf new file mode 100644 index 0000000000..9694f7fe50 Binary files /dev/null and b/testing/resources/javascript/xfa_specific/resolve_nodes_2.pdf differ diff --git a/testing/resources/javascript/xfa_specific/resolve_nodes_2_expected.txt b/testing/resources/javascript/xfa_specific/resolve_nodes_2_expected.txt new file mode 100644 index 0000000000..251a6ef43f --- /dev/null +++ b/testing/resources/javascript/xfa_specific/resolve_nodes_2_expected.txt @@ -0,0 +1 @@ +: field diff --git a/testing/resources/pixel/xfa_specific/resolve_nodes.pdf b/testing/resources/pixel/xfa_specific/resolve_nodes.pdf deleted file mode 100644 index 9694f7fe50..0000000000 Binary files a/testing/resources/pixel/xfa_specific/resolve_nodes.pdf and /dev/null differ diff --git a/testing/resources/pixel/xfa_specific/resolve_nodes_0.evt b/testing/resources/pixel/xfa_specific/resolve_nodes_0.evt new file mode 100644 index 0000000000..e8518ab82c --- /dev/null +++ b/testing/resources/pixel/xfa_specific/resolve_nodes_0.evt @@ -0,0 +1,3 @@ +mousedown,left,550,30 +mouseup,left,550,30 + diff --git a/testing/resources/pixel/xfa_specific/resolve_nodes_0.pdf b/testing/resources/pixel/xfa_specific/resolve_nodes_0.pdf new file mode 100644 index 0000000000..9694f7fe50 Binary files /dev/null and b/testing/resources/pixel/xfa_specific/resolve_nodes_0.pdf differ diff --git a/testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png b/testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png new file mode 100644 index 0000000000..d7f1de629e Binary files /dev/null and b/testing/resources/pixel/xfa_specific/resolve_nodes_0_expected.pdf.0.png differ -- cgit v1.2.3