OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <div id="container"></div> | |
3 <script src="../../resources/testharness.js"></script> | |
4 <script src="../../resources/testharnessreport.js"></script> | |
5 <script> | |
6 | |
7 if (window.testRunner) | |
8 testRunner.dumpAsText(); | |
esprehn
2015/04/08 00:17:13
doesn't testharness take care of this?
sadrul
2015/04/08 02:35:03
You are right. Done.
| |
9 | |
10 var test = async_test("This test checks that an element's compositor proxy canno t be mutated after disconnect()."); | |
esprehn
2015/04/08 00:17:13
async_test("...", function() {
});
sadrul
2015/04/08 02:35:03
Done.
| |
11 | |
12 assert_not_equals('undefined', typeof window.internals); | |
13 var worker = new CompositorWorker('resources/proxy-idle.js'); | |
14 worker.onmessage = function() { | |
15 var docLayer = JSON.parse(window.internals.layerTreeAsText(document)); | |
16 assert_equals(1, docLayer.children.length); | |
17 assert_equals(1, docLayer.children[0].children.length); | |
18 | |
19 worker.terminate(); | |
20 | |
21 // Give some time for the worker to terminate. | |
22 window.setTimeout(function() { | |
23 window.GCController.collect(); | |
24 docLayer = JSON.parse(window.internals.layerTreeAsText(document)); | |
25 assert_equals(1, docLayer.children.length); | |
26 assert_equals('undefined', typeof docLayer.children[0].children); | |
27 test.done(); | |
28 }, 400); | |
esprehn
2015/04/08 00:17:13
This is not acceptable, this test is going to take
sadrul
2015/04/08 02:35:03
Removed. I didn't know about waitUntilWorkerThread
| |
29 } | |
30 | |
31 var proxy = new CompositorProxy(document.getElementById('container'), ['opacity' ]); | |
32 worker.postMessage(proxy); | |
33 | |
34 var container = document.getElementById('container'); | |
35 var docLayer = JSON.parse(window.internals.layerTreeAsText(document)); | |
36 assert_equals(1, docLayer.children.length); | |
37 assert_equals(1, docLayer.children[0].children.length); | |
38 proxy.disconnect(); | |
39 | |
40 </script> | |
OLD | NEW |