OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/values.h" | |
6 #include "chrome/test/chromedriver/status.h" | |
7 #include "chrome/test/chromedriver/stub_web_view.h" | |
8 #include "chrome/test/chromedriver/ui_events.h" | |
9 | |
10 StubWebView::StubWebView(const std::string& id) : id_(id) {} | |
11 | |
12 StubWebView::~StubWebView() {} | |
13 | |
14 std::string StubWebView::GetId() { | |
15 return id_; | |
16 } | |
17 | |
18 Status StubWebView::ConnectIfNecessary() { | |
19 return Status(kOk); | |
20 } | |
21 | |
22 Status StubWebView::Close() { | |
23 return Status(kOk); | |
24 } | |
25 | |
26 Status StubWebView::Load(const std::string& url) { | |
27 return Status(kOk); | |
28 } | |
29 | |
30 Status StubWebView::Reload() { | |
31 return Status(kOk); | |
32 } | |
33 | |
34 Status StubWebView::EvaluateScript(const std::string& frame, | |
35 const std::string& function, | |
36 scoped_ptr<base::Value>* result) { | |
37 return Status(kOk); | |
38 } | |
39 | |
40 Status StubWebView::CallFunction(const std::string& frame, | |
41 const std::string& function, | |
42 const base::ListValue& args, | |
43 scoped_ptr<base::Value>* result) { | |
44 return Status(kOk); | |
45 } | |
46 | |
47 Status StubWebView::GetFrameByFunction(const std::string& frame, | |
48 const std::string& function, | |
49 const base::ListValue& args, | |
50 std::string* out_frame) { | |
51 return Status(kOk); | |
52 } | |
53 | |
54 Status StubWebView::DispatchMouseEvents(const std::list<MouseEvent>& events) { | |
55 return Status(kOk); | |
56 } | |
57 | |
58 Status StubWebView::DispatchKeyEvents(const std::list<KeyEvent>& events) { | |
59 return Status(kOk); | |
60 } | |
61 | |
62 Status StubWebView::GetCookies(scoped_ptr<base::ListValue>* cookies) { | |
63 return Status(kOk); | |
64 } | |
65 | |
66 Status StubWebView::DeleteCookie(const std::string& name, | |
67 const std::string& url) { | |
68 return Status(kOk); | |
69 } | |
70 | |
71 Status StubWebView::WaitForPendingNavigations(const std::string& frame_id) { | |
72 return Status(kOk); | |
73 } | |
74 | |
75 Status StubWebView::IsPendingNavigation(const std::string& frame_id, | |
76 bool* is_pending) { | |
77 return Status(kOk); | |
78 } | |
79 | |
80 Status StubWebView::GetMainFrame(std::string* frame_id) { | |
81 return Status(kOk); | |
82 } | |
83 | |
84 JavaScriptDialogManager* StubWebView::GetJavaScriptDialogManager() { | |
85 return NULL; | |
86 } | |
87 | |
88 Status StubWebView::CaptureScreenshot(std::string* screenshot) { | |
89 return Status(kOk); | |
90 } | |
OLD | NEW |