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

Side by Side Diff: chrome/browser/intents/web_intents_registry_unittest.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 2 Created 8 years, 7 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/json/json_file_value_serializer.h" 7 #include "base/json/json_file_value_serializer.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/extensions/test_extension_service.h" 12 #include "chrome/browser/extensions/test_extension_service.h"
13 #include "chrome/browser/intents/default_web_intent_service.h" 13 #include "chrome/browser/intents/default_web_intent_service.h"
14 #include "chrome/browser/intents/web_intents_registry.h" 14 #include "chrome/browser/intents/web_intents_registry.h"
15 #include "chrome/browser/webdata/web_data_service.h" 15 #include "chrome/browser/webdata/web_data_service.h"
16 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
17 #include "chrome/common/extensions/extension_set.h" 17 #include "chrome/common/extensions/extension_set.h"
18 #include "content/test/test_browser_thread.h" 18 #include "content/test/test_browser_thread.h"
19 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 using content::BrowserThread; 22 using content::BrowserThread;
23 using extensions::Extension;
23 using webkit_glue::WebIntentServiceData; 24 using webkit_glue::WebIntentServiceData;
24 25
25 class MockExtensionService: public TestExtensionService { 26 class MockExtensionService: public TestExtensionService {
26 public: 27 public:
27 virtual ~MockExtensionService() {} 28 virtual ~MockExtensionService() {}
28 MOCK_CONST_METHOD0(extensions, const ExtensionSet*()); 29 MOCK_CONST_METHOD0(extensions, const ExtensionSet*());
29 MOCK_CONST_METHOD2(GetExtensionById, 30 MOCK_CONST_METHOD2(GetExtensionById,
30 const Extension*(const std::string&, bool)); 31 const Extension*(const std::string&, bool));
31 }; 32 };
32 33
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 TestConsumer consumer; 625 TestConsumer consumer;
625 registry_.GetIntentServices(ASCIIToUTF16("http://webintents.org/share"), 626 registry_.GetIntentServices(ASCIIToUTF16("http://webintents.org/share"),
626 ASCIIToUTF16("image/*"), 627 ASCIIToUTF16("image/*"),
627 base::Bind(&TestConsumer::OnIntentsQueryDone, 628 base::Bind(&TestConsumer::OnIntentsQueryDone,
628 base::Unretained(&consumer))); 629 base::Unretained(&consumer)));
629 630
630 consumer.WaitForData(); 631 consumer.WaitForData();
631 ASSERT_EQ(1U, consumer.services_.size()); 632 ASSERT_EQ(1U, consumer.services_.size());
632 EXPECT_EQ(ASCIIToUTF16("image/png,image/jpg"), consumer.services_[0].type); 633 EXPECT_EQ(ASCIIToUTF16("image/png,image/jpg"), consumer.services_[0].type);
633 } 634 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698