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

Side by Side Diff: net/proxy/network_delegate_error_observer_unittest.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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
« no previous file with comments | « net/net.gypi ('k') | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | 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) 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/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_impl.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::NetworkDelegateImpl {
20 public: 20 public:
21 TestNetworkDelegate() : got_pac_error_(false) {} 21 TestNetworkDelegate() : got_pac_error_(false) {}
22 ~TestNetworkDelegate() override {} 22 ~TestNetworkDelegate() override {}
23 23
24 bool got_pac_error() const { return got_pac_error_; } 24 bool got_pac_error() const { return got_pac_error_; }
25 25
26 private: 26 private:
27 // net::NetworkDelegate implementation. 27 // net::NetworkDelegate implementation.
28 int OnBeforeURLRequest(URLRequest* request, 28 int OnBeforeURLRequest(URLRequest* request,
29 const CompletionCallback& callback, 29 const CompletionCallback& callback,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError, 113 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
114 base::Unretained(&observer), 114 base::Unretained(&observer),
115 42, 115 42,
116 base::string16())); 116 base::string16()));
117 thread.Stop(); 117 thread.Stop();
118 base::MessageLoop::current()->RunUntilIdle(); 118 base::MessageLoop::current()->RunUntilIdle();
119 // Shouldn't have crashed until here... 119 // Shouldn't have crashed until here...
120 } 120 }
121 121
122 } // namespace net 122 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698