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

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

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: remove dcheck Created 3 years, 6 months 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/base/network_delegate_impl.cc ('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/location.h" 9 #include "base/location.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool OnCanGetCookies(const URLRequest& request, 66 bool OnCanGetCookies(const URLRequest& request,
67 const CookieList& cookie_list) override { 67 const CookieList& cookie_list) override {
68 return true; 68 return true;
69 } 69 }
70 bool OnCanSetCookie(const URLRequest& request, 70 bool OnCanSetCookie(const URLRequest& request,
71 const std::string& cookie_line, 71 const std::string& cookie_line,
72 CookieOptions* options) override { 72 CookieOptions* options) override {
73 return true; 73 return true;
74 } 74 }
75 bool OnCanAccessFile(const URLRequest& request, 75 bool OnCanAccessFile(const URLRequest& request,
76 const base::FilePath& path) const override { 76 const base::FilePath& original_path,
77 const base::FilePath& absolute_path) const override {
77 return true; 78 return true;
78 } 79 }
79 80
80 bool got_pac_error_; 81 bool got_pac_error_;
81 }; 82 };
82 83
83 // Check that the OnPACScriptError method can be called from an arbitrary 84 // Check that the OnPACScriptError method can be called from an arbitrary
84 // thread. 85 // thread.
85 TEST(NetworkDelegateErrorObserverTest, CallOnThread) { 86 TEST(NetworkDelegateErrorObserverTest, CallOnThread) {
86 base::Thread thread("test_thread"); 87 base::Thread thread("test_thread");
(...skipping 19 matching lines...) Expand all
106 FROM_HERE, base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError, 107 FROM_HERE, base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
107 base::Unretained(&observer), 42, base::string16())); 108 base::Unretained(&observer), 42, base::string16()));
108 thread.Stop(); 109 thread.Stop();
109 base::RunLoop().RunUntilIdle(); 110 base::RunLoop().RunUntilIdle();
110 // Shouldn't have crashed until here... 111 // Shouldn't have crashed until here...
111 } 112 }
112 113
113 } // namespace 114 } // namespace
114 115
115 } // namespace net 116 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_delegate_impl.cc ('k') | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698