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

Unified Diff: sky/tests/resources/run-after-display.sky

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/tests/resources/dump-as-text.sky ('k') | sky/tests/styles/border-parsing.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/resources/run-after-display.sky
diff --git a/sky/tests/resources/run-after-display.sky b/sky/tests/resources/run-after-display.sky
index 4411b6cd59630bc1908fe0fe64131d946eaa9541..f46b941b95716729791fe5672b2364e056d28938 100644
--- a/sky/tests/resources/run-after-display.sky
+++ b/sky/tests/resources/run-after-display.sky
@@ -1,11 +1,14 @@
<script>
-module.exports = function(callback) {
- window.requestAnimationFrame(function() {
- // At this point, only the animate has happened, but no compositing
- // or layout. Use a timeout for the callback so that notifyDone
- // can be called inside of it.
- // FIXME: we need a better way of waiting for chromium events to happen
- window.setTimeout(callback);
- });
-};
+import "dart:async";
+import "dart:sky";
+
+void runAfterDisplay(void callback()) {
+ window.requestAnimationFrame((_) {
+ // At this point, only the animate has happened, but no compositing
+ // or layout. Use a timeout for the callback so that notifyDone
+ // can be called inside of it.
+ // FIXME: we need a better way of waiting for chromium events to happen
+ new Timer(Duration.ZERO, callback);
+ });
+}
</script>
« no previous file with comments | « sky/tests/resources/dump-as-text.sky ('k') | sky/tests/styles/border-parsing.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698