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

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

Issue 8649004: Allow chromedriver to install an extension and get all installed extension IDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 1 month 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/test/webdriver/commands/chrome_commands.cc ('k') | chrome/test/webdriver/test/chromedriver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/commands/target_locator_commands.cc
diff --git a/chrome/test/webdriver/commands/target_locator_commands.cc b/chrome/test/webdriver/commands/target_locator_commands.cc
index f554b70e23c406df60939b01a00c29a568439e83..d1b9932aa2e530308e8d13483827958f450557b5 100644
--- a/chrome/test/webdriver/commands/target_locator_commands.cc
+++ b/chrome/test/webdriver/commands/target_locator_commands.cc
@@ -26,7 +26,7 @@ bool WindowHandleCommand::DoesGet() {
void WindowHandleCommand::ExecuteGet(Response* const response) {
response->SetValue(new StringValue(
- base::IntToString(session_->current_target().window_id)));
+ base::IntToString(session_->current_target().view_id.id.tab_id))); // FIXME
}
WindowHandlesCommand::WindowHandlesCommand(
@@ -41,16 +41,20 @@ bool WindowHandlesCommand::DoesGet() {
}
void WindowHandlesCommand::ExecuteGet(Response* const response) {
- std::vector<int> window_ids;
- Error* error = session_->GetWindowIds(&window_ids);
+ std::vector<WebViewInfo> views;
+ Error* error = session_->GetViews(&views);
if (error) {
response->SetError(error);
return;
}
- ListValue* id_list = new ListValue();
- for (size_t i = 0; i < window_ids.size(); ++i)
- id_list->Append(new StringValue(base::IntToString(window_ids[i])));
- response->SetValue(id_list);
+ base::ListValue* views_list = new base::ListValue();
+ for (size_t i = 0; i < views.size(); ++i) {
+ if (views[i].view_id.type != WebViewId::kTypeTabId)
+ continue;
+ views_list->Append(base::Value::CreateStringValue(
+ base::IntToString(views[i].view_id.id.tab_id)));
+ }
+ response->SetValue(views_list);
}
WindowCommand::WindowCommand(
@@ -76,7 +80,7 @@ void WindowCommand::ExecutePost(Response* const response) {
return;
}
- Error* error = session_->SwitchToWindow(name);
+ Error* error = session_->SwitchToView(name);
if (error)
response->SetError(error);
}
« no previous file with comments | « chrome/test/webdriver/commands/chrome_commands.cc ('k') | chrome/test/webdriver/test/chromedriver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698