tor-browser

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

test_transform-non-normalizable-rotate3d.html (1109B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <script src='/resources/testharness.js'></script>
      4 <script src='/resources/testharnessreport.js'></script>
      5 <script src='../testcommon.js'></script>
      6 <div id='log'></div>
      7 <script type='text/javascript'>
      8 'use strict';
      9 
     10 test(function(t) {
     11  var target = addDiv(t);
     12  target.style.transform = 'rotate3d(0, 0, 1, 90deg)';
     13  target.style.transition = 'all 10s linear -5s';
     14  getComputedStyle(target).transform;
     15 
     16  target.style.transform = 'rotate3d(0, 0, 0, 270deg)';
     17  var interpolated_matrix = 'matrix(' + Math.cos(Math.PI / 4) + ',' +
     18                                        Math.sin(Math.PI / 4) + ',' +
     19                                       -Math.sin(Math.PI / 4) + ',' +
     20                                        Math.cos(Math.PI / 4) + ',' +
     21                                        '0, 0)';
     22  assert_matrix_equals(getComputedStyle(target).transform, interpolated_matrix,
     23                       'transition from a normal rotate3d to a ' +
     24                       'non-normalizable rotate3d');
     25 }, 'Test interpolation on non-normalizable rotate3d function');
     26 
     27 </script>
     28 </html>