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

Side by Side Diff: chrome/browser/google_apis/base_operations_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/google_apis/base_operations.h" 5 #include "chrome/browser/google_apis/base_operations.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void GetDataCallback(GDataErrorCode error, scoped_ptr<base::Value> value) { 60 void GetDataCallback(GDataErrorCode error, scoped_ptr<base::Value> value) {
61 get_data_result_error_ = error; 61 get_data_result_error_ = error;
62 get_data_result_value_ = value.Pass(); 62 get_data_result_value_ = value.Pass();
63 get_data_callback_called_ = true; 63 get_data_callback_called_ = true;
64 } 64 }
65 65
66 virtual void SetUp() OVERRIDE { 66 virtual void SetUp() OVERRIDE {
67 profile_.reset(new TestingProfile); 67 profile_.reset(new TestingProfile);
68 runner_.reset(new OperationRunner(profile_.get(), 68 runner_.reset(new OperationRunner(profile_.get(),
69 NULL /* url_request_context_getter */, 69 NULL /* url_request_context_getter */,
70 std::vector<std::string>() /* scopes */, 70 std::vector<std::string>() /* scopes */,
71 "" /* custom user agent */)); 71 std::string() /* custom user agent */));
72 runner_->Initialize(); 72 runner_->Initialize();
73 LOG(ERROR) << "Initialized."; 73 LOG(ERROR) << "Initialized.";
74 } 74 }
75 75
76 MessageLoopForUI message_loop_; 76 MessageLoopForUI message_loop_;
77 content::TestBrowserThread ui_thread_; 77 content::TestBrowserThread ui_thread_;
78 scoped_ptr<TestingProfile> profile_; 78 scoped_ptr<TestingProfile> profile_;
79 scoped_ptr<OperationRunner> runner_; 79 scoped_ptr<OperationRunner> runner_;
80 80
81 // Following members stores data returned with callbacks to be verified 81 // Following members stores data returned with callbacks to be verified
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Should wait for a blocking pool task, as the JSON parsing is done in the 148 // Should wait for a blocking pool task, as the JSON parsing is done in the
149 // blocking pool. 149 // blocking pool.
150 test_util::RunBlockingPoolTask(); 150 test_util::RunBlockingPoolTask();
151 151
152 ASSERT_TRUE(get_data_callback_called_); 152 ASSERT_TRUE(get_data_callback_called_);
153 ASSERT_EQ(GDATA_PARSE_ERROR, get_data_result_error_); 153 ASSERT_EQ(GDATA_PARSE_ERROR, get_data_result_error_);
154 ASSERT_FALSE(get_data_result_value_.get()); 154 ASSERT_FALSE(get_data_result_value_.get());
155 } 155 }
156 156
157 } // namespace google_apis 157 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/base_operations.cc ('k') | chrome/browser/google_apis/drive_api_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698