| OLD | NEW |
| 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 <map> | 5 #include <map> |
| 6 #include <queue> | 6 #include <queue> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 SentMessages::const_iterator sent_begin() const { | 146 SentMessages::const_iterator sent_begin() const { |
| 147 return sent_messages_.begin(); | 147 return sent_messages_.begin(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 SentMessages::const_iterator sent_end() const { | 150 SentMessages::const_iterator sent_end() const { |
| 151 return sent_messages_.end(); | 151 return sent_messages_.end(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 private: | 154 private: |
| 155 // IPC::Sender | 155 // IPC::Sender |
| 156 virtual bool Send(IPC::Message* message) { | 156 virtual bool Send(IPC::Message* message) OVERRIDE { |
| 157 EXPECT_EQ(ExtensionMsg_MessageInvoke::ID, message->type()); | 157 EXPECT_EQ(ExtensionMsg_MessageInvoke::ID, message->type()); |
| 158 | 158 |
| 159 EXPECT_FALSE(task_queue_.empty()); | 159 EXPECT_FALSE(task_queue_.empty()); |
| 160 MessageLoop::current()->PostTask(FROM_HERE, task_queue_.front()); | 160 MessageLoop::current()->PostTask(FROM_HERE, task_queue_.front()); |
| 161 task_queue_.pop(); | 161 task_queue_.pop(); |
| 162 | 162 |
| 163 sent_messages_.push_back(linked_ptr<IPC::Message>(message)); | 163 sent_messages_.push_back(linked_ptr<IPC::Message>(message)); |
| 164 return true; | 164 return true; |
| 165 } | 165 } |
| 166 | 166 |
| (...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 EXPECT_TRUE(credentials_set); | 2125 EXPECT_TRUE(credentials_set); |
| 2126 EXPECT_FALSE(auth3.Empty()); | 2126 EXPECT_FALSE(auth3.Empty()); |
| 2127 EXPECT_EQ(username, auth1.username()); | 2127 EXPECT_EQ(username, auth1.username()); |
| 2128 EXPECT_EQ(password, auth1.password()); | 2128 EXPECT_EQ(password, auth1.password()); |
| 2129 EXPECT_EQ(1u, warning_set.size()); | 2129 EXPECT_EQ(1u, warning_set.size()); |
| 2130 EXPECT_TRUE(HasWarning(warning_set, "extid2")); | 2130 EXPECT_TRUE(HasWarning(warning_set, "extid2")); |
| 2131 EXPECT_EQ(3u, capturing_net_log.GetSize()); | 2131 EXPECT_EQ(3u, capturing_net_log.GetSize()); |
| 2132 } | 2132 } |
| 2133 | 2133 |
| 2134 } // namespace extensions | 2134 } // namespace extensions |
| OLD | NEW |