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

Unified Diff: chrome/browser/intents/web_intents_registry_unittest.cc

Issue 9838003: Revert 128189 - [Web Intents] Inline installation of extensions in web intents picker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/intents/web_intents_registry_unittest.cc
===================================================================
--- chrome/browser/intents/web_intents_registry_unittest.cc (revision 128190)
+++ chrome/browser/intents/web_intents_registry_unittest.cc (working copy)
@@ -25,8 +25,6 @@
public:
virtual ~MockExtensionService() {}
MOCK_CONST_METHOD0(extensions, const ExtensionSet*());
- MOCK_CONST_METHOD2(GetExtensionById,
- const Extension*(const std::string&, bool));
};
namespace {
@@ -95,9 +93,6 @@
registry_.Initialize(wds_, &extension_service_);
EXPECT_CALL(extension_service_, extensions()).
WillRepeatedly(testing::Return(&extensions_));
- EXPECT_CALL(extension_service_, GetExtensionById(testing::_, testing::_)).
- WillRepeatedly(
- testing::Invoke(this, &WebIntentsRegistryTest::GetExtensionById));
}
virtual void TearDown() {
@@ -109,17 +104,6 @@
MessageLoop::current()->Run();
}
- const Extension* GetExtensionById(const std::string& extension_id,
- testing::Unused) {
- for (ExtensionSet::const_iterator iter = extensions_.begin();
- iter != extensions_.end(); ++iter) {
- if ((*iter)->id() == extension_id)
- return &**iter;
- }
-
- return NULL;
- }
-
MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
content::TestBrowserThread db_thread_;
@@ -210,25 +194,6 @@
EXPECT_EQ(1U, consumer.services_.size());
}
-TEST_F(WebIntentsRegistryTest, GetIntentServicesForExtensionFilter) {
- scoped_refptr<Extension> share_extension(
- LoadAndExpectSuccess("intent_valid.json"));
- scoped_refptr<Extension> edit_extension(
- LoadAndExpectSuccess("intent_valid_2.json"));
- extensions_.Insert(share_extension);
- extensions_.Insert(edit_extension);
- ASSERT_EQ(2U, extensions_.size());
-
- TestConsumer consumer;
- consumer.expected_id_ = registry_.GetIntentServicesForExtensionFilter(
- ASCIIToUTF16("http://webintents.org/edit"),
- ASCIIToUTF16("image/*"),
- edit_extension->id(),
- &consumer);
- consumer.WaitForData();
- ASSERT_EQ(1U, consumer.services_.size());
-}
-
TEST_F(WebIntentsRegistryTest, GetAllIntents) {
webkit_glue::WebIntentServiceData service;
service.service_url = GURL("http://google.com");
« no previous file with comments | « chrome/browser/intents/web_intents_registry.cc ('k') | chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698