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 "net/proxy/network_delegate_error_observer.h" | 5 #include "net/proxy/network_delegate_error_observer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
12 #include "net/base/network_delegate.h" | 12 #include "net/base/network_delegate.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 class TestNetworkDelegate : public net::NetworkDelegate { | 19 class TestNetworkDelegate : public net::NetworkDelegate { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 thread.message_loop()->PostTask( | 120 thread.message_loop()->PostTask( |
121 FROM_HERE, | 121 FROM_HERE, |
122 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError, | 122 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError, |
123 base::Unretained(&observer), 42, base::string16())); | 123 base::Unretained(&observer), 42, base::string16())); |
124 thread.Stop(); | 124 thread.Stop(); |
125 base::MessageLoop::current()->RunUntilIdle(); | 125 base::MessageLoop::current()->RunUntilIdle(); |
126 // Shouldn't have crashed until here... | 126 // Shouldn't have crashed until here... |
127 } | 127 } |
128 | 128 |
129 } // namespace net | 129 } // namespace net |
OLD | NEW |