mediawiki-extensions-Popups/tests
Sam Smith d4caff9774 rest: Don't scale unscalable thumbnails
If the image isn't an SVG then it shouldn't be scaled past its original
dimensions. Handle the case where the requested thumbnail can't be
generated on the server as the original is too small ( < 320px,
currently [0]) in the same way.

Moreover, if the image happens to have the exact dimensions that we're
requesting (300px or 600px wide, currently [1]), then use the original
image to avoid unnecessary work/pressure on caches.

Supporting changes:
* Update the SVG_RESTBASE_RESPONSE fixture to use the extension returned
  by RESTBase (and the PageImages extension) for the thumbnail:
  .svg.png.

[0] https://github.com/wikimedia/restbase/blob/master/v1/summary.yaml#L121
[1] https://github.com/wikimedia/mediawiki-extensions-Popups/blob/master/src/constants.js#L2

Bug: T156800
Change-Id: I5d0aa161e80869e4b4f5425d906d1e753047a3a3
2017-03-08 18:44:23 +01:00
..
browser Tag previews acceptance tests with @integration 2016-12-13 14:47:32 +00:00
node-qunit rest: Don't scale unscalable thumbnails 2017-03-08 18:44:23 +01:00
phpunit Hygiene: Remove stubs files from browser qunit tests 2017-03-06 17:09:15 +01:00
qunit/ext.popups Hygiene: Remove stubs files from browser qunit tests 2017-03-06 17:09:15 +01:00
.jscsrc.js Update linting and enable command line QUnit 2016-11-08 13:56:17 -05:00