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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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_config_service_android.h » ('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"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 CookieOptions* options) override { 70 CookieOptions* options) override {
71 return true; 71 return true;
72 } 72 }
73 bool OnCanAccessFile(const net::URLRequest& request, 73 bool OnCanAccessFile(const net::URLRequest& request,
74 const base::FilePath& path) const override { 74 const base::FilePath& path) const override {
75 return true; 75 return true;
76 } 76 }
77 bool OnCanThrottleRequest(const URLRequest& request) const override { 77 bool OnCanThrottleRequest(const URLRequest& request) const override {
78 return false; 78 return false;
79 } 79 }
80 int OnBeforeSocketStreamConnect(SocketStream* stream,
81 const CompletionCallback& callback) override {
82 return OK;
83 }
84 80
85 bool got_pac_error_; 81 bool got_pac_error_;
86 }; 82 };
87 83
88 } // namespace 84 } // namespace
89 85
90 // Check that the OnPACScriptError method can be called from an arbitrary 86 // Check that the OnPACScriptError method can be called from an arbitrary
91 // thread. 87 // thread.
92 TEST(NetworkDelegateErrorObserverTest, CallOnThread) { 88 TEST(NetworkDelegateErrorObserverTest, CallOnThread) {
93 base::Thread thread("test_thread"); 89 base::Thread thread("test_thread");
(...skipping 23 matching lines...) Expand all
117 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError, 113 base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
118 base::Unretained(&observer), 114 base::Unretained(&observer),
119 42, 115 42,
120 base::string16())); 116 base::string16()));
121 thread.Stop(); 117 thread.Stop();
122 base::MessageLoop::current()->RunUntilIdle(); 118 base::MessageLoop::current()->RunUntilIdle();
123 // Shouldn't have crashed until here... 119 // Shouldn't have crashed until here...
124 } 120 }
125 121
126 } // namespace net 122 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/proxy/proxy_config_service_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698