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

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

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 7 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/test/chromedriver/chrome/web_view_impl.cc ('k') | chrome/test/chromedriver/server/http_handler.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 f6584e47b01829c7e28e893d2ffa788079e50661..b5320c2c979f2ce8ee51c52990275abc4411e382 100644
--- a/chrome/test/chromedriver/commands_unittest.cc
+++ b/chrome/test/chromedriver/commands_unittest.cc
@@ -360,7 +360,7 @@ class FindElementWebView : public StubWebView {
}
case kElementNotExistsQueryOnce: {
if (only_one_)
- result_.reset(base::Value::CreateNullValue());
+ result_ = base::Value::CreateNullValue();
else
result_.reset(new base::ListValue());
break;
@@ -395,7 +395,7 @@ class FindElementWebView : public StubWebView {
(scenario_ == kElementExistsQueryTwice && current_count_ == 1)) {
// Always return empty result when testing timeout.
if (only_one_)
- result->reset(base::Value::CreateNullValue());
+ *result = base::Value::CreateNullValue();
else
result->reset(new base::ListValue());
} else {
@@ -414,10 +414,10 @@ class FindElementWebView : public StubWebView {
}
}
- result->reset(result_->DeepCopy());
+ *result = result_->CreateDeepCopy();
frame_ = frame;
function_ = function;
- args_.reset(args.DeepCopy());
+ args_ = args.CreateDeepCopy();
}
return Status(kOk);
}
« no previous file with comments | « chrome/test/chromedriver/chrome/web_view_impl.cc ('k') | chrome/test/chromedriver/server/http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698