| 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);
|
|
|