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

Unified Diff: LayoutTests/paint/invalidation/spv2/selection-change-in-iframe-with-relative-parent.html

Issue 1302183007: Convert some text-based-repaint tests for spv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/paint/invalidation/spv2/selection-change-in-iframe-with-relative-parent.html
diff --git a/LayoutTests/paint/invalidation/spv2/selection-change-in-iframe-with-relative-parent.html b/LayoutTests/paint/invalidation/spv2/selection-change-in-iframe-with-relative-parent.html
new file mode 100644
index 0000000000000000000000000000000000000000..005519ac8487c5e6e08b8dcc525f8d2b638cbf1c
--- /dev/null
+++ b/LayoutTests/paint/invalidation/spv2/selection-change-in-iframe-with-relative-parent.html
@@ -0,0 +1,51 @@
+<!-- Based on fast/repaint/selection-change-in-iframe-with-relative-parent.html -->
+<!DOCTYPE html>
+<style>
+.container {
+ position: relative;
+ top: 180px;
+}
+</style>
+
+<!--
+ This test checks that the selection in an iframe in a relative positioned container
+ is correctly invalidated.
+ We should be able to manually select all the text. The invalidation rects should
+ be positioned correctly and encompass all the lines.
+-->
+<div class="container">
+ <iframe src="../../../fast/repaint/resources/selection-change-in-iframe-with-relative-parent-iframe.html"></iframe>
+</div>
+
+<script src="resources/paint-invalidation-test.js" type="text/javascript"></script>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsTextWithPixelResults();
+
+window.expectedPaintInvalidationObjects = [
+ "LayoutBlockFlow HTML",
+ "LayoutBlockFlow BODY",
+ "LayoutText #text",
+ "InlineTextBox 'Foo'",
+ "LayoutBR BR",
+ "InlineTextBox '\n'",
+ "LayoutBR BR",
+ "InlineTextBox '\n'",
+ "LayoutText #text",
+ "InlineTextBox 'Bar'",
+ "LayoutBR BR",
+ "InlineTextBox '\n'",
+ "LayoutBR BR",
+ "InlineTextBox '\n'",
+ "LayoutText #text",
+ "InlineTextBox 'Bazz'",
+ "LayoutBR BR",
+ "InlineTextBox '\n'",
+];
+function paintInvalidationTest()
+{
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.contentWindow.getSelection().selectAllChildren(iframe.contentDocument.body);
+}
+window.addEventListener("load", runPaintInvalidationTest, false);
+</script>

Powered by Google App Engine
This is Rietveld 408576698