tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

image-decoder-image-orientation-none.https.html (3545B)


      1 <!DOCTYPE html>
      2 <title>Test ImageDecoder outputs to a image-orientation: none canvas.</title>
      3 <canvas style="image-orientation: none"></canvas>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/webcodecs/image-decoder-utils.js"></script>
      7 <script>
      8 promise_test(t => {
      9  return testFourColorDecodeWithExifOrientation(
     10      1, document.querySelector('canvas'));
     11 }, 'Test JPEG w/ EXIF orientation top-left on canvas w/o orientation');
     12 
     13 promise_test(t => {
     14  return testFourColorDecodeWithExifOrientation(
     15      2, document.querySelector('canvas'));
     16 }, 'Test JPEG w/ EXIF orientation top-right on canvas w/o orientation.');
     17 
     18 promise_test(t => {
     19  return testFourColorDecodeWithExifOrientation(
     20      3, document.querySelector('canvas'));
     21 }, 'Test JPEG w/ EXIF orientation bottom-right on canvas w/o orientation.');
     22 
     23 promise_test(t => {
     24  return testFourColorDecodeWithExifOrientation(
     25      4, document.querySelector('canvas'));
     26 }, 'Test JPEG w/ EXIF orientation bottom-left on canvas w/o orientation.');
     27 
     28 promise_test(t => {
     29  return testFourColorDecodeWithExifOrientation(
     30      5, document.querySelector('canvas'));
     31 }, 'Test JPEG w/ EXIF orientation left-top on canvas w/o orientation.');
     32 
     33 promise_test(t => {
     34  return testFourColorDecodeWithExifOrientation(
     35      6, document.querySelector('canvas'));
     36 }, 'Test JPEG w/ EXIF orientation right-top on canvas w/o orientation.');
     37 
     38 promise_test(t => {
     39  return testFourColorDecodeWithExifOrientation(
     40      7, document.querySelector('canvas'));
     41 }, 'Test JPEG w/ EXIF orientation right-bottom on canvas w/o orientation.');
     42 
     43 promise_test(t => {
     44  return testFourColorDecodeWithExifOrientation(
     45      8, document.querySelector('canvas'));
     46 }, 'Test JPEG w/ EXIF orientation left-bottom on canvas w/o orientation.');
     47 
     48 // YUV tests
     49 promise_test(t => {
     50  return testFourColorDecodeWithExifOrientation(
     51      1, document.querySelector('canvas'), /*useYuv=*/true);
     52 }, 'Test 4:2:0 JPEG w/ EXIF orientation top-left on canvas w/o orientation');
     53 
     54 promise_test(t => {
     55  return testFourColorDecodeWithExifOrientation(
     56      2, document.querySelector('canvas'), /*useYuv=*/true);
     57 }, 'Test 4:2:0 JPEG w/ EXIF orientation top-right on canvas w/o orientation.');
     58 
     59 promise_test(t => {
     60  return testFourColorDecodeWithExifOrientation(
     61      3, document.querySelector('canvas'), /*useYuv=*/true);
     62 }, 'Test 4:2:0 JPEG w/ EXIF orientation bottom-right on canvas w/o orientation.');
     63 
     64 promise_test(t => {
     65  return testFourColorDecodeWithExifOrientation(
     66      4, document.querySelector('canvas'), /*useYuv=*/true);
     67 }, 'Test 4:2:0 JPEG w/ EXIF orientation bottom-left on canvas w/o orientation.');
     68 
     69 promise_test(t => {
     70  return testFourColorDecodeWithExifOrientation(
     71      5, document.querySelector('canvas'), /*useYuv=*/true);
     72 }, 'Test 4:2:0 JPEG w/ EXIF orientation left-top on canvas w/o orientation.');
     73 
     74 promise_test(t => {
     75  return testFourColorDecodeWithExifOrientation(
     76      6, document.querySelector('canvas'), /*useYuv=*/true);
     77 }, 'Test 4:2:0 JPEG w/ EXIF orientation right-top on canvas w/o orientation.');
     78 
     79 promise_test(t => {
     80  return testFourColorDecodeWithExifOrientation(
     81      7, document.querySelector('canvas'), /*useYuv=*/true);
     82 }, 'Test 4:2:0 JPEG w/ EXIF orientation right-bottom on canvas w/o orientation.');
     83 
     84 promise_test(t => {
     85  return testFourColorDecodeWithExifOrientation(
     86      8, document.querySelector('canvas'), /*useYuv=*/true);
     87 }, 'Test 4:2:0 JPEG w/ EXIF orientation left-bottom on canvas w/o orientation.');
     88 </script>