| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 5 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
| 6 | 6 |
| 7 #include <cctype> | 7 #include <cctype> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 return credential_manager_client_.get(); | 653 return credential_manager_client_.get(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 void WebTestProxyBase::ScheduleAnimation() { | 656 void WebTestProxyBase::ScheduleAnimation() { |
| 657 if (!test_interfaces_->GetTestRunner()->TestIsRunning()) | 657 if (!test_interfaces_->GetTestRunner()->TestIsRunning()) |
| 658 return; | 658 return; |
| 659 | 659 |
| 660 if (!animate_scheduled_) { | 660 if (!animate_scheduled_) { |
| 661 animate_scheduled_ = true; | 661 animate_scheduled_ = true; |
| 662 delegate_->PostDelayedTask( | 662 delegate_->PostDelayedTask( |
| 663 new HostMethodTask(this, &WebTestProxyBase::AnimateNow), 1); | 663 new HostMethodTask(this, &WebTestProxyBase::AnimateNow), 200); |
| 664 } | 664 } |
| 665 } | 665 } |
| 666 | 666 |
| 667 void WebTestProxyBase::AnimateNow() { | 667 void WebTestProxyBase::AnimateNow() { |
| 668 if (animate_scheduled_) { | 668 if (animate_scheduled_) { |
| 669 animate_scheduled_ = false; | 669 animate_scheduled_ = false; |
| 670 web_widget_->animate(0.0); | 670 web_widget_->animate(0.0); |
| 671 web_widget_->layout(); | 671 web_widget_->layout(); |
| 672 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) { | 672 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) { |
| 673 popup->animate(0.0); | 673 popup->animate(0.0); |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 if (!push_client_.get()) | 1334 if (!push_client_.get()) |
| 1335 push_client_.reset(new MockWebPushClient); | 1335 push_client_.reset(new MockWebPushClient); |
| 1336 return push_client_.get(); | 1336 return push_client_.get(); |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { | 1339 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { |
| 1340 return GetPushClientMock(); | 1340 return GetPushClientMock(); |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 } // namespace content | 1343 } // namespace content |
| OLD | NEW |