OLD | NEW |
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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/scoped_temp_dir.h" | 6 #include "base/scoped_temp_dir.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/intents/web_intents_registry.h" | 8 #include "chrome/browser/intents/web_intents_registry.h" |
9 #include "chrome/browser/webdata/web_data_service.h" | 9 #include "chrome/browser/webdata/web_data_service.h" |
10 #include "chrome/test/base/testing_browser_process_test.h" | |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
12 | 11 |
13 class WebIntentsRegistryTest : public TestingBrowserProcessTest { | 12 class WebIntentsRegistryTest : public testing::Test { |
14 public: | 13 public: |
15 WebIntentsRegistryTest() | 14 WebIntentsRegistryTest() |
16 : ui_thread_(BrowserThread::UI, &message_loop_), | 15 : ui_thread_(BrowserThread::UI, &message_loop_), |
17 db_thread_(BrowserThread::DB) {} | 16 db_thread_(BrowserThread::DB) {} |
18 | 17 |
19 protected: | 18 protected: |
20 virtual void SetUp() { | 19 virtual void SetUp() { |
21 db_thread_.Start(); | 20 db_thread_.Start(); |
22 wds_ = new WebDataService(); | 21 wds_ = new WebDataService(); |
23 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 22 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 120 |
122 if (consumer.intents_[0].action != ASCIIToUTF16("share")) | 121 if (consumer.intents_[0].action != ASCIIToUTF16("share")) |
123 std::swap(consumer.intents_[0],consumer.intents_[1]); | 122 std::swap(consumer.intents_[0],consumer.intents_[1]); |
124 | 123 |
125 intent.action = ASCIIToUTF16("share"); | 124 intent.action = ASCIIToUTF16("share"); |
126 EXPECT_EQ(intent, consumer.intents_[0]); | 125 EXPECT_EQ(intent, consumer.intents_[0]); |
127 | 126 |
128 intent.action = ASCIIToUTF16("search"); | 127 intent.action = ASCIIToUTF16("search"); |
129 EXPECT_EQ(intent, consumer.intents_[1]); | 128 EXPECT_EQ(intent, consumer.intents_[1]); |
130 } | 129 } |
OLD | NEW |