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

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

Issue 6368094: -Wuninitialized fixes 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/indexed_db_param_traits.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/find_element_commands.h" 5 #include "chrome/test/webdriver/commands/find_element_commands.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Searching under a custom root if the URL pattern is 45 // Searching under a custom root if the URL pattern is
46 // "/session/$session/element/$id/element(s)" 46 // "/session/$session/element/$id/element(s)"
47 root_element_id_ = GetPathVariable(4); 47 root_element_id_ = GetPathVariable(4);
48 48
49 return true; 49 return true;
50 } 50 }
51 51
52 void FindElementCommand::ExecutePost(Response* const response) { 52 void FindElementCommand::ExecutePost(Response* const response) {
53 scoped_ptr<ListValue> args(new ListValue()); 53 scoped_ptr<ListValue> args(new ListValue());
54 DictionaryValue* locator = new DictionaryValue(); 54 DictionaryValue* locator = new DictionaryValue();
55 ErrorCode error; 55 ErrorCode error = 0; // clang (complex flow)
56 std::wstring jscript; 56 std::wstring jscript;
57 Value* result = NULL; 57 Value* result = NULL;
58 bool done = false; 58 bool done = false;
59 59
60 // Set the command we are using to locate the value beging searched for. 60 // Set the command we are using to locate the value beging searched for.
61 locator->SetString(use_, value_); 61 locator->SetString(use_, value_);
62 args->Append(locator); 62 args->Append(locator);
63 args->Append(root_element_id_.size() == 0 ? Value::CreateNullValue() : 63 args->Append(root_element_id_.size() == 0 ? Value::CreateNullValue() :
64 WebDriverCommand::GetElementIdAsDictionaryValue(root_element_id_)); 64 WebDriverCommand::GetElementIdAsDictionaryValue(root_element_id_));
65 if (find_one_element_) { 65 if (find_one_element_) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 done = done || elapsed_time > session_->implicit_wait(); 103 done = done || elapsed_time > session_->implicit_wait();
104 base::PlatformThread::Sleep(50); // Prevent a busy loop that eats the cpu. 104 base::PlatformThread::Sleep(50); // Prevent a busy loop that eats the cpu.
105 } 105 }
106 106
107 response->set_value(result); 107 response->set_value(result);
108 response->set_status(error); 108 response->set_status(error);
109 } 109 }
110 110
111 } // namespace webdriver 111 } // namespace webdriver
112 112
OLDNEW
« no previous file with comments | « chrome/common/indexed_db_param_traits.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698