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

Unified Diff: LayoutTests/paint/invalidation/spv2/text-match-highlight.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/text-match-highlight.html
diff --git a/LayoutTests/compositing/overflow/text-match-highlight.html b/LayoutTests/paint/invalidation/spv2/text-match-highlight.html
similarity index 71%
copy from LayoutTests/compositing/overflow/text-match-highlight.html
copy to LayoutTests/paint/invalidation/spv2/text-match-highlight.html
index 29f0db0004ebafe24f5d3964e11e6d7440389d51..f3427816b21a04b5c845db0ea6fd54b709a0ac2e 100644
--- a/LayoutTests/compositing/overflow/text-match-highlight.html
+++ b/LayoutTests/paint/invalidation/spv2/text-match-highlight.html
@@ -1,6 +1,10 @@
+<!-- Based on compositing/overflow/text-match-highlight.html -->
<!DOCTYPE HTML>
-<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
+<script src="resources/paint-invalidation-test.js"></script>
<script>
+if (window.testRunner)
+ testRunner.dumpAsTextWithPixelResults();
+
function highlightRange(id, start, end, active) {
var range = document.createRange();
var elem = document.getElementById(id).firstChild;
@@ -8,7 +12,25 @@ function highlightRange(id, start, end, active) {
range.setEnd(elem, end);
internals.addTextMatchMarker(range, active);
}
-function repaintTest() {
+window.expectedPaintInvalidationObjects = [
+ "LayoutText #text",
+ "InlineTextBox 'findme'",
+ "LayoutText #text",
+ "InlineTextBox 'findme'",
+ "LayoutText #text",
+ "InlineTextBox 'findme'",
+ "LayoutText #text",
+ "InlineTextBox 'findme'",
+ "LayoutText #text",
+ "InlineTextBox 'findme'",
+ "LayoutSVGInlineText #text",
+ "InlineTextBox 'Can you findme in this boring text?'",
+ "LayoutSVGInlineText #text",
+ "InlineTextBox 'Findme in a typewriter!'",
+ "LayoutSVGInlineText #text",
+ "InlineTextBox 'Findme on a path! Did you findme?'",
+];
+function paintInvalidationTest() {
highlightRange('1', 0, 6, false);
highlightRange('2', 0, 6, false);
highlightRange('3', 0, 6, false);
@@ -21,7 +43,7 @@ function repaintTest() {
internals.setMarkedTextMatchesAreHighlighted(document, true);
}
if (window.internals)
- onload = runRepaintTest;
+ onload = runPaintInvalidationTest;
</script>
<style>
body { margin: 0 }

Powered by Google App Engine
This is Rietveld 408576698