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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
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 <string> 5 #include <string>
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/api/push_messaging/sync_setup_helper.h" 10 #include "chrome/browser/extensions/api/push_messaging/sync_setup_helper.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 new net::RuleBasedHostResolverProc(host_resolver); 104 new net::RuleBasedHostResolverProc(host_resolver);
105 resolver->AllowDirectLookup("*.google.com"); 105 resolver->AllowDirectLookup("*.google.com");
106 // On Linux, we use Chromium's NSS implementation which uses the following 106 // On Linux, we use Chromium's NSS implementation which uses the following
107 // hosts for certificate verification. Without these overrides, running the 107 // hosts for certificate verification. Without these overrides, running the
108 // integration tests on Linux causes error as we make external DNS lookups. 108 // integration tests on Linux causes error as we make external DNS lookups.
109 resolver->AllowDirectLookup("*.thawte.com"); 109 resolver->AllowDirectLookup("*.thawte.com");
110 resolver->AllowDirectLookup("*.geotrust.com"); 110 resolver->AllowDirectLookup("*.geotrust.com");
111 resolver->AllowDirectLookup("*.gstatic.com"); 111 resolver->AllowDirectLookup("*.gstatic.com");
112 resolver->AllowDirectLookup("*.googleapis.com"); 112 resolver->AllowDirectLookup("*.googleapis.com");
113 mock_host_resolver_override_.reset( 113 mock_host_resolver_override_.reset(
114 new net::ScopedDefaultHostResolverProc(resolver)); 114 new net::ScopedDefaultHostResolverProc(resolver.get()));
115 } 115 }
116 116
117 // We need to reset the DNS lookup when we finish, or the test will fail. 117 // We need to reset the DNS lookup when we finish, or the test will fail.
118 void DisableDNSLookupForThisTest() { 118 void DisableDNSLookupForThisTest() {
119 mock_host_resolver_override_.reset(); 119 mock_host_resolver_override_.reset();
120 } 120 }
121 121
122 private: 122 private:
123 scoped_ptr<SyncSetupHelper> sync_setup_helper_; 123 scoped_ptr<SyncSetupHelper> sync_setup_helper_;
124 124
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 "startTestWithCredentials('%s', '%s', '%s');", 160 "startTestWithCredentials('%s', '%s', '%s');",
161 client_id.c_str(), client_secret.c_str(), refresh_token.c_str())); 161 client_id.c_str(), client_secret.c_str(), refresh_token.c_str()));
162 162
163 browser()->tab_strip_model()->GetActiveWebContents()->GetRenderViewHost()-> 163 browser()->tab_strip_model()->GetActiveWebContents()->GetRenderViewHost()->
164 ExecuteJavascriptInWebFrame(string16(), script_string); 164 ExecuteJavascriptInWebFrame(string16(), script_string);
165 165
166 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 166 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
167 } 167 }
168 168
169 } // namespace extensions 169 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/power/power_api_unittest.cc ('k') | chrome/browser/extensions/api/record/record_api_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698