| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |