Commit 25ff2577 authored by enne@chromium.org's avatar enne@chromium.org

Remove repaint.js from layout tests

All of these tests don't seem to depend on minimizing repaints and are
more trying to make sure that something has repainted.  Therefore,
change them all to just use rAF rather than repaint.js and make them
pixel tests where applicable.

BUG=345027

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170237 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e01bb69d
...@@ -832,6 +832,14 @@ crbug.com/345648 fast/repaint/selection-gap-overflow-scroll.html [ Pass Failure ...@@ -832,6 +832,14 @@ crbug.com/345648 fast/repaint/selection-gap-overflow-scroll.html [ Pass Failure
crbug.com/345646 fast/repaint/selection-after-remove.html [ Pass Failure ] crbug.com/345646 fast/repaint/selection-after-remove.html [ Pass Failure ]
crbug.com/345767 fast/repaint/selection-gap-overflow-scroll-2.html [ Pass Failure ] crbug.com/345767 fast/repaint/selection-gap-overflow-scroll-2.html [ Pass Failure ]
crbug.com/345027 fast/canvas/canvas-as-image-incremental-repaint.html [ NeedsRebaseline ]
crbug.com/345027 virtual/gpu/fast/canvas/canvas-as-image-incremental-repaint.html [ NeedsRebaseline ]
crbug.com/345027 fast/repaint/4774354.html [ NeedsRebaseline ]
crbug.com/345027 fast/css3-text/css3-text-decoration/repaint/repaint-text-decoration-style.html [ NeedsRebaseline ]
crbug.com/345027 fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html [ NeedsRebaseline ]
crbug.com/345027 fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html [ NeedsRebaseline ]
crbug.com/345027 fast/sub-pixel/transformed-iframe-copy-on-scroll.html [ NeedsRebaseline ]
crbug.com/345027 fast/table/simple_paint.html [ NeedsRebaseline ]
crbug.com/334152 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-001.html [ Failure ] crbug.com/334152 w3c/web-platform-tests/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-001.html [ Failure ]
......
...@@ -31,25 +31,22 @@ ...@@ -31,25 +31,22 @@
-webkit-transform: translateZ(0); -webkit-transform: translateZ(0);
} }
</style> </style>
<script src="../../fast/repaint/resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
if (window.testRunner) { if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone(); testRunner.waitUntilDone();
} }
function repaintTest()
{
window.scrollBy(0,-96);
if (window.testRunner)
testRunner.notifyDone();
}
function doTest() function doTest()
{ {
window.scrollBy(0,-2048); window.scrollBy(0,-2048);
window.scrollBy(0,160); window.scrollBy(0,160);
runRepaintTest(); runAfterDisplay(function() {
window.scrollBy(0,-96);
if (window.testRunner)
testRunner.notifyDone();
});
} }
window.addEventListener('load', doTest, false); window.addEventListener('load', doTest, false);
</script> </script>
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
</style> </style>
</head> </head>
<script src="../../fast/repaint/resources/repaint.js"></script>
<script src="../../resources/run-after-display.js"></script> <script src="../../resources/run-after-display.js"></script>
<script> <script>
...@@ -74,7 +73,7 @@ ...@@ -74,7 +73,7 @@
</script> </script>
<body onload="runRepaintTest()"> <body onload="repaintTest()">
<div id="content-container"> <div id="content-container">
<div id="composited"></div> <div id="composited"></div>
<div id="positioned-2"> <div id="positioned-2">
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
</head> </head>
<script src="../../resources/run-after-display.js"></script> <script src="../../resources/run-after-display.js"></script>
<script src="../../fast/repaint/resources/repaint.js"></script>
<script> <script>
if (window.testRunner) { if (window.testRunner) {
...@@ -60,21 +59,23 @@ ...@@ -60,21 +59,23 @@
} }
function repaintTest() { function repaintTest() {
// Changing the position will cause the scrolldiv to become composited becuase it overlaps another compostied element.
changeDivPosition();
// Force DumpRenderTree to do a layout and repaint here, this is where the repaintRect
// goes wrong because it does not get updated for a newly composited element.
runAfterDisplay(function() { runAfterDisplay(function() {
// Scrolling a little will demonstrate whether the repaint rect is correct or not. // Changing the position will cause the scrolldiv to become composited becuase it overlaps another compostied element.
document.getElementById('scrolldiv').scrollTop = 500; changeDivPosition();
testRunner.notifyDone();
// Force DumpRenderTree to do a layout and repaint here, this is where the repaintRect
// goes wrong because it does not get updated for a newly composited element.
runAfterDisplay(function() {
// Scrolling a little will demonstrate whether the repaint rect is correct or not.
document.getElementById('scrolldiv').scrollTop = 500;
testRunner.notifyDone();
});
}); });
} }
</script> </script>
<body onload="runRepaintTest()"> <body onload="repaintTest()">
<div class="composited box"></div> <div class="composited box"></div>
<div id="scrolldiv"> <div id="scrolldiv">
<div class="shouldNotBeSeen box"></div> <div class="shouldNotBeSeen box"></div>
......
<html> <html>
<head> <head>
<title>Test for bug 62243</title> <title>Test for bug 62243</title>
<style type="text/css"> <style type="text/css">
#ruler { #ruler {
-webkit-transform: translateZ(0); -webkit-transform: translateZ(0);
border-bottom: 10px solid black; border-bottom: 10px solid black;
width: 550px; width: 550px;
height: 500px; height: 500px;
} }
</style> </style>
<script src="../../fast/repaint/resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script> <script>
if (window.testRunner) if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
function repaintTest() testRunner.waitUntilDone();
{ }
document.getElementById("ruler").style.height = "450px"; function repaintTest()
} {
</script> document.getElementById("ruler").style.height = "450px";
</head> testRunner.notifyDone();
<body onload="runRepaintTest()"> }
<div id="ruler"> </script>
</body> </head>
</html> <body onload="runAfterDisplay(repaintTest);">
<div id="ruler">
</body>
</html>
...@@ -8,8 +8,12 @@ ...@@ -8,8 +8,12 @@
content: -webkit-canvas(squares); content: -webkit-canvas(squares);
} }
</style> </style>
<script src="resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script type="application/x-javascript"> <script type="application/x-javascript">
if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
}
function repaintTest() function repaintTest()
{ {
var ctx = document.getCSSCanvasContext("2d", "squares", 300, 300); var ctx = document.getCSSCanvasContext("2d", "squares", 300, 300);
...@@ -19,10 +23,12 @@ ...@@ -19,10 +23,12 @@
ctx.fillStyle = "rgba(0, 0, 200, 0.5)"; ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
ctx.fillRect (50, 50, 100, 100); ctx.fillRect (50, 50, 100, 100);
if (window.testRunner)
testRunner.notifyDone();
} }
</script> </script>
</head> </head>
<body onload="runRepaintTest()"> <body onload="runAfterDisplay(repaintTest)">
<div></div> <div></div>
</body> </body>
</html> </html>
<!doctype html> <!doctype html>
<script src="resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<body onload="runRepaintTest();"> <body onload="runAfterDisplay(repaintTest);">
<canvas id="canvas-source-in" width="100" height="100"></canvas> <canvas id="canvas-source-in" width="100" height="100"></canvas>
<canvas id="canvas-copy" width="100" height="100"></canvas> <canvas id="canvas-copy" width="100" height="100"></canvas>
<script> <script>
var compositeTypes = ['source-in','copy']; var compositeTypes = ['source-in','copy'];
if (window.testRunner) if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
}
for (i = 0; i < compositeTypes.length; i++) { for (i = 0; i < compositeTypes.length; i++) {
var canvas = document.getElementById('canvas-' + compositeTypes[i]); var canvas = document.getElementById('canvas-' + compositeTypes[i]);
...@@ -25,7 +27,8 @@ ...@@ -25,7 +27,8 @@
ctx.fillStyle = '#00f'; ctx.fillStyle = '#00f';
ctx.fillRect(40, 40, 20, 20); ctx.fillRect(40, 40, 20, 20);
} }
if (window.testRunner)
testRunner.notifyDone();
} }
</script> </script>
</body> </body>
...@@ -82,7 +82,7 @@ xhr.onload = function() { ...@@ -82,7 +82,7 @@ xhr.onload = function() {
} }
var xhr2 = new XMLHttpRequest(); var xhr2 = new XMLHttpRequest();
xhr2.open("GET", 'resources/repaint.js'); xhr2.open("GET", 'resources/shadow-offset.js');
xhr2.responseType = 'blob'; xhr2.responseType = 'blob';
xhr2.send(); xhr2.send();
xhr2.onload = function() { xhr2.onload = function() {
......
...@@ -10,11 +10,12 @@ ...@@ -10,11 +10,12 @@
border: 20px solid black; border: 20px solid black;
} }
</style> </style>
<script src="resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
if (window.testRunner) { if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
} }
function repaintTest() function repaintTest()
...@@ -23,18 +24,19 @@ ...@@ -23,18 +24,19 @@
var ctx = canvas.getContext('2d'); var ctx = canvas.getContext('2d');
ctx.fillStyle = 'green'; ctx.fillStyle = 'green';
ctx.save(); ctx.save();
ctx.setTransform(1, 0, 0, 1, 50, 200); ctx.setTransform(1, 0, 0, 1, 50, 200);
// Test the the transform applies the matrix in the correct order. // Test the the transform applies the matrix in the correct order.
ctx.transform(1, 0, 0, -1, 0, 0); ctx.transform(1, 0, 0, -1, 0, 0);
ctx.fillRect(0, 100, 200, 80); ctx.fillRect(0, 100, 200, 80);
ctx.restore(); ctx.restore();
if (window.testRunner) {
testRunner.notifyDone();
}
} }
</script> </script>
</head> </head>
<body onload="runRepaintTest()"> <body onload="runAfterDisplay(repaintTest)">
<canvas id="canvas1"></canvas> <canvas id="canvas1"></canvas>
</body> </body>
</html> </html>
...@@ -10,15 +10,16 @@ ...@@ -10,15 +10,16 @@
border: 20px solid black; border: 20px solid black;
} }
</style> </style>
<script src="resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
if (window.testRunner) { if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
} }
var appleImage; var appleImage;
function initializeCanvas() function initializeCanvas()
{ {
var canvas = document.getElementById('canvas1'); var canvas = document.getElementById('canvas1');
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
ctx.fillStyle = 'black'; ctx.fillStyle = 'black';
ctx.strokeStyle = 'green'; ctx.strokeStyle = 'green';
ctx.lineWidth = 12; ctx.lineWidth = 12;
ctx.save(); ctx.save();
ctx.scale(1.5, 0.8); ctx.scale(1.5, 0.8);
ctx.fillRect(30, 40, 70, 80); ctx.fillRect(30, 40, 70, 80);
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
// Test with stroke // Test with stroke
canvas = document.getElementById('canvas3'); canvas = document.getElementById('canvas3');
ctx = canvas.getContext('2d'); ctx = canvas.getContext('2d');
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(100, 20); ctx.moveTo(100, 20);
ctx.bezierCurveTo(150, 20, 150, 120, 100, 120); ctx.bezierCurveTo(150, 20, 150, 120, 100, 120);
...@@ -115,7 +116,7 @@ ...@@ -115,7 +116,7 @@
ctx.shadowColor = 'blue'; ctx.shadowColor = 'blue';
ctx.translate(60, 0); ctx.translate(60, 0);
ctx.drawImage(appleImage, 10, 10, 100, 100); ctx.drawImage(appleImage, 10, 10, 100, 100);
// clip test // clip test
canvas = document.getElementById('canvas8'); canvas = document.getElementById('canvas8');
ctx = canvas.getContext('2d'); ctx = canvas.getContext('2d');
...@@ -123,20 +124,20 @@ ...@@ -123,20 +124,20 @@
ctx.shadowOffsetY = 20; ctx.shadowOffsetY = 20;
ctx.shadowBlur = 40; ctx.shadowBlur = 40;
ctx.shadowColor = 'blue'; ctx.shadowColor = 'blue';
ctx.beginPath(); ctx.beginPath();
ctx.rect(50, 30, 80, 80); ctx.rect(50, 30, 80, 80);
ctx.closePath(); ctx.closePath();
ctx.clip(); ctx.clip();
ctx.translate(40, 0); ctx.translate(40, 0);
ctx.drawImage(appleImage, 10, 10, 100, 100); ctx.drawImage(appleImage, 10, 10, 100, 100);
// ImageData test // ImageData test
canvas = document.getElementById('canvas9'); canvas = document.getElementById('canvas9');
ctx = canvas.getContext('2d'); ctx = canvas.getContext('2d');
ctx.drawImage(appleImage, 10, 10, 100, 100); ctx.drawImage(appleImage, 10, 10, 100, 100);
var imageData = ctx.getImageData(15, 15, 90, 90); var imageData = ctx.getImageData(15, 15, 90, 90);
// putImageData ignores shadow, transform and clip, but set the to test // putImageData ignores shadow, transform and clip, but set the to test
...@@ -150,15 +151,18 @@ ...@@ -150,15 +151,18 @@
ctx.clip(); ctx.clip();
ctx.putImageData(imageData, 150, 20); ctx.putImageData(imageData, 150, 20);
if (window.testRunner)
testRunner.notifyDone();
} }
function pageLoaded() function pageLoaded()
{ {
initializeCanvas(); initializeCanvas();
appleImage = new Image(); appleImage = new Image();
appleImage.onload = function() { appleImage.onload = function() {
runRepaintTest(); runAfterDisplay(repaintTest);
} }
appleImage.src = "resources/apple.gif"; appleImage.src = "resources/apple.gif";
} }
......
...@@ -12,23 +12,27 @@ ...@@ -12,23 +12,27 @@
height: 300px; height: 300px;
} }
</style> </style>
<script src="resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script> <script>
if (window.testRunner) if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
}
function runTest() { function runTest() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d'); var ctx = canvas.getContext('2d');
ctx.fillStyle = 'red'; ctx.fillStyle = 'red';
ctx.fillRect(0, 0, 300, 300); ctx.fillRect(0, 0, 300, 300);
runRepaintTest(); runAfterDisplay(repaintTest);
} }
function repaintTest() { function repaintTest() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');
// This changes the resolution of the canvas but keeps its layout size constant. // This changes the resolution of the canvas but keeps its layout size constant.
canvas.width = canvas.width / 2; canvas.width = canvas.width / 2;
if (window.testRunner)
testRunner.notifyDone();
} }
</script> </script>
</head> </head>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// Create an image with invalid data. // Create an image with invalid data.
var invalidImage = new Image(); var invalidImage = new Image();
invalidImage.src = 'resources/repaint.js'; invalidImage.src = 'resources/shadow-offset.js';
invalidImage.onerror = draw; invalidImage.onerror = draw;
var ctx = document.createElement("canvas").getContext('2d'); var ctx = document.createElement("canvas").getContext('2d');
......
...@@ -2,20 +2,24 @@ ...@@ -2,20 +2,24 @@
"http://www.w3.org/TR/html4/strict.dtd"> "http://www.w3.org/TR/html4/strict.dtd">
<html> <html>
<head> <head>
<script src="resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script> <script>
if (window.testRunner) if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
}
function repaintTest() function repaintTest()
{ {
var canvas = document.getElementById('c1'); var canvas = document.getElementById('c1');
var offset = document.body.offsetLeft; // Forces layout var offset = document.body.offsetLeft; // Forces layout
canvas.width = canvas.width; // Should wipe canvas clean canvas.width = canvas.width; // Should wipe canvas clean
if (window.testRunner)
testRunner.notifyDone();
} }
</script> </script>
</head> </head>
<body onload="runRepaintTest();"> <body onload="runAfterDisplay(repaintTest);">
<p><b>BUG ID:</b> <a href="https://bugs.webkit.org/show_bug.cgi?id=43341">Bugzilla bug 43341</a> <p><b>BUG ID:</b> <a href="https://bugs.webkit.org/show_bug.cgi?id=43341">Bugzilla bug 43341</a>
Setting canvas width after canvas already rendered resets canvas data appropriately, but doesn't repaint immediately. Setting canvas width after canvas already rendered resets canvas data appropriately, but doesn't repaint immediately.
<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b>
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
if (window.testRunner) if (window.testRunner)
testRunner.dumpAsText(); testRunner.dumpAsText();
</script> </script>
<script src="../../repaint/resources/repaint.js" type="text/javascript"></script>
<script> <script>
function runRepaintTest() { function runRepaintTest() {
document.getElementById("test-underline").style.textDecorationColor = 'gray'; document.getElementById("test-underline").style.textDecorationColor = 'gray';
......
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
<link rel="help" href="http://http://dev.w3.org/csswg/css3-text/#text-decoration-style"/> <link rel="help" href="http://http://dev.w3.org/csswg/css3-text/#text-decoration-style"/>
<meta name="flags" content="ahem"/> <meta name="flags" content="ahem"/>
<script> <script>
if (window.testRunner) if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
}
</script> </script>
<script src="../../../repaint/resources/repaint.js" type="text/javascript"></script> <script src="../../../../resources/run-after-display.js" type="text/javascript"></script>
<script> <script>
function repaintTest() { function repaintTest() {
document.getElementById("test-initial-blank").style.textDecorationStyle = ''; document.getElementById("test-initial-blank").style.textDecorationStyle = '';
...@@ -17,10 +19,12 @@ ...@@ -17,10 +19,12 @@
document.getElementById("test-invalid-unknown").style.textDecorationStyle = 'unknown'; document.getElementById("test-invalid-unknown").style.textDecorationStyle = 'unknown';
document.getElementById("test-inherit-explicit").style.textDecorationStyle = 'inherit'; document.getElementById("test-inherit-explicit").style.textDecorationStyle = 'inherit';
document.getElementById("test-repaint-parent").style.textDecorationStyle = 'double'; document.getElementById("test-repaint-parent").style.textDecorationStyle = 'double';
if (window.testRunner)
testRunner.notifyDone();
} }
</script> </script>
</head> </head>
<body onload="runRepaintTest();" style="font: 20px Ahem; -webkit-font-smoothing: none; -webkit-text-stroke: 1px black; -webkit-text-fill-color: white;"> <body onload="runAfterDisplay(repaintTest);" style="font: 20px Ahem; -webkit-font-smoothing: none; -webkit-text-stroke: 1px black; -webkit-text-fill-color: white;">
<!-- Blank and 'initial' values fallbacks to 'solid' on repaintTest(). --> <!-- Blank and 'initial' values fallbacks to 'solid' on repaintTest(). -->
<p><span id="test-initial-blank" style="text-decoration: underline; text-decoration-style: double;">lorem ipsum</span></p> <p><span id="test-initial-blank" style="text-decoration: underline; text-decoration-style: double;">lorem ipsum</span></p>
<p><span id="test-initial-explicit" style="text-decoration: underline; text-decoration-style: double;">lorem ipsum</span></p> <p><span id="test-initial-explicit" style="text-decoration: underline; text-decoration-style: double;">lorem ipsum</span></p>
......
<script src="resources/repaint.js" type="text/javascript"></script> <script src="../../resources/run-after-display.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
function step1() { function step1() {
...@@ -19,7 +19,7 @@ function step2() { ...@@ -19,7 +19,7 @@ function step2() {
var text = body.firstChild; var text = body.firstChild;
sel.setPosition(text, text.length); sel.setPosition(text, text.length);
// Wait for the caret to paint. // Wait for the caret to paint.
window.setTimeout(runRepaintTest, 100); runAfterDisplay(repaintTest);
} }
function repaintTest() { function repaintTest() {
...@@ -28,9 +28,7 @@ function repaintTest() { ...@@ -28,9 +28,7 @@ function repaintTest() {
var body = doc.body; var body = doc.body;
var text = body.firstChild; var text = body.firstChild;
var sel = frame.getSelection(); var sel = frame.getSelection();
sel.setBaseAndExtent(text, 5, text, text.length); sel.setBaseAndExtent(text, 5, text, text.length);
if (window.testRunner) if (window.testRunner)
window.testRunner.notifyDone(); window.testRunner.notifyDone();
} }
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
} }
</style> </style>
<!-- This file should contain a duck with multiply blending set from script. --> <!-- This file should contain a duck with multiply blending set from script. -->
<script src="resources/repaint.js" type="text/javascript"></script> <body onload="repaintTest()">
<body onload="runRepaintTest()">
<script> <script>
function repaintTest() { function repaintTest() {
document.getElementById('blender').style.backgroundBlendMode = "multiply, normal"; document.getElementById('blender').style.backgroundBlendMode = "multiply, normal";
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
} }
</style> </style>
<!-- This file should contain a duck with multiply blending set from script. --> <!-- This file should contain a duck with multiply blending set from script. -->
<script src="resources/repaint.js" type="text/javascript"></script> <body onload="repaintTest()">
<body onload="runRepaintTest()">
<script> <script>
function repaintTest() { function repaintTest() {
document.getElementById('blender').style.backgroundBlendMode = "multiply, normal"; document.getElementById('blender').style.backgroundBlendMode = "multiply, normal";
......
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="resources/repaint.js"></script>
<script> <script>
function repaintTest() function repaintTest()
{ {
document.getElementById('resize-target').style.height = '200px'; document.getElementById('resize-target').style.height = '200px';
} }
</script> </script>
</head> </head>
<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()"> <body style="margin: 0; padding: 0; overflow: hidden;" onload="repaintTest()">
<div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div> <div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div>
<div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div> <div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
......
...@@ -2,16 +2,21 @@ ...@@ -2,16 +2,21 @@
<html> <html>
<head> <head>
<title>Test for http://bugs.webkit.org/show_bug.cgi?id=79490</title> <title>Test for http://bugs.webkit.org/show_bug.cgi?id=79490</title>
<script src="resources/repaint.js"></script> <script src="../../resources/run-after-display.js"></script>
<script> <script>
if (window.testRunner) {
testRunner.waitUntilDone();
}
function repaintTest() function repaintTest()
{ {
document.getElementById('resize-target').style.height = '200px'; document.getElementById('resize-target').style.height = '200px';
if (window.testRunner)
testRunner.notifyDone();
} }
</script> </script>
</head> </head>
<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()"> <body style="margin: 0; padding: 0; overflow: hidden;" onload="runAfterDisplay(repaintTest);">
<div id="resize-target" style="width: 400px; height: 400px; position: absolute;"> <div id="resize-target" style="width: 400px; height: 400px; position: absolute;">
<!-- After window resizing, this DIV element should not be visible --> <!-- After window resizing, this DIV element should not be visible -->
<div style="width: 100px; min-height: 50%; background-color: red; display: inline-block;"></div> <div style="width: 100px; min-height: 50%; background-color: red; display: inline-block;"></div>
......
...@@ -10,17 +10,23 @@ body { ...@@ -10,17 +10,23 @@ body {
font: 82% arial,sans-serif; font: 82% arial,sans-serif;
} }
</style> </style>
<script src="../../repaint/resources/repaint.js" type="text/javascript"></script> <script src="../../../resources/run-after-display.js" type="text/javascript"></script>
<script> <script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsTextWithPixelResults();
}
function repaintTest() { function repaintTest() {
window.getSelection().removeAllRanges(); window.getSelection().removeAllRanges();
if (window.testRunner)
testRunner.notifyDone();
} }
</script> </script>
</head> </head>
<body onload="runRepaintTest()"> <body onload="runAfterDisplay(repaintTest)">
<table style="position: absolute; top: 1.5px;"> <table style="position: absolute; top: 1.5px;">
<tr> <tr>
<td> <td>
<pre id="pre">There should be no selection artifacts below. <pre id="pre">There should be no selection artifacts below.
</pre> </pre>
</td> </td>
......
...@@ -10,10 +10,11 @@ ...@@ -10,10 +10,11 @@
display: inline-block; display: inline-block;
} }
</style> </style>
<script src="../repaint/resources/repaint.js" type="text/javascript"></script> <script src="../../resources/run-after-display.js" type="text/javascript"></script>
<script> <script>
if (window.testRunner) { if (window.testRunner) {
testRunner.waitUntilDone(); testRunner.waitUntilDone();
testRunner.dumpAsTextWithPixelResults();
internals.settings.setMockScrollbarsEnabled(true); internals.settings.setMockScrollbarsEnabled(true);
} }
...@@ -37,7 +38,7 @@ function repaintTest() { ...@@ -37,7 +38,7 @@ function repaintTest() {
} }
</script> </script>
</head> </head>
<body onload="setupIframes();runRepaintTest()"> <body onload="setupIframes();runAfterDisplay(repaintTest);">
<p>The iframes below should remain grey with no repaint artifacts when scrolling.</p> <p>The iframes below should remain grey with no repaint artifacts when scrolling.</p>
<div> <div>
<div class="container"> <div class="container">
......
...@@ -16,10 +16,11 @@ ...@@ -16,10 +16,11 @@
-webkit-transform: rotate3d(0, 0, 1, 45deg); -webkit-transform: rotate3d(0, 0, 1, 45deg);
} }
</style> </style>
<script src="../repaint/resources/repaint.js" type="text/javascript"></script> <script src="../../resources/run-after-display.js" type="text/javascript"></script>
<script> <script>
if (window.testRunner) { if (window.testRunner) {
testRunner.waitUntilDone(); testRunner.waitUntilDone();
testRunner.dumpAsTextWithPixelResults();
internals.settings.setMockScrollbarsEnabled(true); internals.settings.setMockScrollbarsEnabled(true);
} }
...@@ -43,7 +44,7 @@ function repaintTest() { ...@@ -43,7 +44,7 @@ function repaintTest() {
} }
</script> </script>
</head> </head>
<body onload="setupIframes();runRepaintTest()"> <body onload="setupIframes();runAfterDisplay(repaintTest);">
<p>The iframes below should remain grey with no repaint artifacts when scrolling.</p> <p>The iframes below should remain grey with no repaint artifacts when scrolling.</p>
<div> <div>
<div class="container"> <div class="container">
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
} }
} }
</script> </script>
<script type="text/javascript" src="../repaint/resources/repaint.js"></script> <script type="text/javascript" src="../../resources/run-after-display.js"></script>
</head> </head>
<body onload="runRepaintTest()"> <body onload="runAfterDisplay(repaintTest);">
<table class="testtable"> <table class="testtable">
<tr> <tr>
<td></td> <td></td>
......
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