Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: components/test_runner/web_test_proxy.cc

Issue 1167703002: Move test runner to a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/test_runner/web_test_proxy.h ('k') | components/test_runner/web_test_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/trace_event/trace_event.h" 15 #include "base/trace_event/trace_event.h"
16 #include "content/shell/renderer/test_runner/accessibility_controller.h" 16 #include "components/test_runner/accessibility_controller.h"
17 #include "content/shell/renderer/test_runner/event_sender.h" 17 #include "components/test_runner/event_sender.h"
18 #include "content/shell/renderer/test_runner/mock_color_chooser.h" 18 #include "components/test_runner/mock_color_chooser.h"
19 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" 19 #include "components/test_runner/mock_credential_manager_client.h"
20 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" 20 #include "components/test_runner/mock_screen_orientation_client.h"
21 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" 21 #include "components/test_runner/mock_web_speech_recognizer.h"
22 #include "content/shell/renderer/test_runner/mock_web_user_media_client.h" 22 #include "components/test_runner/mock_web_user_media_client.h"
23 #include "content/shell/renderer/test_runner/spell_check_client.h" 23 #include "components/test_runner/spell_check_client.h"
24 #include "content/shell/renderer/test_runner/test_interfaces.h" 24 #include "components/test_runner/test_interfaces.h"
25 #include "content/shell/renderer/test_runner/test_plugin.h" 25 #include "components/test_runner/test_plugin.h"
26 #include "content/shell/renderer/test_runner/test_runner.h" 26 #include "components/test_runner/test_runner.h"
27 #include "content/shell/renderer/test_runner/web_test_delegate.h" 27 #include "components/test_runner/web_test_delegate.h"
28 #include "content/shell/renderer/test_runner/web_test_interfaces.h" 28 #include "components/test_runner/web_test_interfaces.h"
29 #include "content/shell/renderer/test_runner/web_test_runner.h" 29 #include "components/test_runner/web_test_runner.h"
30 // FIXME: Including platform_canvas.h here is a layering violation. 30 // FIXME: Including platform_canvas.h here is a layering violation.
31 #include "skia/ext/platform_canvas.h" 31 #include "skia/ext/platform_canvas.h"
32 #include "third_party/WebKit/public/platform/Platform.h" 32 #include "third_party/WebKit/public/platform/Platform.h"
33 #include "third_party/WebKit/public/platform/WebCString.h" 33 #include "third_party/WebKit/public/platform/WebCString.h"
34 #include "third_party/WebKit/public/platform/WebClipboard.h" 34 #include "third_party/WebKit/public/platform/WebClipboard.h"
35 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h" 35 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac k.h"
36 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h" 36 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h"
37 #include "third_party/WebKit/public/platform/WebURLError.h" 37 #include "third_party/WebKit/public/platform/WebURLError.h"
38 #include "third_party/WebKit/public/platform/WebURLRequest.h" 38 #include "third_party/WebKit/public/platform/WebURLRequest.h"
39 #include "third_party/WebKit/public/platform/WebURLResponse.h" 39 #include "third_party/WebKit/public/platform/WebURLResponse.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 &WebTestProxyBase::DidCapturePixelsAsync, base::Unretained(this), 631 &WebTestProxyBase::DidCapturePixelsAsync, base::Unretained(this),
632 callback)); 632 callback));
633 web_widget_->compositeAndReadbackAsync(capture_callback); 633 web_widget_->compositeAndReadbackAsync(capture_callback);
634 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) { 634 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) {
635 capture_callback->set_wait_for_popup(true); 635 capture_callback->set_wait_for_popup(true);
636 capture_callback->set_popup_position(popup->positionRelativeToOwner()); 636 capture_callback->set_popup_position(popup->positionRelativeToOwner());
637 popup->compositeAndReadbackAsync(capture_callback); 637 popup->compositeAndReadbackAsync(capture_callback);
638 } 638 }
639 } 639 }
640 640
641 void WebTestProxyBase::DidCapturePixelsAsync(const base::Callback<void(const SkB itmap&)>& callback, 641 void WebTestProxyBase::DidCapturePixelsAsync(
642 const SkBitmap& bitmap) { 642 const base::Callback<void(const SkBitmap&)>& callback,
643 const SkBitmap& bitmap) {
643 SkCanvas canvas(bitmap); 644 SkCanvas canvas(bitmap);
644 DrawSelectionRect(&canvas); 645 DrawSelectionRect(&canvas);
645 if (!callback.is_null()) 646 if (!callback.is_null())
646 callback.Run(bitmap); 647 callback.Run(bitmap);
647 } 648 }
648 649
649 void WebTestProxyBase::SetLogConsoleOutput(bool enabled) { 650 void WebTestProxyBase::SetLogConsoleOutput(bool enabled) {
650 log_console_output_ = enabled; 651 log_console_output_ = enabled;
651 } 652 }
652 653
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 // to cancel the input method's ongoing composition session. 1394 // to cancel the input method's ongoing composition session.
1394 if (web_widget_) 1395 if (web_widget_)
1395 web_widget_->confirmComposition(); 1396 web_widget_->confirmComposition();
1396 } 1397 }
1397 1398
1398 blink::WebString WebTestProxyBase::acceptLanguages() { 1399 blink::WebString WebTestProxyBase::acceptLanguages() {
1399 return blink::WebString::fromUTF8(accept_languages_); 1400 return blink::WebString::fromUTF8(accept_languages_);
1400 } 1401 }
1401 1402
1402 } // namespace content 1403 } // namespace content
OLDNEW
« no previous file with comments | « components/test_runner/web_test_proxy.h ('k') | components/test_runner/web_test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698