Add pixel test for negative dash scales

Add a pixel test for handling dashes with positive lengths that become
negative with a negative scale (which should probably not be possible).

The test fails with AGG, so suppress it.

Bug: 370299908, 384009729
Change-Id: I5d976ea900dca5f2d4fd53e3d771d3b3e8a6d07e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/127330
Commit-Queue: Andy Phan <andyphan@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index 7c837b1..0d845d3 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -677,6 +677,9 @@
 # TODO(chromium:983289): Remove after associated bug is fixed
 bug_983289.in * * * agg
 
+# TODO(crbug.com/370299908): Remove after associated bug is fixed
+dashed_line_negative_scale.in * * * agg
+
 # TODO(pdfium:1747): Remove after associated bug is fixed
 jpxdecode.in * * * *
 jpxdecode_without_bitspercomponent.in * * * *
diff --git a/testing/resources/pixel/dashed_line_negative_scale.in b/testing/resources/pixel/dashed_line_negative_scale.in
new file mode 100644
index 0000000..0e199bf
--- /dev/null
+++ b/testing/resources/pixel/dashed_line_negative_scale.in
@@ -0,0 +1,34 @@
+{{header}}
+{{object 1 0}} <<
+  /Type /Catalog
+  /Pages 2 0 R
+>>
+endobj
+{{object 2 0}} <<
+  /Type /Pages
+  /MediaBox [0 0 200 200]
+  /Count 1
+  /Kids [3 0 R]
+>>
+endobj
+{{object 3 0}} <<
+  /Type /Page
+  /Parent 2 0 R
+  /Contents 4 0 R
+>>
+endobj
+{{object 4 0}} <<
+  {{streamlen}}
+>>
+stream
+-1 -1 -1 -1 0 0 cm
+[0.1 1] 0 d
+0 0 m
+100 100 l
+S
+endstream
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/dashed_line_negative_scale_expected.pdf.0.png b/testing/resources/pixel/dashed_line_negative_scale_expected.pdf.0.png
new file mode 100644
index 0000000..f97e340
--- /dev/null
+++ b/testing/resources/pixel/dashed_line_negative_scale_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/dashed_line_negative_scale_expected_gdi.pdf.0.png b/testing/resources/pixel/dashed_line_negative_scale_expected_gdi.pdf.0.png
new file mode 100644
index 0000000..c1194a3
--- /dev/null
+++ b/testing/resources/pixel/dashed_line_negative_scale_expected_gdi.pdf.0.png
Binary files differ