OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <div id='container'></div> | 2 <div id='container'></div> |
3 <script src="../../resources/testharness.js"></script> | 3 <script src="../../../../resources/testharness.js"></script> |
4 <script src="../../resources/testharnessreport.js"></script> | 4 <script src="../../../../resources/testharnessreport.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 var test = async_test("This test checks that an element's compositor proxy can b
e sent from the main thread to the compositor thread."); | 7 var test = async_test("This test checks that an element's compositor proxy can b
e sent from the main thread to the compositor thread."); |
8 | 8 |
9 var lastAttribute = ''; | 9 var lastAttribute = ''; |
10 function checkResponse(opacity, transform) { | 10 function checkResponse(opacity, transform) { |
11 assert_true(opacity || transform); | 11 assert_true(opacity || transform); |
12 assert_not_equals(opacity, transform); | 12 assert_not_equals(opacity, transform); |
13 var currentAttribute = opacity ? 'opacity' : 'transform'; | 13 var currentAttribute = opacity ? 'opacity' : 'transform'; |
14 if (lastAttribute == '') { | 14 if (lastAttribute == '') { |
(...skipping 22 matching lines...) Expand all Loading... |
37 var second = new CompositorWorker('resources/proxy-echo.js'); | 37 var second = new CompositorWorker('resources/proxy-echo.js'); |
38 second.onmessage = processMessage; | 38 second.onmessage = processMessage; |
39 proxy = new CompositorProxy(document.getElementById('container'), ['transform'])
; | 39 proxy = new CompositorProxy(document.getElementById('container'), ['transform'])
; |
40 assert_true(proxy.supports('transform')); | 40 assert_true(proxy.supports('transform')); |
41 assert_false(proxy.supports('opacity')); | 41 assert_false(proxy.supports('opacity')); |
42 assert_false(proxy.supports('touch')); | 42 assert_false(proxy.supports('touch')); |
43 assert_false(proxy.supports('scrollTop')); | 43 assert_false(proxy.supports('scrollTop')); |
44 second.postMessage(proxy); | 44 second.postMessage(proxy); |
45 | 45 |
46 </script> | 46 </script> |
OLD | NEW |