diff options
author | FiveFilters.org <[email protected]> | 2021-08-25 13:39:55 +0200 |
---|---|---|
committer | FiveFilters.org <[email protected]> | 2021-08-25 13:39:55 +0200 |
commit | 4c42348ab2e316af537dc9ba85005ee8a9baebf5 (patch) | |
tree | 48ca7b816d2466a6b35dce611cde6b98ac3a933e /test/test-pages/metadata-content-missing | |
parent | c4a6cf576b6e9870d64d833816f93c45dd36d090 (diff) |
Fix headers being removed
https://github.com/mozilla/readability/commit/11093f011f57fa528a00a78d70b8d9df32c7a32d
Diffstat (limited to 'test/test-pages/metadata-content-missing')
4 files changed, 61 insertions, 0 deletions
diff --git a/test/test-pages/metadata-content-missing/expected-images.json b/test/test-pages/metadata-content-missing/expected-images.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/test/test-pages/metadata-content-missing/expected-images.json @@ -0,0 +1 @@ +[]
\ No newline at end of file diff --git a/test/test-pages/metadata-content-missing/expected-metadata.json b/test/test-pages/metadata-content-missing/expected-metadata.json new file mode 100644 index 0000000..ed10c30 --- /dev/null +++ b/test/test-pages/metadata-content-missing/expected-metadata.json @@ -0,0 +1,8 @@ +{ + "Author": "Creator Name", + "Direction": null, + "Excerpt": "Preferred description", + "Image": null, + "Title": "My title", + "SiteName": null +}
\ No newline at end of file diff --git a/test/test-pages/metadata-content-missing/expected.html b/test/test-pages/metadata-content-missing/expected.html new file mode 100644 index 0000000..b282bdd --- /dev/null +++ b/test/test-pages/metadata-content-missing/expected.html @@ -0,0 +1,19 @@ +<article> + <h2>Test document title</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + </p> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + </p> + </article>
\ No newline at end of file diff --git a/test/test-pages/metadata-content-missing/source.html b/test/test-pages/metadata-content-missing/source.html new file mode 100644 index 0000000..1e5c1ad --- /dev/null +++ b/test/test-pages/metadata-content-missing/source.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Title Element</title> + <meta property="x:title dc:title" content="My title"/> + <meta property="dc:creator twitter:site_name" content="Creator Name"/> + <meta name="author" content="FAIL"/> + <meta property="og:description twitter:description"/> + <meta property="dc:description og:description" content="Preferred description"/> + </head> + <body> + <article> + <h1>Test document title</h1> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + </p> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + </p> + </article> + </body> +</html> |