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

Side by Side Diff: net/websockets/websocket_job_unittest.cc

Issue 3040016: Net: Convert username and password to string16. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments Created 10 years, 4 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 | « net/websockets/websocket_job.cc ('k') | no next file » | 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/base/cookie_policy.h" 10 #include "net/base/cookie_policy.h"
(...skipping 17 matching lines...) Expand all
28 virtual ~MockSocketStream() {} 28 virtual ~MockSocketStream() {}
29 29
30 virtual void Connect() {} 30 virtual void Connect() {}
31 virtual bool SendData(const char* data, int len) { 31 virtual bool SendData(const char* data, int len) {
32 sent_data_ += std::string(data, len); 32 sent_data_ += std::string(data, len);
33 return true; 33 return true;
34 } 34 }
35 35
36 virtual void Close() {} 36 virtual void Close() {}
37 virtual void RestartWithAuth( 37 virtual void RestartWithAuth(
38 const std::wstring& username, const std::wstring& password) {} 38 const string16& username, const string16& password) {}
39 virtual void DetachDelegate() { 39 virtual void DetachDelegate() {
40 delegate_ = NULL; 40 delegate_ = NULL;
41 } 41 }
42 42
43 const std::string& sent_data() const { 43 const std::string& sent_data() const {
44 return sent_data_; 44 return sent_data_;
45 } 45 }
46 46
47 private: 47 private:
48 std::string sent_data_; 48 std::string sent_data_;
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 EXPECT_EQ(2U, cookie_store_->entries().size()); 513 EXPECT_EQ(2U, cookie_store_->entries().size());
514 EXPECT_EQ(cookieUrl, cookie_store_->entries()[0].url); 514 EXPECT_EQ(cookieUrl, cookie_store_->entries()[0].url);
515 EXPECT_EQ("CR-test=1", cookie_store_->entries()[0].cookie_line); 515 EXPECT_EQ("CR-test=1", cookie_store_->entries()[0].cookie_line);
516 EXPECT_EQ(cookieUrl, cookie_store_->entries()[1].url); 516 EXPECT_EQ(cookieUrl, cookie_store_->entries()[1].url);
517 EXPECT_EQ("CR-test-httponly=1", cookie_store_->entries()[1].cookie_line); 517 EXPECT_EQ("CR-test-httponly=1", cookie_store_->entries()[1].cookie_line);
518 518
519 CloseWebSocketJob(); 519 CloseWebSocketJob();
520 } 520 }
521 521
522 } // namespace net 522 } // namespace net
OLDNEW
« no previous file with comments | « net/websockets/websocket_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698