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 7465041: GTTF: Use a fresh TestingBrowserProcess for each test, part #4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/autofill/credit_card.h" 22 #include "chrome/browser/autofill/credit_card.h"
23 #include "chrome/browser/webdata/autofill_change.h" 23 #include "chrome/browser/webdata/autofill_change.h"
24 #include "chrome/browser/webdata/autofill_entry.h" 24 #include "chrome/browser/webdata/autofill_entry.h"
25 #include "chrome/browser/webdata/web_data_service.h" 25 #include "chrome/browser/webdata/web_data_service.h"
26 #include "chrome/browser/webdata/web_data_service_test_util.h" 26 #include "chrome/browser/webdata/web_data_service_test_util.h"
27 #include "chrome/browser/webdata/web_intents_table.h" 27 #include "chrome/browser/webdata/web_intents_table.h"
28 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
29 #include "chrome/common/chrome_paths.h" 29 #include "chrome/common/chrome_paths.h"
30 #include "chrome/common/guid.h" 30 #include "chrome/common/guid.h"
31 #include "chrome/test/base/thread_observer_helper.h" 31 #include "chrome/test/base/thread_observer_helper.h"
32 #include "chrome/test/testing_browser_process_test.h"
32 #include "content/browser/browser_thread.h" 33 #include "content/browser/browser_thread.h"
33 #include "content/common/notification_details.h" 34 #include "content/common/notification_details.h"
34 #include "content/common/notification_service.h" 35 #include "content/common/notification_service.h"
35 #include "testing/gmock/include/gmock/gmock.h" 36 #include "testing/gmock/include/gmock/gmock.h"
36 #include "testing/gtest/include/gtest/gtest.h" 37 #include "testing/gtest/include/gtest/gtest.h"
37 #include "webkit/glue/form_field.h" 38 #include "webkit/glue/form_field.h"
38 39
39 using base::Time; 40 using base::Time;
40 using base::TimeDelta; 41 using base::TimeDelta;
41 using base::WaitableEvent; 42 using base::WaitableEvent;
(...skipping 19 matching lines...) Expand all
61 NotificationService::AllSources()); 62 NotificationService::AllSources());
62 registrar_.Add(&observer_, 63 registrar_.Add(&observer_,
63 chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED, 64 chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
64 NotificationService::AllSources()); 65 NotificationService::AllSources());
65 registrar_.Add(&observer_, 66 registrar_.Add(&observer_,
66 chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED, 67 chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED,
67 NotificationService::AllSources()); 68 NotificationService::AllSources());
68 } 69 }
69 }; 70 };
70 71
71 class WebDataServiceTest : public testing::Test { 72 class WebDataServiceTest : public TestingBrowserProcessTest {
72 public: 73 public:
73 WebDataServiceTest() 74 WebDataServiceTest()
74 : ui_thread_(BrowserThread::UI, &message_loop_), 75 : ui_thread_(BrowserThread::UI, &message_loop_),
75 db_thread_(BrowserThread::DB) {} 76 db_thread_(BrowserThread::DB) {}
76 77
77 protected: 78 protected:
78 virtual void SetUp() { 79 virtual void SetUp() {
79 db_thread_.Start(); 80 db_thread_.Start();
80 81
81 PathService::Get(chrome::DIR_TEST_DATA, &profile_dir_); 82 PathService::Get(chrome::DIR_TEST_DATA, &profile_dir_);
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 wds_->GetWebIntents(ASCIIToUTF16("share"), &consumer); 639 wds_->GetWebIntents(ASCIIToUTF16("share"), &consumer);
639 WebIntentsConsumer::WaitUntilCalled(); 640 WebIntentsConsumer::WaitUntilCalled();
640 ASSERT_EQ(1U, consumer.intents.size()); 641 ASSERT_EQ(1U, consumer.intents.size());
641 642
642 intent.type = ASCIIToUTF16("video/*"); 643 intent.type = ASCIIToUTF16("video/*");
643 EXPECT_EQ(intent.service_url, consumer.intents[0].service_url); 644 EXPECT_EQ(intent.service_url, consumer.intents[0].service_url);
644 EXPECT_EQ(intent.action, consumer.intents[0].action); 645 EXPECT_EQ(intent.action, consumer.intents[0].action);
645 EXPECT_EQ(intent.type, consumer.intents[0].type); 646 EXPECT_EQ(intent.type, consumer.intents[0].type);
646 } 647 }
647 648
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autofill_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