Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1077)

Unified Diff: content/shell/renderer/test_runner/web_test_proxy.cc

Issue 581983002: Quick fix for windows try bots flakiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/web_test_proxy.cc
diff --git a/content/shell/renderer/test_runner/web_test_proxy.cc b/content/shell/renderer/test_runner/web_test_proxy.cc
index 983c864de63e11ac90444219d6c8c377dd1f7606..cf1f033471d349ccbe615e110599212c9e1f94a4 100644
--- a/content/shell/renderer/test_runner/web_test_proxy.cc
+++ b/content/shell/renderer/test_runner/web_test_proxy.cc
@@ -482,6 +482,11 @@ void WebTestProxyBase::SetAcceptLanguages(const std::string& accept_languages) {
void WebTestProxyBase::CopyImageAtAndCapturePixels(
int x, int y, const base::Callback<void(const SkBitmap&)>& callback) {
+ // It may happen that there is a scheduled animation and
+ // no rootGraphicsLayer yet. If so we would run it right now. Otherwise
+ // isAcceleratedCompositingActive will return false;
+ AnimateNow();
danakj 2014/09/18 15:33:41 I think we need to fix WebViewImpl/blink, not just
+
DCHECK(web_widget_->isAcceleratedCompositingActive());
DCHECK(!callback.is_null());
uint64_t sequence_number = blink::Platform::current()->clipboard()->
@@ -532,6 +537,11 @@ void WebTestProxyBase::CapturePixelsAsync(
const base::Callback<void(const SkBitmap&)>& callback) {
TRACE_EVENT0("shell", "WebTestProxyBase::CapturePixelsAsync");
+ // It may happen that there is a scheduled animation and
+ // no rootGraphicsLayer yet. If so we would run it right now. Otherwise
+ // isAcceleratedCompositingActive will return false;
+ AnimateNow();
+
DCHECK(web_widget_->isAcceleratedCompositingActive());
DCHECK(!callback.is_null());
@@ -564,6 +574,11 @@ void WebTestProxyBase::DidDisplayAsync(const base::Closure& callback,
void WebTestProxyBase::DisplayAsyncThen(const base::Closure& callback) {
TRACE_EVENT0("shell", "WebTestProxyBase::DisplayAsyncThen");
+ // It may happen that there is a scheduled animation and
+ // no rootGraphicsLayer yet. If so we would run it right now. Otherwise
+ // isAcceleratedCompositingActive will return false;
+ AnimateNow();
+
CHECK(web_widget_->isAcceleratedCompositingActive());
CapturePixelsAsync(base::Bind(
&WebTestProxyBase::DidDisplayAsync, base::Unretained(this), callback));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698