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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/animation-worklet-tests.js

Issue 2964563002: Removing --disable/enable-threaded-compositing cmdline switches.
Patch Set: Created 3 years, 6 months 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/virtual/threaded/fast/compositorworker/resources/animation-worklet-tests.js
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/animation-worklet-tests.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/animation-worklet-tests.js
deleted file mode 100644
index bfb158990f6502be835dcff43d2b48ef20f0a1d8..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/animation-worklet-tests.js
+++ /dev/null
@@ -1,44 +0,0 @@
-function runInAnimationWorklet(code) {
- return window.animationWorklet.addModule(
- URL.createObjectURL(new Blob([code], {type: 'text/javascript'}))
- );
-}
-
-// Wait for two main thread frames to guarantee that compositor has produced
-// at least one frame.
-function waitTwoAnimationFrames(callback){
- window.requestAnimationFrame( _=> {
- window.requestAnimationFrame( _ => {
- callback();
- })
- });
-};
-
-// Load test cases in worklet context in sequence and wait until they are resolved.
-function runTests(testcases) {
- if (window.testRunner) {
- testRunner.waitUntilDone();
- testRunner.dumpAsText();
- }
-
- const runInSequence = testcases.reduce((chain, testcase) => {
- return chain.then( _ => {
- return runInAnimationWorklet(testcase);
- });
- }, Promise.resolve());
-
- runInSequence.then(_ => {
- // Wait to guarantee that compositor frame is produced before finishing.
- // This ensure we see at least one |animate| call in the animation worklet.
- waitTwoAnimationFrames(_ => {
- if (window.testRunner)
- testRunner.notifyDone();
- });
- });
-}
-
-const testcases = Array.prototype.map.call(document.querySelectorAll('script[type$=worklet]'), ($el) => {
- return $el.textContent;
-});
-
-runTests(testcases);

Powered by Google App Engine
This is Rietveld 408576698