1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/test
Tim van der Meij 973b67f047
Fix the "must check that an infinite loop is not triggered" integration test
This integration test fails intermittently, locally at least in Chrome
with Puppeteer 23.4.0+, with the following errors:

```
In chrome: Expected '123Hello' to equal 'Hello123'.
In chrome: Expected '123Hello' to equal '123'.
```

This happens because the test before it left queued sandbox events
behind. We don't close the document between tests, so those get run
when we click the textbox in this test and that interferes with our
selection/typing actions. This commit fixes the issue by flushing the
queued sandbox events in the first test, which makes sure that state
no longer leaks through to the next test and thus improves isolation.

Morever, similar to commit 3adf8b6 we use safer assertions to avoid
further intermittent failures, and we replace the `page.$eval` call
with a simpler Home button push like we already do in e.g. the test
helpers. This combined makes the code shorter and simpler.
2024-11-17 21:23:04 +01:00
..
chromium Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
font Use Python 3.13 in the GitHub workflows 2024-11-12 20:59:01 +01:00
fuzz Migrate to ESLint flat config 2024-11-12 16:15:17 +01:00
images [Editor] Avoid to have a selected stamp annotation on top of the secondary toolbar (bug 1911980) 2024-09-26 17:48:02 +02:00
integration Fix the "must check that an infinite loop is not triggered" integration test 2024-11-17 21:23:04 +01:00
pdfs Apply gradient when stroking text 2024-11-11 15:53:07 +01:00
resources Enable the declaration-block-no-redundant-longhand-properties Stylelint rule 2023-03-25 10:08:27 +01:00
stats Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
types Install and use the most recent Node types for the types tests 2024-11-03 13:40:55 +01:00
unit Merge pull request #19054 from calixteman/issue18630 2024-11-17 18:00:48 +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 Use CSS nesting in the annotationLayer 2023-10-27 18:46:47 +02:00
downloadutils.mjs Modernize the rewriteWebArchiveUrl test helper function 2023-12-17 21:53:50 +01:00
draw_layer_test.css [Editor] Add a way to extract the outlines of a union of rectangles 2023-11-20 18:45:19 +01:00
driver.js Disable ref test 'issue18896' for Chrome because it takes too much time 2024-11-11 18:55:56 +01:00
integration-boot.mjs Don't ignore errors in the Jasmine suite start/end stages 2024-06-23 20:59:48 +02:00
test.mjs Add more optional chaining in the test/ directory 2024-09-22 13:00:57 +02:00
test_manifest.json Merge pull request #19024 from calixteman/disable_test_chrome 2024-11-11 19:11:30 +01:00
test_slave.html [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
testutils.mjs Remove the rimraf dependency in favor of the built-in Node.js fs.rmSync in the test folder 2024-04-14 16:41:59 +02:00
text_layer_test.css Use CSS nesting in the textLayer 2023-10-27 17:38:01 +02:00
webserver.mjs Use the URL global instead of the deprecated url.parse 2024-08-27 18:19:25 +02:00
xfa_layer_builder_overrides.css Remove unnecessary alpha-value from CSS rgb colors 2023-10-06 09:50:03 +02:00