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

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

Issue 1840823002: Extract WebViewClient implementation out of WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@separate-pixel-dump-code
Patch Set: Expanding a comment + an IWYU fix. Created 4 years, 8 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/test_runner.gyp ('k') | components/test_runner/web_frame_test_proxy.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/test_runner/web_frame_test_client.h" 5 #include "components/test_runner/web_frame_test_client.h"
6 6
7 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
9 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
11 #include "components/test_runner/accessibility_controller.h" 12 #include "components/test_runner/accessibility_controller.h"
12 #include "components/test_runner/event_sender.h" 13 #include "components/test_runner/event_sender.h"
13 #include "components/test_runner/mock_color_chooser.h" 14 #include "components/test_runner/mock_color_chooser.h"
14 #include "components/test_runner/mock_screen_orientation_client.h" 15 #include "components/test_runner/mock_screen_orientation_client.h"
15 #include "components/test_runner/mock_web_user_media_client.h" 16 #include "components/test_runner/mock_web_user_media_client.h"
16 #include "components/test_runner/test_common.h" 17 #include "components/test_runner/test_common.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } // namespace 196 } // namespace
196 197
197 WebFrameTestClient::WebFrameTestClient( 198 WebFrameTestClient::WebFrameTestClient(
198 TestRunner* test_runner, 199 TestRunner* test_runner,
199 WebTestDelegate* delegate, 200 WebTestDelegate* delegate,
200 AccessibilityController* accessibility_controller, 201 AccessibilityController* accessibility_controller,
201 EventSender* event_sender) 202 EventSender* event_sender)
202 : test_runner_(test_runner), 203 : test_runner_(test_runner),
203 delegate_(delegate), 204 delegate_(delegate),
204 accessibility_controller_(accessibility_controller), 205 accessibility_controller_(accessibility_controller),
205 event_sender_(event_sender) {} 206 event_sender_(event_sender) {
207 DCHECK(test_runner);
208 DCHECK(delegate_);
209 DCHECK(accessibility_controller_);
210 DCHECK(event_sender_);
211 }
206 212
207 WebFrameTestClient::~WebFrameTestClient() {} 213 WebFrameTestClient::~WebFrameTestClient() {}
208 214
209 blink::WebColorChooser* WebFrameTestClient::createColorChooser( 215 blink::WebColorChooser* WebFrameTestClient::createColorChooser(
210 blink::WebColorChooserClient* client, 216 blink::WebColorChooserClient* client,
211 const blink::WebColor& color, 217 const blink::WebColor& color,
212 const blink::WebVector<blink::WebColorSuggestion>& suggestions) { 218 const blink::WebVector<blink::WebColorSuggestion>& suggestions) {
213 // This instance is deleted by WebCore::ColorInputType 219 // This instance is deleted by WebCore::ColorInputType
214 return new MockColorChooser(client, delegate_, test_runner_); 220 return new MockColorChooser(client, delegate_, test_runner_);
215 } 221 }
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 std::string device_id = sink_id.utf8(); 762 std::string device_id = sink_id.utf8();
757 if (device_id == "valid" || device_id.empty()) 763 if (device_id == "valid" || device_id.empty())
758 callback->onSuccess(); 764 callback->onSuccess();
759 else if (device_id == "unauthorized") 765 else if (device_id == "unauthorized")
760 callback->onError(blink::WebSetSinkIdError::NotAuthorized); 766 callback->onError(blink::WebSetSinkIdError::NotAuthorized);
761 else 767 else
762 callback->onError(blink::WebSetSinkIdError::NotFound); 768 callback->onError(blink::WebSetSinkIdError::NotFound);
763 } 769 }
764 770
765 } // namespace test_runner 771 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.gyp ('k') | components/test_runner/web_frame_test_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698