| 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/testing_browser_process_test.h" | 10 #include "chrome/test/base/testing_browser_process_test.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 class WebIntentsRegistryTest : public TestingBrowserProcessTest { | 13 class WebIntentsRegistryTest : public TestingBrowserProcessTest { |
| 14 public: | 14 public: |
| 15 WebIntentsRegistryTest() | 15 WebIntentsRegistryTest() |
| 16 : ui_thread_(BrowserThread::UI, &message_loop_), | 16 : ui_thread_(BrowserThread::UI, &message_loop_), |
| 17 db_thread_(BrowserThread::DB) {} | 17 db_thread_(BrowserThread::DB) {} |
| 18 | 18 |
| 19 protected: | 19 protected: |
| 20 virtual void SetUp() { | 20 virtual void SetUp() { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 intent.action = ASCIIToUTF16("share"); | 96 intent.action = ASCIIToUTF16("share"); |
| 97 intent.type = ASCIIToUTF16("image/*"); | 97 intent.type = ASCIIToUTF16("image/*"); |
| 98 registry_.UnregisterIntentProvider(intent); | 98 registry_.UnregisterIntentProvider(intent); |
| 99 | 99 |
| 100 consumer.expected_id_ = registry_.GetIntentProviders(ASCIIToUTF16("share"), | 100 consumer.expected_id_ = registry_.GetIntentProviders(ASCIIToUTF16("share"), |
| 101 &consumer); | 101 &consumer); |
| 102 consumer.WaitForData(); | 102 consumer.WaitForData(); |
| 103 EXPECT_EQ(1U, consumer.intents_.size()); | 103 EXPECT_EQ(1U, consumer.intents_.size()); |
| 104 } | 104 } |
| OLD | NEW |