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

Side by Side Diff: chrome/test/webdriver/commands/chrome_commands.cc

Issue 9288051: Implement the webdriver window sizing commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/test/webdriver/commands/chrome_commands.h" 5 #include "chrome/test/webdriver/commands/chrome_commands.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 std::vector<WebViewInfo> views; 239 std::vector<WebViewInfo> views;
240 Error* error = session_->GetViews(&views); 240 Error* error = session_->GetViews(&views);
241 if (error) { 241 if (error) {
242 response->SetError(error); 242 response->SetError(error);
243 return; 243 return;
244 } 244 }
245 ListValue* views_list = new ListValue(); 245 ListValue* views_list = new ListValue();
246 for (size_t i = 0; i < views.size(); ++i) { 246 for (size_t i = 0; i < views.size(); ++i) {
247 DictionaryValue* dict = new DictionaryValue(); 247 DictionaryValue* dict = new DictionaryValue();
248 AutomationId id = views[i].view_id.GetId(); 248 AutomationId id = views[i].view_id.GetId();
249 dict->SetString("handle", JsonStringify(id.ToValue())); 249 dict->SetString("handle", WebViewIdToString(WebViewId::ForView(id)));
250 dict->SetInteger("type", id.type()); 250 dict->SetInteger("type", id.type());
251 if (!views[i].extension_id.empty()) 251 if (!views[i].extension_id.empty())
252 dict->SetString("extension_id", views[i].extension_id); 252 dict->SetString("extension_id", views[i].extension_id);
253 views_list->Append(dict); 253 views_list->Append(dict);
254 } 254 }
255 response->SetValue(views_list); 255 response->SetValue(views_list);
256 } 256 }
257 257
258 } // namespace webdriver 258 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_json_requests.cc ('k') | chrome/test/webdriver/commands/window_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698