| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../resources/run-after-layout-and-paint.js"></script> | 4 <script src="../resources/run-after-layout-and-paint.js"></script> |
| 5 <style> | 5 <style> |
| 6 #output { | 6 #output { |
| 7 width: 100px; | 7 width: 100px; |
| 8 height: 100px; | 8 height: 100px; |
| 9 background-color: red; | 9 background-color: red; |
| 10 } | 10 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 <script> | 25 <script> |
| 26 if (window.testRunner) { | 26 if (window.testRunner) { |
| 27 testRunner.waitUntilDone(); | 27 testRunner.waitUntilDone(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 var el = document.getElementById('output'); | 30 var el = document.getElementById('output'); |
| 31 el.style.backgroundImage = 'paint(green)'; | 31 el.style.backgroundImage = 'paint(green)'; |
| 32 | 32 |
| 33 var blob = new Blob([document.getElementById('code').textContent]); | 33 var blob = new Blob([document.getElementById('code').textContent]); |
| 34 paintWorklet.import(URL.createObjectURL(blob)).then(function() { | 34 paintWorklet.addModule(URL.createObjectURL(blob)).then(function() { |
| 35 runAfterLayoutAndPaint(function() { | 35 runAfterLayoutAndPaint(function() { |
| 36 if (window.testRunner) { | 36 if (window.testRunner) { |
| 37 testRunner.notifyDone(); | 37 testRunner.notifyDone(); |
| 38 } | 38 } |
| 39 }); | 39 }); |
| 40 }); | 40 }); |
| 41 </script> | 41 </script> |
| 42 </body> | 42 </body> |
| 43 </html> | 43 </html> |
| OLD | NEW |