Chromium Code Reviews| 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); |