Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html b/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html |
| index a461f7242eb8159b944b37116e4e22013eefe9e4..5a56fbe793197c9455751a878d2773adf644b3a3 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html |
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html |
| @@ -15,8 +15,14 @@ |
| img.src = "http://127.0.0.1:8000/security/resources/green-if-no-referrer.php"; |
| img.referrerpolicy = "no-referrer-when-downgrade"; |
| document.body.appendChild(img); |
| - testRunner.notifyDone(); |
| + |
| + // Before calling testRunner.notifyDone (and taking a screenshot of |
| + // actual.png), we need to make sure the image appended above got a |
| + // chance to paint itself. |
| + testRunner.layoutAndPaintAsyncThen(function() { |
|
dcheng
2016/04/25 23:15:03
Should this just use the image's load event?
Łukasz Anforowicz
2016/04/25 23:33:50
Done. You're right, the layoutAndPaintAsyncThen i
|
| + testRunner.notifyDone(); |
| + }); |
| } |
| </script> |
| </body> |
| -</html |
| +</html> |