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

Unified Diff: LayoutTests/fast/workers/resources/teleport.js

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 2 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 | « LayoutTests/fast/workers/resources/snap-points.js ('k') | LayoutTests/fast/workers/scroll.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/workers/resources/teleport.js
diff --git a/LayoutTests/fast/workers/resources/teleport.js b/LayoutTests/fast/workers/resources/teleport.js
new file mode 100644
index 0000000000000000000000000000000000000000..164e597a52d44ddf297df6f798daa0f2f4a91ba5
--- /dev/null
+++ b/LayoutTests/fast/workers/resources/teleport.js
@@ -0,0 +1,21 @@
+(function(scope) {
+ 'use strict';
+
+ var token = null;
+
+ // An extremely cheesy animation.
+ function tick(context) {
+ var seconds = context.timestamp / 1000.0;
+ var matrix = context.getMatrix(token);
+ matrix.m14 = 200.0 + 100 * Math.sin(seconds);
+ context.setMatrix(token, matrix);
+ scope.teleportMessage(context, tick);
+ }
+
+ scope.onmessage = function(e) {
+ token = e.data;
+ var context = new TeleportContext([token]);
+ scope.teleportMessage(context, tick);
+ };
+
+})(self);
« no previous file with comments | « LayoutTests/fast/workers/resources/snap-points.js ('k') | LayoutTests/fast/workers/scroll.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698