Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 // testRunnerSimplePaintWorklet('/* worklet code goes here. */'); | |
| 6 | |
| 7 function testRunnerSimplePaintWorklet(code) { | |
| 8 if (window.testRunner) { | |
| 9 testRunner.waitUntilDone(); | |
| 10 } | |
| 11 | |
| 12 var blob = new Blob([code]); | |
| 13 paintWorklet.import(URL.createObjectURL(blob)).then(function() { | |
| 14 runAfterLayoutAndPaint(function() { | |
| 15 if (window.testRunner) { | |
| 16 testRunner.notifyDone(); | |
|
Justin Novosad
2016/04/06 15:52:45
I am a bit concerned about this call to notifyDone
ikilpatrick
2016/04/07 23:03:00
I couldn't think of a shorter name :) done.
| |
| 17 } | |
| 18 }); | |
| 19 }); | |
| 20 } | |
| OLD | NEW |