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 ...@@ -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/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/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 # 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/security/contentSecurityPolicy/connect-src-websocket-allowed.html [ Skip ]
crbug.com/339373 http/tests/websocket/FIXME-handshake-fail-by-null-subprotocol-selection-whitelist.html [ Skip ] crbug.com/339373 http/tests/websocket/FIXME-handshake-fail-by-null-subprotocol-selection-whitelist.html [ Skip ]
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<div style="position: relative; left: 10px; top: 80px"> <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. This test is successful if "Target Link" above is covered in a green rectangle with rounded corners.
</div> </div>
<script src="../../resources/run-after-display.js"></script>
<script> <script>
function runTest() { function runTest() {
var targetDiv = document.getElementById('targetDiv'); var targetDiv = document.getElementById('targetDiv');
...@@ -32,16 +33,15 @@ function runTest() { ...@@ -32,16 +33,15 @@ function runTest() {
// then scrolls that div, then exits. If everything is working correctly, the link highlight will still // then scrolls that div, then exits. If everything is working correctly, the link highlight will still
// be displayed correctly after all these operations. // be displayed correctly after all these operations.
if (window.eventSender && window.testRunner) { if (window.eventSender && window.testRunner) {
eventSender.gestureShowPress(x, y); eventSender.gestureShowPress(x, y);
window.testRunner.display(); runAfterDisplay(function() {
document.getElementById('divToForceCompositedLayer').style.webkitTransform = 'translateZ(0)';
document.getElementById('divToForceCompositedLayer').style.webkitTransform = 'translateZ(0)'; document.body.offsetTop;
document.body.offsetTop; runAfterDisplay(function() {
window.testRunner.display(); targetDiv.scrollTop += 20;
testRunner.notifyDone();
targetDiv.scrollTop += 20; });
window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); });
} else { } else {
debug("This test requires DumpRenderTree."); debug("This test requires DumpRenderTree.");
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<html> <html>
<head> <head>
<script src="../../resources/js-test.js"></script> <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"> <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
</head> </head>
<body onload="runTest();"> <body onload="runTest();">
...@@ -34,13 +35,13 @@ function runTest() { ...@@ -34,13 +35,13 @@ function runTest() {
// be displayed correctly after all these operations. // be displayed correctly after all these operations.
if (window.eventSender && window.testRunner) { if (window.eventSender && window.testRunner) {
eventSender.gestureShowPress(x, y); eventSender.gestureShowPress(x, y);
window.testRunner.display(); runAfterDisplay(function() {
document.getElementById('divToControlCompositedLayer').style.webkitTransform = "";
document.getElementById('divToControlCompositedLayer').style.webkitTransform = ""; runAfterDisplay(function() {
window.testRunner.display(); targetDiv.scrollTop += 20;
testRunner.notifyDone();
targetDiv.scrollTop += 20; });
window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); });
} else { } else {
debug("This test requires DumpRenderTree."); debug("This test requires DumpRenderTree.");
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<div style="position: relative; left: 10px; top: 70px; -webkit-transform: translateZ(0);"> <div style="position: relative; left: 10px; top: 70px; -webkit-transform: translateZ(0);">
This test is not successful if this message appears. This test is not successful if this message appears.
</div> </div>
<script src="../../resources/run-after-display.js"></script>
<script> <script>
function runTest() { function runTest() {
var clientRect = document.getElementById('targetLink').getBoundingClientRect(); var clientRect = document.getElementById('targetLink').getBoundingClientRect();
...@@ -21,8 +22,12 @@ function runTest() { ...@@ -21,8 +22,12 @@ function runTest() {
if (window.eventSender) { if (window.eventSender) {
eventSender.gestureShowPress(x, y); eventSender.gestureShowPress(x, y);
// Force display of highlight before navigating to second page. // Force display of highlight before navigating to second page.
window.testRunner.display(); runAfterDisplay(function() {
window.location = 'resources/gesture-tapHighlight-simple-navigate-destination.html'; window.location = 'resources/gesture-tapHighlight-simple-navigate-destination.html';
runAfterDisplay(function() {
testRunner.notifyDone();
});
});
} else { } else {
debug("This test requires DumpRenderTree."); debug("This test requires DumpRenderTree.");
} }
......
...@@ -8,20 +8,8 @@ ...@@ -8,20 +8,8 @@
height: 100px; height: 100px;
} }
</style> </style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
function runTest()
{
if (window.testRunner) {
testRunner.display();
testRunner.notifyDone();
}
}
</script>
</head> </head>
<body onload="runTest()"> <body>
<div id="iframe-containing-fixed-position-element"></div> <div id="iframe-containing-fixed-position-element"></div>
</body> </body>
</html> </html>
...@@ -15,6 +15,7 @@ If this test passes, you should see a green square. ...@@ -15,6 +15,7 @@ If this test passes, you should see a green square.
border: 0; border: 0;
} }
</style> </style>
<script src="../../resources/run-after-display.js"></script>
<script> <script>
if (window.testRunner) if (window.testRunner)
testRunner.waitUntilDone(); testRunner.waitUntilDone();
...@@ -28,18 +29,15 @@ If this test passes, you should see a green square. ...@@ -28,18 +29,15 @@ If this test passes, you should see a green square.
{ {
// Initially, the fixed position element in the iframe will not // Initially, the fixed position element in the iframe will not
// paint because the iframe has zero height. // paint because the iframe has zero height.
if (window.testRunner) runAfterDisplay(function() {
testRunner.display(); // 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 if (window.testRunner)
// inside the iframe should paint now. testRunner.notifyDone();
var iframeElement = document.getElementById("iframe-containing-fixed-position-element"); });
iframeElement.style.height = "100px";
if (window.testRunner) {
testRunner.display();
testRunner.notifyDone();
}
} }
</script> </script>
</head> </head>
......
...@@ -15,13 +15,18 @@ ...@@ -15,13 +15,18 @@
} }
</style> </style>
<script src="../../resources/run-after-display.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
function doTest() function doTest()
{ {
if (window.testRunner) 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); window.addEventListener('load', doTest, false);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
-webkit-perspective: 1px; -webkit-perspective: 1px;
} }
</style> </style>
<script src="../../../resources/run-after-display.js"></script>
<script> <script>
if (window.testRunner) { if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults(); testRunner.dumpAsTextWithPixelResults();
...@@ -37,11 +38,15 @@ ...@@ -37,11 +38,15 @@
function doTest() function doTest()
{ {
if (window.testRunner) if (window.testRunner)
testRunner.display(); testRunner.waitUntilDone();
// Any scroll should keep the fixed-position element where it is. runAfterDisplay(function() {
// If it stutters or disappears incorrectly, then the red background will be revealed. // Any scroll should keep the fixed-position element where it is.
window.scrollTo(0, 150); // 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); window.addEventListener('load', doTest, false);
......
...@@ -9,20 +9,27 @@ ...@@ -9,20 +9,27 @@
} }
</style> </style>
<script src="../../resources/run-after-display.js"></script>
<script> <script>
if (window.testRunner) if (window.testRunner) {
testRunner.dumpAsText(); testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var paintCount = 0; var paintCount = 0;
function onLoad() function onLoad()
{ {
testRunner.display(); runAfterDisplay(function() {
paintCount = 0; paintCount = 0;
document.getElementById('testPlugin').invalidateRect(0, 0, 200, 200); document.getElementById('testPlugin').invalidateRect(0, 0, 200, 200);
testRunner.displayInvalidatedRegion(); runAfterDisplay(function() {
if (paintCount > 0) if (paintCount > 0)
document.getElementById('result').innerHTML = "SUCCESS"; document.getElementById('result').innerHTML = "SUCCESS";
if (window.testRunner)
testRunner.notifyDone();
});
});
} }
function didPaint() 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