Skip to content

Commit

Permalink
Convert most of fast/repaint to use text based harness
Browse files Browse the repository at this point in the history
The pixel-based repaint test harness is incompatible with compositing and
has to go.  The text-based harness can test everything that the pixel based version could.

This converts almost everything over by switching tests using f/r/resources/repaint.js
over to f/r/resources/text-based-repaint.js, fixes up a few tests to work, and
converts a few tests that are actually just pixel tests (not repaint tests) to
do only what they need to do to cover what they intend to cover.

BUG=344105

Review URL: https://codereview.chromium.org/168243002

git-svn-id: svn://svn.chromium.org/blink/trunk@167542 bbb929c8-8fbe-4397-9dbb-9b2b20218538
  • Loading branch information
jamesr@chromium.org committed Feb 20, 2014
1 parent 9fc53bb commit c4d086f
Show file tree
Hide file tree
Showing 199 changed files with 450 additions and 342 deletions.
196 changes: 194 additions & 2 deletions third_party/WebKit/LayoutTests/TestExpectations

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion third_party/WebKit/LayoutTests/fast/repaint/4776765.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest() {
document.execCommand("InsertParagraph");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<link rel="stylesheet" href="resources/default.css">
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsTextWithPixelResults();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<link rel="stylesheet" href="resources/default.css">
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsTextWithPixelResults();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<link rel="stylesheet" href="resources/default.css">
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsTextWithPixelResults();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE html>
<html>
<body onload="runRepaintTest()" style="margin: 0px">
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<style>
td {
height: 150px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html style="background-color: green;">
<head>
<script src="resources/repaint.js" type="text/javascript" charset="utf-8"></script>
<script src="resources/text-based-repaint.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style type="text/css">
div.test { width: 200px; height: 120px; border: 1px solid blue; padding: 10px; }
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
</script>

<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>

<p>This is a test for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=40142">https://bugs.webkit.org/show_bug.cgi?id=40142</a></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
</script>

<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>

<p>This is a test for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=40142">https://bugs.webkit.org/show_bug.cgi?id=40142</a></p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
document.getElementById("target").innerText += " la";
}
</script>
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<div style="height:200px; width:200px">
<div style="position:absolute">
<div id="target">La la la</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<head>
<script src="resources/repaint.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function repaintTest()
function runTest()
{
var target = document.getElementById("target");
getSelection().setBaseAndExtent(target, 0, target.nextSibling, 1);
Expand All @@ -11,7 +10,7 @@
#target::selection { background-color: #0f0; }
</style>
</head>
<body onload="runRepaintTest()">
<body onload="runTest()">
<div style="-webkit-transform: translateZ(0); margin-top: 50px; margin-left: 50px;">
<div id="target" style="background-color: red; width: 100px; height: 100px; position: absolute;"><br></div>a
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
<style>
::selection { background-color: red; }
</style>
<script src="resources/repaint.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function repaintTest()
function runTest()
{
sel.empty();
}
</script>
</head>
<body onload="runRepaintTest()">
<body onload="runTest()">
<table><tr><td style="width: 100px; height: 100px;"></td></tr><tr><td style="background-color: green;">&nbsp;<div id="target" style="display: inline-block; height: 100px; width: 10px;"></div></td></tr></table>
<script>
var sel = getSelection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
<style>
::selection { background-color: red; }
</style>
<script src="resources/repaint.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function repaintTest()
function runTest()
{
sel.empty();
}
</script>
</head>
<body onload="runRepaintTest()">
<body onload="runTest()">
<div style="height: 100px; overflow-y: scroll;">
<div style="margin-top: 50px;"><div id="target" style="display: inline-block; width: 100px; height: 100px;"></div><br></div>&nbsp;
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
<style>
::selection { background-color: red; }
</style>
<script src="resources/repaint.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function repaintTest()
function runTest()
{
sel.empty();
}
</script>
</head>
<body onload="runRepaintTest()">
<body onload="runTest()">
<div><div id="target" style="display: inline-block; width: 100px; height: 50px;"></div><br></div>&nbsp;
<script>
var sel = getSelection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title></title>
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style type="text/css">
div.test { vertical-align: top; width: 200px; height: 120px; border: 1px solid blue; padding: 10px; }
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style type="text/css">
div.test { width: 200px; height: 120px; border: 1px solid blue; padding: 10px; }
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style type="text/css">
div.test { width: 50px; height: 100px; padding: 10px; }
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
box-shadow: inset cyan 0 -60px 0 0;
}
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script type="text/javascript">
function finish()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
background: green;
}
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script>
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Test for https://bugs.webkit.org/show_bug.cgi?id=46319 -->
<head>
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
</head>
<body>
<canvas id="canvas" width="100" height="100"></canvas>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest() {
var div = document.getElementById("div");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script type="text/javascript" charset="utf-8">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
border-color: green;
}
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
</head>
<body onload="runRepaintTest();">
<div class="container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
background: blue;
}
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#main-content { float: left; width: 100px; height: 80px; }
#target3 { display: none; clear: both; height: 20px; background: green; }
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script>
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test for http://bugs.webkit.org/show_bug.cgi?id=13680</title>
<script src="resources/repaint.js" type="text/javascript"></script>
<script>
function repaintTest()
function runTest()
{
document.getElementById('t').style.outline = '';
}
</script>
</head>
<body onload="runRepaintTest();">
<body onload="runTest();">
<div style="width: 50px; text-align: center;">
<span id="t" style="outline: auto;"><div style="width: 30px; height:40px; background-color: silver; margin: auto"></div>
x
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title></title>
<script src="resources/repaint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
width: 500px;
}
</style>
<script src="resources/repaint.js" type="text/javascript"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script>
function repaintTest()
{
Expand Down
Loading

0 comments on commit c4d086f

Please sign in to comment.