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

Side by Side Diff: chrome/browser/search_engines/template_url_fetcher_unittest.cc

Issue 120983002: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/search_engines/template_url.h" 10 #include "chrome/browser/search_engines/template_url.h"
11 #include "chrome/browser/search_engines/template_url_fetcher.h" 11 #include "chrome/browser/search_engines/template_url_fetcher.h"
12 #include "chrome/browser/search_engines/template_url_fetcher_callbacks.h" 12 #include "chrome/browser/search_engines/template_url_fetcher_callbacks.h"
13 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" 13 #include "chrome/browser/search_engines/template_url_fetcher_factory.h"
14 #include "chrome/browser/search_engines/template_url_service.h" 14 #include "chrome/browser/search_engines/template_url_service.h"
15 #include "chrome/browser/search_engines/template_url_service_test_util.h" 15 #include "chrome/browser/search_engines/template_url_service_test_util.h"
16 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
17 #include "chrome/test/base/testing_profile.h" 17 #include "chrome/test/base/testing_profile.h"
18 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
19 #include "net/test/embedded_test_server/embedded_test_server.h" 19 #include "net/test/embedded_test_server/embedded_test_server.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 using base::ASCIIToUTF16;
24
23 class TemplateURLFetcherTest; 25 class TemplateURLFetcherTest;
24 26
25 // Handles callbacks from TemplateURLFetcher. 27 // Handles callbacks from TemplateURLFetcher.
26 class TemplateURLFetcherTestCallbacks : public TemplateURLFetcherCallbacks { 28 class TemplateURLFetcherTestCallbacks : public TemplateURLFetcherCallbacks {
27 public: 29 public:
28 explicit TemplateURLFetcherTestCallbacks(TemplateURLFetcherTest* test) 30 explicit TemplateURLFetcherTestCallbacks(TemplateURLFetcherTest* test)
29 : test_(test) { 31 : test_(test) {
30 } 32 }
31 virtual ~TemplateURLFetcherTestCallbacks(); 33 virtual ~TemplateURLFetcherTestCallbacks();
32 34
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 StartDownload(keyword, osdd_file_name, 320 StartDownload(keyword, osdd_file_name,
319 TemplateURLFetcher::EXPLICIT_PROVIDER, true); 321 TemplateURLFetcher::EXPLICIT_PROVIDER, true);
320 ASSERT_EQ(0, add_provider_called_); 322 ASSERT_EQ(0, add_provider_called_);
321 ASSERT_EQ(1, callbacks_destroyed_); 323 ASSERT_EQ(1, callbacks_destroyed_);
322 324
323 WaitForDownloadToFinish(); 325 WaitForDownloadToFinish();
324 ASSERT_EQ(1, add_provider_called_); 326 ASSERT_EQ(1, add_provider_called_);
325 ASSERT_EQ(2, callbacks_destroyed_); 327 ASSERT_EQ(2, callbacks_destroyed_);
326 ASSERT_TRUE(last_callback_template_url_.get()); 328 ASSERT_TRUE(last_callback_template_url_.get());
327 } 329 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url.cc ('k') | chrome/browser/search_engines/template_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698