| Index: components/test_runner/web_test_proxy.cc
|
| diff --git a/components/test_runner/web_test_proxy.cc b/components/test_runner/web_test_proxy.cc
|
| index ed62aa30ddfe21ec598a49e1eaa6d9a37223faaa..013c696efa601031f04c8529d2657f1ae47cdfee 100644
|
| --- a/components/test_runner/web_test_proxy.cc
|
| +++ b/components/test_runner/web_test_proxy.cc
|
| @@ -7,64 +7,16 @@
|
| #include <stddef.h>
|
| #include <stdint.h>
|
|
|
| -#include <cctype>
|
| -
|
| -#include "base/callback_helpers.h"
|
| -#include "base/command_line.h"
|
| -#include "base/logging.h"
|
| -#include "base/strings/string_util.h"
|
| -#include "base/thread_task_runner_handle.h"
|
| -#include "base/trace_event/trace_event.h"
|
| -#include "components/test_runner/mock_credential_manager_client.h"
|
| #include "components/test_runner/mock_screen_orientation_client.h"
|
| -#include "components/test_runner/spell_check_client.h"
|
| -#include "components/test_runner/test_common.h"
|
| #include "components/test_runner/test_interfaces.h"
|
| -#include "components/test_runner/test_plugin.h"
|
| #include "components/test_runner/test_runner.h"
|
| #include "components/test_runner/web_test_delegate.h"
|
| #include "components/test_runner/web_test_interfaces.h"
|
| -#include "components/test_runner/web_test_runner.h"
|
| -#include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h"
|
| -#include "third_party/WebKit/public/platform/WebURLError.h"
|
| -#include "third_party/WebKit/public/platform/WebURLRequest.h"
|
| -#include "third_party/WebKit/public/platform/WebURLResponse.h"
|
| -#include "third_party/WebKit/public/web/WebAXEnums.h"
|
| -#include "third_party/WebKit/public/web/WebAXObject.h"
|
| -#include "third_party/WebKit/public/web/WebDocument.h"
|
| -#include "third_party/WebKit/public/web/WebElement.h"
|
| -#include "third_party/WebKit/public/web/WebHistoryItem.h"
|
| -#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
| -#include "third_party/WebKit/public/web/WebNode.h"
|
| -#include "third_party/WebKit/public/web/WebPagePopup.h"
|
| -#include "third_party/WebKit/public/web/WebPluginParams.h"
|
| -#include "third_party/WebKit/public/web/WebPrintParams.h"
|
| -#include "third_party/WebKit/public/web/WebRange.h"
|
| -#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
|
| -#include "third_party/WebKit/public/web/WebView.h"
|
|
|
| namespace test_runner {
|
|
|
| namespace {
|
|
|
| -class LayoutAndPaintCallback : public blink::WebLayoutAndPaintAsyncCallback {
|
| - public:
|
| - LayoutAndPaintCallback(const base::Closure& callback)
|
| - : callback_(callback), wait_for_popup_(false) {
|
| - }
|
| - virtual ~LayoutAndPaintCallback() {
|
| - }
|
| -
|
| - void set_wait_for_popup(bool wait) { wait_for_popup_ = wait; }
|
| -
|
| - // WebLayoutAndPaintAsyncCallback implementation.
|
| - void didLayoutAndPaint() override;
|
| -
|
| - private:
|
| - base::Closure callback_;
|
| - bool wait_for_popup_;
|
| -};
|
| -
|
| std::string DumpAllBackForwardLists(TestInterfaces* interfaces,
|
| WebTestDelegate* delegate) {
|
| std::string result;
|
| @@ -96,30 +48,6 @@ std::string WebTestProxyBase::DumpBackForwardLists() {
|
| return DumpAllBackForwardLists(test_interfaces_, delegate_);
|
| }
|
|
|
| -void LayoutAndPaintCallback::didLayoutAndPaint() {
|
| - TRACE_EVENT0("shell", "LayoutAndPaintCallback::didLayoutAndPaint");
|
| - if (wait_for_popup_) {
|
| - wait_for_popup_ = false;
|
| - return;
|
| - }
|
| -
|
| - if (!callback_.is_null())
|
| - callback_.Run();
|
| - delete this;
|
| -}
|
| -
|
| -void WebTestProxyBase::LayoutAndPaintAsyncThen(const base::Closure& callback) {
|
| - TRACE_EVENT0("shell", "WebTestProxyBase::LayoutAndPaintAsyncThen");
|
| -
|
| - LayoutAndPaintCallback* layout_and_paint_callback =
|
| - new LayoutAndPaintCallback(callback);
|
| - web_widget_->layoutAndPaintAsync(layout_and_paint_callback);
|
| - if (blink::WebPagePopup* popup = web_widget_->pagePopup()) {
|
| - layout_and_paint_callback->set_wait_for_popup(true);
|
| - popup->layoutAndPaintAsync(layout_and_paint_callback);
|
| - }
|
| -}
|
| -
|
| void WebTestProxyBase::GetScreenOrientationForTesting(
|
| blink::WebScreenInfo& screen_info) {
|
| MockScreenOrientationClient* mock_client =
|
|
|