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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 delegate_->PostDelayedTask( | 682 delegate_->PostDelayedTask( |
683 new HostMethodTask(this, &WebTestProxyBase::AnimateNow), 1); | 683 new HostMethodTask(this, &WebTestProxyBase::AnimateNow), 1); |
684 } | 684 } |
685 } | 685 } |
686 | 686 |
687 void WebTestProxyBase::AnimateNow() { | 687 void WebTestProxyBase::AnimateNow() { |
688 if (animate_scheduled_) { | 688 if (animate_scheduled_) { |
689 animate_scheduled_ = false; | 689 animate_scheduled_ = false; |
690 web_widget_->animate(0.0); | 690 web_widget_->animate(0.0); |
691 web_widget_->layout(); | 691 web_widget_->layout(); |
| 692 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) { |
| 693 popup->animate(0.0); |
| 694 popup->layout(); |
| 695 } |
692 } | 696 } |
693 } | 697 } |
694 | 698 |
695 void WebTestProxyBase::PostAccessibilityEvent(const blink::WebAXObject& obj, | 699 void WebTestProxyBase::PostAccessibilityEvent(const blink::WebAXObject& obj, |
696 blink::WebAXEvent event) { | 700 blink::WebAXEvent event) { |
697 // Only hook the accessibility events occured during the test run. | 701 // Only hook the accessibility events occured during the test run. |
698 // This check prevents false positives in WebLeakDetector. | 702 // This check prevents false positives in WebLeakDetector. |
699 // The pending tasks in browser/renderer message queue may trigger | 703 // The pending tasks in browser/renderer message queue may trigger |
700 // accessibility events, | 704 // accessibility events, |
701 // and AccessibilityController will hold on to their target nodes if we don't | 705 // and AccessibilityController will hold on to their target nodes if we don't |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 if (!push_client_.get()) | 1358 if (!push_client_.get()) |
1355 push_client_.reset(new MockWebPushClient); | 1359 push_client_.reset(new MockWebPushClient); |
1356 return push_client_.get(); | 1360 return push_client_.get(); |
1357 } | 1361 } |
1358 | 1362 |
1359 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { | 1363 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { |
1360 return GetPushClientMock(); | 1364 return GetPushClientMock(); |
1361 } | 1365 } |
1362 | 1366 |
1363 } // namespace content | 1367 } // namespace content |
OLD | NEW |