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

Unified Diff: chrome/test/data/devtools/animation_frames_page.html

Issue 12310063: Add TestTimelineFrames and TestPageOverlayUpdate tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing new file Created 7 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
Index: chrome/test/data/devtools/animation_frames_page.html
diff --git a/chrome/test/data/devtools/animation_frames_page.html b/chrome/test/data/devtools/animation_frames_page.html
new file mode 100644
index 0000000000000000000000000000000000000000..f924777c147977d814e4f48d3fb7d472ecf46017
--- /dev/null
+++ b/chrome/test/data/devtools/animation_frames_page.html
@@ -0,0 +1,33 @@
+<html>
+<head>
+<script>
+var remainingFrames;
+function runTest()
+{
+ remainingFrames = 5;
+ requestAnimationFrame(onFrame);
+}
+
+var lastOffset = 0;
+function onFrame()
+{
+ var div = document.getElementById("test");
+ lastOffset = (lastOffset + 20) % 200;
yurys 2013/02/25 09:13:48 Inconsistent alignment, also it is 2 spaces in Chr
+ div.style.left = lastOffset + "px";
+ if (--remainingFrames)
+ requestAnimationFrame(onFrame);
+ else
+ done();
+ }
+
+function done()
+{
+ console.timeStamp("ready");
+}
+
+</script>
+</head>
+<body>
+<div id="test" style="position: absolute; width: 20px; height: 20px; background-color: blue;"></div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698