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

Unified Diff: chrome/test/webdriver/commands/source_command.cc

Issue 6523032: Even more test cleanup. Some fixes to non-test code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: chrome/test/webdriver/commands/source_command.cc
diff --git a/chrome/test/webdriver/commands/source_command.cc b/chrome/test/webdriver/commands/source_command.cc
index 706d3eae8a858b42235b768b8bc1fdcf398f10c9..1e6b653189e6b5b6eb2d2f06b819a34633e86ed7 100644
--- a/chrome/test/webdriver/commands/source_command.cc
+++ b/chrome/test/webdriver/commands/source_command.cc
@@ -15,6 +15,16 @@ const wchar_t* const kSource[] = {
L"new XMLSerializer().serializeToString(document));",
};
+SourceCommand::SourceCommand(const std::vector<std::string>& path_segments,
+ const DictionaryValue* const parameters)
+ : WebDriverCommand(path_segments, parameters) {}
+
+SourceCommand::~SourceCommand() {}
+
+bool SourceCommand::DoesGet() {
+ return true;
+}
+
void SourceCommand::ExecuteGet(Response* const response) {
std::string jscript = build_atom(kSource, sizeof kSource);
Value* result = NULL;
@@ -33,4 +43,8 @@ void SourceCommand::ExecuteGet(Response* const response) {
response->set_status(kSuccess);
}
+bool SourceCommand::RequiresValidTab() {
+ return true;
+}
+
} // namespace webdriver

Powered by Google App Engine
This is Rietveld 408576698