Commit 881f4954 authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Fix flaky selection-partial-invalidation-between-blocks.html layout test.

This patch wanted to confirm changing selection invalidation
between execCommand("selectAll") and Selection.setBaseAndExtent().
However calling execCommand("selectAll") before load is flaky from
the point of invalidation.

This patch arranges the function calls so that invalidation occurs
only on selection difference w/o flakiness.

Bug: 774437
Change-Id: I63efe553282f4a6643c0d7b8eb0b0597b1ccac9f
Reviewed-on: https://chromium-review.googlesource.com/1025594
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553892}
parent 25d9ec2b
......@@ -2985,7 +2985,6 @@ crbug.com/773122 [ Win7 ] fast/text/word-break.html [ Failure Pass ]
crbug.com/773122 [ Win7 ] virtual/gpu/fast/canvas/canvas-lost-gpu-context.html [ Failure Pass ]
# Sheriff failures 2017-10-13
crbug.com/774437 paint/invalidation/selection/selection-partial-invalidation-between-blocks.html [ Pass Failure ]
crbug.com/774463 [ Win7 Debug ] fast/events/autoscroll-should-not-stop-on-keypress.html [ Failure Pass ]
crbug.com/774463 [ Win7 Debug ] virtual/mouseevent_fractional/fast/events/autoscroll-should-not-stop-on-keypress.html [ Failure Pass ]
crbug.com/774688 [ Mac ] fast/spatial-navigation/snav-container-white-space.html [ Pass Failure ]
......
......@@ -3792,8 +3792,6 @@ crbug.com/773122 [ Win7 ] fast/text/word-break.html [ Failure Pass ]
crbug.com/773122 [ Win7 ] virtual/gpu/fast/canvas/canvas-lost-gpu-context.html [ Failure Pass ]
# Sheriff failures 2017-10-13
crbug.com/774437 paint/invalidation/selection/selection-partial-invalidation-between-blocks.html [ Pass Failure ]
crbug.com/774437 virtual/disable-spv175/paint/invalidation/selection/selection-partial-invalidation-between-blocks.html [ Skip ]
crbug.com/774463 [ Win7 Debug ] fast/events/autoscroll-should-not-stop-on-keypress.html [ Failure Pass ]
crbug.com/774463 [ Win7 Debug ] virtual/mouseevent_fractional/fast/events/autoscroll-should-not-stop-on-keypress.html [ Failure Pass ]
crbug.com/774688 [ Mac ] fast/spatial-navigation/snav-container-white-space.html [ Pass Failure ]
......
......@@ -14,13 +14,15 @@ window.testIsAsync = true;
if (window.testRunner)
testRunner.waitUntilDone();
document.execCommand("selectAll");
function repaintTest() {
var selection = window.getSelection();
var firstCell = document.getElementById("firstCell");
selection.setBaseAndExtent(firstCell, 0, firstCell, 1);
finishRepaintTest();
}
runAfterLayoutAndPaint(runRepaintAndPixelTest);
onload = () => {
document.execCommand("selectAll");
runAfterLayoutAndPaint(runRepaintAndPixelTest);
};
</script>
......@@ -18,12 +18,12 @@
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutText #text",
"rect": [11, 35, 73, 19],
"object": "InlineTextBox 'Second cell'",
"rect": [11, 35, 74, 19],
"reason": "selection"
},
{
"object": "LayoutText #text",
"object": "InlineTextBox 'First cell'",
"rect": [11, 11, 58, 19],
"reason": "geometry"
}
......@@ -31,22 +31,6 @@
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow HTML",
"reason": "selection"
},
{
"object": "LayoutBlockFlow BODY",
"reason": "selection"
},
{
"object": "LayoutTable TABLE",
"reason": "selection"
},
{
"object": "LayoutTableCell TD id='firstCell'",
"reason": "selection"
},
{
"object": "LayoutText #text",
"reason": "geometry"
......@@ -55,10 +39,6 @@
"object": "InlineTextBox 'First cell'",
"reason": "geometry"
},
{
"object": "LayoutTableCell TD id='secondCell'",
"reason": "selection"
},
{
"object": "LayoutText #text",
"reason": "selection"
......
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"drawsContent": false,
"backgroundColor": "#FFFFFF"
},
{
"name": "Scrolling Layer",
"bounds": [800, 600],
"drawsContent": false
},
{
"name": "Scrolling Contents Layer",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutText #text",
"rect": [11, 35, 73, 19],
"reason": "selection"
},
{
"object": "LayoutText #text",
"rect": [11, 11, 58, 19],
"reason": "geometry"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutText #text",
"reason": "geometry"
},
{
"object": "InlineTextBox 'First cell'",
"reason": "geometry"
},
{
"object": "LayoutText #text",
"reason": "selection"
},
{
"object": "InlineTextBox 'Second cell'",
"reason": "selection"
}
]
}
......@@ -18,12 +18,12 @@
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutText #text",
"object": "InlineTextBox 'Second cell'",
"rect": [11, 33, 75, 18],
"reason": "selection"
},
{
"object": "LayoutText #text",
"object": "InlineTextBox 'First cell'",
"rect": [11, 11, 61, 18],
"reason": "geometry"
}
......@@ -31,22 +31,6 @@
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow HTML",
"reason": "selection"
},
{
"object": "LayoutBlockFlow BODY",
"reason": "selection"
},
{
"object": "LayoutTable TABLE",
"reason": "selection"
},
{
"object": "LayoutTableCell TD id='firstCell'",
"reason": "selection"
},
{
"object": "LayoutText #text",
"reason": "geometry"
......@@ -55,10 +39,6 @@
"object": "InlineTextBox 'First cell'",
"reason": "geometry"
},
{
"object": "LayoutTableCell TD id='secondCell'",
"reason": "selection"
},
{
"object": "LayoutText #text",
"reason": "selection"
......
......@@ -18,12 +18,12 @@
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutText #text",
"object": "InlineTextBox 'Second cell'",
"rect": [11, 35, 70, 19],
"reason": "selection"
},
{
"object": "LayoutText #text",
"object": "InlineTextBox 'First cell'",
"rect": [11, 11, 55, 19],
"reason": "geometry"
}
......@@ -31,22 +31,6 @@
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow HTML",
"reason": "selection"
},
{
"object": "LayoutBlockFlow BODY",
"reason": "selection"
},
{
"object": "LayoutTable TABLE",
"reason": "selection"
},
{
"object": "LayoutTableCell TD id='firstCell'",
"reason": "selection"
},
{
"object": "LayoutText #text",
"reason": "geometry"
......@@ -55,10 +39,6 @@
"object": "InlineTextBox 'First cell'",
"reason": "geometry"
},
{
"object": "LayoutTableCell TD id='secondCell'",
"reason": "selection"
},
{
"object": "LayoutText #text",
"reason": "selection"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment