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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_documents_service_browsertest.cc

Issue 10827018: gdata: Rename functions in GDataAuthService per OAuth2 terminology (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 5 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" 10 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h"
(...skipping 12 matching lines...) Expand all
23 : InProcessBrowserTest(), 23 : InProcessBrowserTest(),
24 gdata_test_server_(net::TestServer::TYPE_GDATA, 24 gdata_test_server_(net::TestServer::TYPE_GDATA,
25 net::TestServer::kLocalhost, 25 net::TestServer::kLocalhost,
26 FilePath(FILE_PATH_LITERAL("chrome/test/data"))) { 26 FilePath(FILE_PATH_LITERAL("chrome/test/data"))) {
27 } 27 }
28 28
29 virtual void SetUpOnMainThread() OVERRIDE { 29 virtual void SetUpOnMainThread() OVERRIDE {
30 ASSERT_TRUE(gdata_test_server_.Start()); 30 ASSERT_TRUE(gdata_test_server_.Start());
31 service_.reset(new gdata::DocumentsService); 31 service_.reset(new gdata::DocumentsService);
32 service_->Initialize(browser()->profile()); 32 service_->Initialize(browser()->profile());
33 service_->auth_service_for_testing()->set_oauth2_auth_token_for_testing( 33 service_->auth_service_for_testing()->set_access_token_for_testing(
34 net::TestServer::kGDataAuthToken); 34 net::TestServer::kGDataAuthToken);
35 } 35 }
36 36
37 virtual void CleanUpOnMainThread() { 37 virtual void CleanUpOnMainThread() {
38 service_.reset(); 38 service_.reset();
39 } 39 }
40 40
41 protected: 41 protected:
42 FilePath GetTestCachedFilePath(const FilePath& file_name) { 42 FilePath GetTestCachedFilePath(const FilePath& file_name) {
43 return browser()->profile()->GetPath().Append(file_name); 43 return browser()->profile()->GetPath().Append(file_name);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 gdata_test_server_.GetURL("files/chromeos/gdata/testfile.txt"), 137 gdata_test_server_.GetURL("files/chromeos/gdata/testfile.txt"),
138 0, // start_changestamp 138 0, // start_changestamp
139 std::string(), // search string 139 std::string(), // search string
140 std::string(), // directory resource ID 140 std::string(), // directory resource ID
141 base::Bind(&TestGetDocumentsCallback, &result, &result_data)); 141 base::Bind(&TestGetDocumentsCallback, &result, &result_data));
142 ui_test_utils::RunMessageLoop(); 142 ui_test_utils::RunMessageLoop();
143 143
144 EXPECT_EQ(gdata::GDATA_PARSE_ERROR, result); 144 EXPECT_EQ(gdata::GDATA_PARSE_ERROR, result);
145 EXPECT_FALSE(result_data); 145 EXPECT_FALSE(result_data);
146 } 146 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_documents_service.cc ('k') | chrome/browser/chromeos/gdata/gdata_operation_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698