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

Unified Diff: LayoutTests/fast/repaint/resources/ensure-no-repaints.js

Issue 1246173002: Throttle rendering pipeline for invisible iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add layout tests. Created 5 years, 3 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: LayoutTests/fast/repaint/resources/ensure-no-repaints.js
diff --git a/LayoutTests/fast/repaint/resources/ensure-no-repaints.js b/LayoutTests/fast/repaint/resources/ensure-no-repaints.js
new file mode 100644
index 0000000000000000000000000000000000000000..30ce26c70fb4db79e7c87704be8898fddc7c4f46
--- /dev/null
+++ b/LayoutTests/fast/repaint/resources/ensure-no-repaints.js
@@ -0,0 +1,17 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+window.testIsAsync = true;
+
+// Spin for a few frames looking for repaints. We shouldn't see any.
+var frameCount = 10;
esprehn 2015/09/21 21:27:20 This is racy, we don't want to do this. Can you wr
Sami 2015/09/23 18:31:06 Neat, I did't know those were a thing. Done.
+function repaintTest()
+{
+ if (--frameCount)
+ window.requestAnimationFrame(repaintTest);
+ else
+ finishRepaintTest();
+}
+
+window.addEventListener('load', runRepaintTest);

Powered by Google App Engine
This is Rietveld 408576698