Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/WebKit/LayoutTests/fast/compositorworker/compositor-proxy-disconnect-worker-terminate.html

Issue 1494483002: Revert of compositor-worker: Refactor CompositorWorkerManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/compositorworker/compositor-proxy-disconnect-worker-terminate.html
diff --git a/third_party/WebKit/LayoutTests/fast/compositorworker/compositor-proxy-disconnect-worker-terminate.html b/third_party/WebKit/LayoutTests/fast/compositorworker/compositor-proxy-disconnect-worker-terminate.html
new file mode 100644
index 0000000000000000000000000000000000000000..31a1a37ae61926db015b8ecefa9cc4d9016a5770
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/compositorworker/compositor-proxy-disconnect-worker-terminate.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<div id="container"></div>
+<script src="../../fast/workers/resources/worker-util.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+
+var test = async_test(function() {
+ assert_not_equals('undefined', typeof window.internals);
+ var worker = new CompositorWorker('resources/proxy-idle.js');
+ worker.onmessage = function() {
+ var docLayer = JSON.parse(window.internals.layerTreeAsText(document));
+ assert_equals(1, docLayer.children.length);
+ assert_equals(1, docLayer.children[0].children.length);
+
+ worker.terminate();
+
+ // Give some time for the worker to terminate.
+ waitUntilWorkerThreadsExit(function() {
+ docLayer = JSON.parse(window.internals.layerTreeAsText(document));
+ assert_equals(1, docLayer.children.length);
+ assert_equals('undefined', typeof docLayer.children[0].children);
+ test.done();
+ });
+ }
+
+ var proxy = new CompositorProxy(document.getElementById('container'), ['opacity']);
+ worker.postMessage(proxy);
+
+ var container = document.getElementById('container');
+ var docLayer = JSON.parse(window.internals.layerTreeAsText(document));
+ assert_equals(1, docLayer.children.length);
+ assert_equals(1, docLayer.children[0].children.length);
+ proxy.disconnect();
+}, "This test checks that an element's compositor proxy cannot be mutated after disconnect().");
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698