X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fshell%2Frenderer%2Ftest_runner%2Fweb_test_proxy.cc;h=fbf4881d51c9dab2914356ae23a3a0a88dd12ef6;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=d76ae50457e1a20169896f1760b74f2c0b792390;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/shell/renderer/test_runner/web_test_proxy.cc b/src/content/shell/renderer/test_runner/web_test_proxy.cc index d76ae50..fbf4881 100644 --- a/src/content/shell/renderer/test_runner/web_test_proxy.cc +++ b/src/content/shell/renderer/test_runner/web_test_proxy.cc @@ -87,7 +87,7 @@ class HostMethodTask : public WebMethodTask { HostMethodTask(WebTestProxyBase* object, CallbackMethodType callback) : WebMethodTask(object), callback_(callback) {} - virtual void RunIfValid() OVERRIDE { (object_->*callback_)(); } + void RunIfValid() override { (object_->*callback_)(); } private: CallbackMethodType callback_; @@ -486,12 +486,6 @@ void WebTestProxyBase::SetAcceptLanguages(const std::string& accept_languages) { void WebTestProxyBase::CopyImageAtAndCapturePixels( int x, int y, const base::Callback& 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()); @@ -570,13 +564,6 @@ void CaptureCallback::didCompositeAndReadback(const SkBitmap& bitmap) { void WebTestProxyBase::CapturePixelsAsync( const base::Callback& 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()) { @@ -622,13 +609,6 @@ 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; - // TODO(enne): remove this: http://crbug.com/397321 - AnimateNow(); - CapturePixelsAsync(base::Bind( &WebTestProxyBase::DidDisplayAsync, base::Unretained(this), callback)); } @@ -689,6 +669,10 @@ void WebTestProxyBase::AnimateNow() { animate_scheduled_ = false; web_widget_->animate(0.0); web_widget_->layout(); + if (blink::WebPagePopup* popup = web_widget_->pagePopup()) { + popup->animate(0.0); + popup->layout(); + } } }