Commit f61b58cf authored by enne@chromium.org's avatar enne@chromium.org

Remove display() from compositing/ LayoutTests

This cleans up the remaining compositing/ display() calls, other than
two tricky cases (squash-animated-gif.html and
video-with-invalid-source.html) which are in different CLs for ease of
review and landing.

BUG=345027

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169478 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d0846dfe
......@@ -837,6 +837,11 @@ crbug.com/339394 [ Win Debug ] virtual/threaded/animations/animation-matrix-nega
crbug.com/339592 media/track/opera/interfaces/TextTrackList/onaddtrack.html [ Pass Crash ]
crbug.com/339597 http/tests/navigation/back-to-redirect-with-frame.php [ Pass Timeout ]
crbug.com/345027 compositing/iframes/iframe-content-flipping.html [ NeedsRebaseline ImageOnlyFailure ]
crbug.com/345027 compositing/iframes/scroll-fixed-transformed-element.html [ NeedsRebaseline ImageOnlyFailure ]
crbug.com/345027 virtual/softwarecompositing/iframes/iframe-content-flipping.html [ NeedsRebaseline ImageOnlyFailure ]
crbug.com/345027 virtual/softwarecompositing/iframes/scroll-fixed-transformed-element.html [ NeedsRebaseline ImageOnlyFailure ]
# Disable failing tests for the new WebSocket implementation
crbug.com/339373 http/tests/security/contentSecurityPolicy/connect-src-websocket-allowed.html [ Skip ]
crbug.com/339373 http/tests/websocket/FIXME-handshake-fail-by-null-subprotocol-selection-whitelist.html [ Skip ]
......
......@@ -17,6 +17,7 @@
<div style="position: relative; left: 10px; top: 80px">
This test is successful if "Target Link" above is covered in a green rectangle with rounded corners.
</div>
<script src="../../resources/run-after-display.js"></script>
<script>
function runTest() {
var targetDiv = document.getElementById('targetDiv');
......@@ -32,16 +33,15 @@ function runTest() {
// then scrolls that div, then exits. If everything is working correctly, the link highlight will still
// be displayed correctly after all these operations.
if (window.eventSender && window.testRunner) {
eventSender.gestureShowPress(x, y);
window.testRunner.display();
document.getElementById('divToForceCompositedLayer').style.webkitTransform = 'translateZ(0)';
document.body.offsetTop;
window.testRunner.display();
targetDiv.scrollTop += 20;
window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
runAfterDisplay(function() {
document.getElementById('divToForceCompositedLayer').style.webkitTransform = 'translateZ(0)';
document.body.offsetTop;
runAfterDisplay(function() {
targetDiv.scrollTop += 20;
testRunner.notifyDone();
});
});
} else {
debug("This test requires DumpRenderTree.");
}
......
......@@ -2,6 +2,7 @@
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="../../resources/run-after-display.js"></script>
<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
</head>
<body onload="runTest();">
......@@ -34,13 +35,13 @@ function runTest() {
// be displayed correctly after all these operations.
if (window.eventSender && window.testRunner) {
eventSender.gestureShowPress(x, y);
window.testRunner.display();
document.getElementById('divToControlCompositedLayer').style.webkitTransform = "";
window.testRunner.display();
targetDiv.scrollTop += 20;
window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
runAfterDisplay(function() {
document.getElementById('divToControlCompositedLayer').style.webkitTransform = "";
runAfterDisplay(function() {
targetDiv.scrollTop += 20;
testRunner.notifyDone();
});
});
} else {
debug("This test requires DumpRenderTree.");
}
......
......@@ -10,6 +10,7 @@
<div style="position: relative; left: 10px; top: 70px; -webkit-transform: translateZ(0);">
This test is not successful if this message appears.
</div>
<script src="../../resources/run-after-display.js"></script>
<script>
function runTest() {
var clientRect = document.getElementById('targetLink').getBoundingClientRect();
......@@ -21,8 +22,12 @@ function runTest() {
if (window.eventSender) {
eventSender.gestureShowPress(x, y);
// Force display of highlight before navigating to second page.
window.testRunner.display();
window.location = 'resources/gesture-tapHighlight-simple-navigate-destination.html';
runAfterDisplay(function() {
window.location = 'resources/gesture-tapHighlight-simple-navigate-destination.html';
runAfterDisplay(function() {
testRunner.notifyDone();
});
});
} else {
debug("This test requires DumpRenderTree.");
}
......
......@@ -8,20 +8,8 @@
height: 100px;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
function runTest()
{
if (window.testRunner) {
testRunner.display();
testRunner.notifyDone();
}
}
</script>
</head>
<body onload="runTest()">
<body>
<div id="iframe-containing-fixed-position-element"></div>
</body>
</html>
......@@ -15,6 +15,7 @@ If this test passes, you should see a green square.
border: 0;
}
</style>
<script src="../../resources/run-after-display.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
......@@ -28,18 +29,15 @@ If this test passes, you should see a green square.
{
// Initially, the fixed position element in the iframe will not
// paint because the iframe has zero height.
if (window.testRunner)
testRunner.display();
runAfterDisplay(function() {
// Give the iframe a non-zero height. The fixed position element
// inside the iframe should paint now.
var iframeElement = document.getElementById("iframe-containing-fixed-position-element");
iframeElement.style.height = "100px";
// Give the iframe a non-zero height. The fixed position element
// inside the iframe should paint now.
var iframeElement = document.getElementById("iframe-containing-fixed-position-element");
iframeElement.style.height = "100px";
if (window.testRunner) {
testRunner.display();
testRunner.notifyDone();
}
if (window.testRunner)
testRunner.notifyDone();
});
}
</script>
</head>
......
......@@ -15,13 +15,18 @@
}
</style>
<script src="../../resources/run-after-display.js"></script>
<script type="text/javascript" charset="utf-8">
function doTest()
{
if (window.testRunner)
testRunner.display();
testRunner.waitUntilDone();
document.getElementById('iframe').className = 'composited';
runAfterDisplay(function() {
document.getElementById('iframe').className = 'composited';
if (window.testRunner)
testRunner.notifyDone();
});
}
window.addEventListener('load', doTest, false);
......
......@@ -29,6 +29,7 @@
-webkit-perspective: 1px;
}
</style>
<script src="../../../resources/run-after-display.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults();
......@@ -37,11 +38,15 @@
function doTest()
{
if (window.testRunner)
testRunner.display();
// Any scroll should keep the fixed-position element where it is.
// If it stutters or disappears incorrectly, then the red background will be revealed.
window.scrollTo(0, 150);
testRunner.waitUntilDone();
runAfterDisplay(function() {
// Any scroll should keep the fixed-position element where it is.
// If it stutters or disappears incorrectly, then the red background will be revealed.
window.scrollTo(0, 150);
if (window.testRunner)
testRunner.notifyDone();
});
}
window.addEventListener('load', doTest, false);
......
......@@ -9,20 +9,27 @@
}
</style>
<script src="../../resources/run-after-display.js"></script>
<script>
if (window.testRunner)
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var paintCount = 0;
function onLoad()
{
testRunner.display();
paintCount = 0;
document.getElementById('testPlugin').invalidateRect(0, 0, 200, 200);
testRunner.displayInvalidatedRegion();
if (paintCount > 0)
document.getElementById('result').innerHTML = "SUCCESS";
runAfterDisplay(function() {
paintCount = 0;
document.getElementById('testPlugin').invalidateRect(0, 0, 200, 200);
runAfterDisplay(function() {
if (paintCount > 0)
document.getElementById('result').innerHTML = "SUCCESS";
if (window.testRunner)
testRunner.notifyDone();
});
});
}
function didPaint()
......
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