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

Side by Side Diff: third_party/WebKit/LayoutTests/csspaint/resources/test-runner-paint-worklet.js

Issue 2868003002: CSSPaint: Move layout tests in csspaint/ to http/tests/csspaint/ (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Given a piece of 'code', runs it in the worklet, then once loaded waits for
2 // layout and paint, before finishing the test.
3 //
4 // Usage:
5 // importPaintWorkletAndTerminateTestAfterAsyncPaint('/* worklet code goes her e. */');
6
7 function importPaintWorkletAndTerminateTestAfterAsyncPaint(code) {
8 if (window.testRunner) {
9 testRunner.waitUntilDone();
10 }
11
12 var blob = new Blob([code], {type: 'text/javascript'});
13 paintWorklet.addModule(URL.createObjectURL(blob)).then(function() {
14 runAfterLayoutAndPaint(function() {
15 if (window.testRunner) {
16 testRunner.notifyDone();
17 }
18 });
19 });
20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698