pdf.js/test
Tim van der Meij b41bca7da9
Don't wait for scripting to be ready in the autoprint integration test
This integration test fails often because we wait for scripting to be
ready before we check the printed page, but most of the time the PDF
is already done printing before scripting is reported to be ready.

This happens because the print trigger is on the `Open` event, which is
one of the first events to be dispatched and, most notably, before
scripting is marked as ready; please see
https://github.com/mozilla/pdf.js/blob/master/web/pdf_scripting_manager.js#L176-L191.
Given that the PDF document is only one page, printing it is usually
finished between triggering the `Open` event and scripting reported
to be ready. If this happens the printed page is already destroyed
before we get to our actual test, which will then timeout because it
will never find the printed page in the DOM.

This commit fixes the problem by not awaiting scripting to be ready
because the fact that the printed page appears is already enough to know
that autoprint was triggered (after all, there is no other user
interaction involved here). While we're here we also switch to the
shorter `page.waitForSelector` function.
2023-09-24 12:48:58 +02:00
..
chromium Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
font [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
images [Editor] Support svg images in the stamp annotation 2023-07-07 15:59:13 +02:00
integration Don't wait for scripting to be ready in the autoprint integration test 2023-09-24 12:48:58 +02:00
pdfs Ignore optional content with missing /Type-entries 2023-09-19 14:11:03 +02:00
resources Enable the declaration-block-no-redundant-longhand-properties Stylelint rule 2023-03-25 10:08:27 +01:00
stats Use more for...of loops in the code-base 2022-07-17 16:18:54 +02:00
ttx Update ttx from version 2.5 to version 3.19.0 2022-07-10 21:18:36 +02:00
types Add support for modern ECMAScript class features 2021-10-22 22:01:17 +02:00
unit Use one noContextMenu function in both the src/- and web/-folders 2023-09-23 15:37:13 +02:00
.eslintrc Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
annotation_layer_builder_overrides.css Take fill-alpha into account with default icons for FileAttachment annotations (issue 16800) 2023-08-08 15:53:48 +02:00
downloadutils.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
driver.js [Annotation] Use the clip-path property when an annotation has some quad points 2023-07-20 10:53:23 +02:00
integration-boot.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
test_manifest.json Ignore optional content with missing /Type-entries 2023-09-19 14:11:03 +02:00
test_slave.html Tighten the vars-argument for the ESLint no-unused-vars rule 2022-12-04 16:15:50 +01:00
test.mjs Use the round CSS function in the setLayerDimensions helper function 2023-08-04 14:33:06 +02:00
testutils.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
text_layer_test.css Introduce some :is usage in the textLayer CSS 2023-04-18 11:39:09 +02:00
webserver.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
xfa_layer_builder_overrides.css XFA - Fix xfaLink class to make links work (bug 1735738) 2021-10-29 11:39:33 -04:00