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

Unified Diff: chrome/test/chromedriver/commands_unittest.cc

Issue 12226026: [ChromeDriver] Select the main frame if a non-existant child frame is targeted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/chromedriver/devtools_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/commands_unittest.cc
diff --git a/chrome/test/chromedriver/commands_unittest.cc b/chrome/test/chromedriver/commands_unittest.cc
index c041e892aca52d06b5b4dcf916ded4a73ad574c5..fea0e878070856ee20c86dbf132828c3f9fa5f41 100644
--- a/chrome/test/chromedriver/commands_unittest.cc
+++ b/chrome/test/chromedriver/commands_unittest.cc
@@ -11,11 +11,11 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "base/values.h"
-#include "chrome/test/chromedriver/chrome.h"
#include "chrome/test/chromedriver/command_executor_impl.h"
#include "chrome/test/chromedriver/commands.h"
#include "chrome/test/chromedriver/fake_session_accessor.h"
#include "chrome/test/chromedriver/status.h"
+#include "chrome/test/chromedriver/stub_chrome.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webdriver/atoms.h"
@@ -35,55 +35,6 @@ TEST(CommandsTest, GetStatus) {
namespace {
-class StubChrome : public Chrome {
- public:
- StubChrome() {}
- virtual ~StubChrome() {}
-
- // Overridden from Chrome:
- virtual Status Load(const std::string& url) OVERRIDE {
- return Status(kOk);
- }
- virtual Status Reload() OVERRIDE {
- return Status(kOk);
- }
- virtual Status EvaluateScript(const std::string& frame,
- const std::string& function,
- scoped_ptr<base::Value>* result) OVERRIDE {
- return Status(kOk);
- }
- virtual Status CallFunction(const std::string& frame,
- const std::string& function,
- const base::ListValue& args,
- scoped_ptr<base::Value>* result) OVERRIDE {
- return Status(kOk);
- }
- virtual Status GetFrameByFunction(const std::string& frame,
- const std::string& function,
- const base::ListValue& args,
- std::string* out_frame) OVERRIDE {
- return Status(kOk);
- }
- virtual Status DispatchMouseEvents(
- const std::list<MouseEvent>& events) OVERRIDE {
- return Status(kOk);
- }
- virtual Status DispatchKeyEvents(const std::list<KeyEvent>& events) OVERRIDE {
- return Status(kOk);
- }
- virtual Status Quit() OVERRIDE {
- return Status(kOk);
- }
- virtual Status WaitForPendingNavigations(
- const std::string& frame_id) OVERRIDE {
- return Status(kOk);
- }
- virtual Status GetMainFrame(
- std::string* frame_id) OVERRIDE {
- return Status(kOk);
- }
-};
-
Status ExecuteStubQuit(
int* count,
const base::DictionaryValue& params,
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/chromedriver/devtools_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698