HostMethodTask(WebTestProxyBase* object, CallbackMethodType callback)
: WebMethodTask<WebTestProxyBase>(object), callback_(callback) {}
- virtual void RunIfValid() OVERRIDE { (object_->*callback_)(); }
+ void RunIfValid() override { (object_->*callback_)(); }
private:
CallbackMethodType callback_;
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;
- // TODO(enne): remove this: http://crbug.com/397321
- AnimateNow();
-
DCHECK(!callback.is_null());
uint64_t sequence_number = blink::Platform::current()->clipboard()->
sequenceNumber(blink::WebClipboard::Buffer());
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;
- // TODO(enne): remove this: http://crbug.com/397321
- AnimateNow();
-
DCHECK(!callback.is_null());
if (test_interfaces_->GetTestRunner()->isPrinting()) {
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;
- // TODO(enne): remove this: http://crbug.com/397321
- AnimateNow();
-
CapturePixelsAsync(base::Bind(
&WebTestProxyBase::DidDisplayAsync, base::Unretained(this), callback));
}
animate_scheduled_ = false;
web_widget_->animate(0.0);
web_widget_->layout();
+ if (blink::WebPagePopup* popup = web_widget_->pagePopup()) {
+ popup->animate(0.0);
+ popup->layout();
+ }
}
}