| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/profile_resetter/profile_resetter.h" | 5 #include "chrome/browser/profile_resetter/profile_resetter.h" |
| 6 | 6 |
| 7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/test/scoped_path_override.h" | 10 #include "base/test/scoped_path_override.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 private: | 209 private: |
| 210 scoped_ptr<net::FakeURLFetcher> CreateFakeURLFetcher( | 210 scoped_ptr<net::FakeURLFetcher> CreateFakeURLFetcher( |
| 211 const GURL& url, | 211 const GURL& url, |
| 212 net::URLFetcherDelegate* fetcher_delegate, | 212 net::URLFetcherDelegate* fetcher_delegate, |
| 213 const std::string& response_data, | 213 const std::string& response_data, |
| 214 net::HttpStatusCode response_code, | 214 net::HttpStatusCode response_code, |
| 215 net::URLRequestStatus::Status status); | 215 net::URLRequestStatus::Status status); |
| 216 | 216 |
| 217 MOCK_METHOD0(Callback, void(void)); | 217 MOCK_METHOD0(Callback, void(void)); |
| 218 | 218 |
| 219 base::MessageLoop loop_; | 219 base::MessageLoopForIO loop_; |
| 220 content::TestBrowserThread ui_thread_; | 220 content::TestBrowserThread ui_thread_; |
| 221 content::TestBrowserThread io_thread_; | 221 content::TestBrowserThread io_thread_; |
| 222 URLFetcherRequestListener request_listener_; | 222 URLFetcherRequestListener request_listener_; |
| 223 net::FakeURLFetcherFactory factory_; | 223 net::FakeURLFetcherFactory factory_; |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 ConfigParserTest::ConfigParserTest() | 226 ConfigParserTest::ConfigParserTest() |
| 227 : loop_(base::MessageLoop::TYPE_IO), | 227 : ui_thread_(content::BrowserThread::UI, &loop_), |
| 228 ui_thread_(content::BrowserThread::UI, &loop_), | |
| 229 io_thread_(content::BrowserThread::IO, &loop_), | 228 io_thread_(content::BrowserThread::IO, &loop_), |
| 230 factory_(NULL, base::Bind(&ConfigParserTest::CreateFakeURLFetcher, | 229 factory_(NULL, base::Bind(&ConfigParserTest::CreateFakeURLFetcher, |
| 231 base::Unretained(this))) { | 230 base::Unretained(this))) { |
| 232 } | 231 } |
| 233 | 232 |
| 234 ConfigParserTest::~ConfigParserTest() {} | 233 ConfigParserTest::~ConfigParserTest() {} |
| 235 | 234 |
| 236 scoped_ptr<BrandcodeConfigFetcher> ConfigParserTest::WaitForRequest( | 235 scoped_ptr<BrandcodeConfigFetcher> ConfigParserTest::WaitForRequest( |
| 237 const GURL& url) { | 236 const GURL& url) { |
| 238 EXPECT_CALL(*this, Callback()); | 237 EXPECT_CALL(*this, Callback()); |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 EXPECT_NE(base::string16::npos, | 1074 EXPECT_NE(base::string16::npos, |
| 1076 targets.find(base::ASCIIToUTF16("foo.com"))) << targets; | 1075 targets.find(base::ASCIIToUTF16("foo.com"))) << targets; |
| 1077 checked_shortcuts = true; | 1076 checked_shortcuts = true; |
| 1078 } | 1077 } |
| 1079 } | 1078 } |
| 1080 EXPECT_TRUE(checked_extensions); | 1079 EXPECT_TRUE(checked_extensions); |
| 1081 EXPECT_EQ(ShortcutHandler::IsSupported(), checked_shortcuts); | 1080 EXPECT_EQ(ShortcutHandler::IsSupported(), checked_shortcuts); |
| 1082 } | 1081 } |
| 1083 | 1082 |
| 1084 } // namespace | 1083 } // namespace |
| OLD | NEW |