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

Side by Side Diff: chrome/browser/webdata/web_data_service_unittest.cc

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
12 #include "base/message_loop.h" 13 #include "base/message_loop.h"
13 #include "base/scoped_temp_dir.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/string16.h" 15 #include "base/string16.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/synchronization/waitable_event.h" 17 #include "base/synchronization/waitable_event.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "base/utf_string_conversions.h" 19 #include "base/utf_string_conversions.h"
20 #include "chrome/browser/autofill/autofill_profile.h" 20 #include "chrome/browser/autofill/autofill_profile.h"
21 #include "chrome/browser/autofill/credit_card.h" 21 #include "chrome/browser/autofill/credit_card.h"
22 #include "chrome/browser/intents/default_web_intent_service.h" 22 #include "chrome/browser/intents/default_web_intent_service.h"
23 #include "chrome/browser/webdata/autofill_change.h" 23 #include "chrome/browser/webdata/autofill_change.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 db_thread_.Stop(); 97 db_thread_.Stop();
98 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); 98 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
99 MessageLoop::current()->Run(); 99 MessageLoop::current()->Run();
100 } 100 }
101 101
102 MessageLoopForUI message_loop_; 102 MessageLoopForUI message_loop_;
103 content::TestBrowserThread ui_thread_; 103 content::TestBrowserThread ui_thread_;
104 content::TestBrowserThread db_thread_; 104 content::TestBrowserThread db_thread_;
105 FilePath profile_dir_; 105 FilePath profile_dir_;
106 scoped_refptr<WebDataService> wds_; 106 scoped_refptr<WebDataService> wds_;
107 ScopedTempDir temp_dir_; 107 base::ScopedTempDir temp_dir_;
108 }; 108 };
109 109
110 class WebDataServiceAutofillTest : public WebDataServiceTest { 110 class WebDataServiceAutofillTest : public WebDataServiceTest {
111 public: 111 public:
112 WebDataServiceAutofillTest() 112 WebDataServiceAutofillTest()
113 : WebDataServiceTest(), 113 : WebDataServiceTest(),
114 unique_id1_(1), 114 unique_id1_(1),
115 unique_id2_(2), 115 unique_id2_(2),
116 test_timeout_(TimeDelta::FromSeconds(kWebDataServiceTimeoutSeconds)), 116 test_timeout_(TimeDelta::FromSeconds(kWebDataServiceTimeoutSeconds)),
117 done_event_(false, false) {} 117 done_event_(false, false) {}
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 } 828 }
829 829
830 TEST_F(WebDataServiceTest, DidDefaultSearchProviderChangeOnNewProfile) { 830 TEST_F(WebDataServiceTest, DidDefaultSearchProviderChangeOnNewProfile) {
831 KeywordsConsumer consumer; 831 KeywordsConsumer consumer;
832 wds_->GetKeywords(&consumer); 832 wds_->GetKeywords(&consumer);
833 WaitUntilCalled(); 833 WaitUntilCalled();
834 ASSERT_TRUE(consumer.load_succeeded); 834 ASSERT_TRUE(consumer.load_succeeded);
835 EXPECT_FALSE(consumer.keywords_result.did_default_search_provider_change); 835 EXPECT_FALSE(consumer.keywords_result.did_default_search_provider_change);
836 EXPECT_FALSE(consumer.keywords_result.backup_valid); 836 EXPECT_FALSE(consumer.keywords_result.backup_valid);
837 } 837 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_apps_table_unittest.cc ('k') | chrome/browser/webdata/web_database_migration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698