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

Side by Side Diff: chrome/browser/remoting/directory_add_request_unittest.cc

Issue 6166010: net: Remove typedef net::URLRequestStatus URLRequestStatus; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 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/browser/remoting/directory_add_request.h" 5 #include "chrome/browser/remoting/directory_add_request.h"
6 #include "chrome/test/testing_profile.h" 6 #include "chrome/test/testing_profile.h"
7 #include "net/url_request/url_request_status.h" 7 #include "net/url_request/url_request_status.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace remoting { 11 namespace remoting {
(...skipping 17 matching lines...) Expand all
29 DirectoryAddRequest::Result expected_result, 29 DirectoryAddRequest::Result expected_result,
30 const std::string& expected_message) { 30 const std::string& expected_message) {
31 MockDoneCallback callback; 31 MockDoneCallback callback;
32 EXPECT_CALL(callback, OnDone(expected_result, expected_message)) 32 EXPECT_CALL(callback, OnDone(expected_result, expected_message))
33 .Times(1); 33 .Times(1);
34 34
35 target_->done_callback_.reset( 35 target_->done_callback_.reset(
36 NewCallback(&callback, &MockDoneCallback::OnDone)); 36 NewCallback(&callback, &MockDoneCallback::OnDone));
37 37
38 GURL url; 38 GURL url;
39 URLRequestStatus status_ok; 39 net::URLRequestStatus status_ok;
40 ResponseCookies cookies; 40 ResponseCookies cookies;
41 target_->OnURLFetchComplete(NULL, url, status_ok, response_code, 41 target_->OnURLFetchComplete(NULL, url, status_ok, response_code,
42 cookies, data); 42 cookies, data);
43 } 43 }
44 44
45 TestingProfile profile_; 45 TestingProfile profile_;
46 scoped_ptr<DirectoryAddRequest> target_; 46 scoped_ptr<DirectoryAddRequest> target_;
47 }; 47 };
48 48
49 TEST_F(DirectoryAddRequestTest, Success) { 49 TEST_F(DirectoryAddRequestTest, Success) {
(...skipping 23 matching lines...) Expand all
73 TEST_F(DirectoryAddRequestTest, InvalidToken) { 73 TEST_F(DirectoryAddRequestTest, InvalidToken) {
74 TestResult(401, "{\"error\":{\"errors\":[{\"domain\":\"global\"," 74 TestResult(401, "{\"error\":{\"errors\":[{\"domain\":\"global\","
75 "\"reason\":\"invalid\",\"message\":\"Token invalid\"," 75 "\"reason\":\"invalid\",\"message\":\"Token invalid\","
76 "\"locationType\":\"header\",\"location\":\"Authorization\"}]," 76 "\"locationType\":\"header\",\"location\":\"Authorization\"}],"
77 "\"code\":401,\"message\":\"Token invalid\"}}", 77 "\"code\":401,\"message\":\"Token invalid\"}}",
78 DirectoryAddRequest::ERROR_AUTH, 78 DirectoryAddRequest::ERROR_AUTH,
79 "Token invalid"); 79 "Token invalid");
80 } 80 }
81 81
82 } // namespace remoting 82 } // namespace remoting
OLDNEW
« no previous file with comments | « chrome/browser/remoting/directory_add_request.cc ('k') | chrome/browser/renderer_host/async_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698