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

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 6 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
« no previous file with comments | « chrome/browser/intents/web_intents_registry.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/synchronization/waitable_event.h" 11 #include "base/synchronization/waitable_event.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/extensions/test_extension_service.h" 13 #include "chrome/browser/extensions/test_extension_service.h"
14 #include "chrome/browser/intents/default_web_intent_service.h" 14 #include "chrome/browser/intents/default_web_intent_service.h"
15 #include "chrome/browser/intents/web_intents_registry.h" 15 #include "chrome/browser/intents/web_intents_registry.h"
16 #include "chrome/browser/webdata/web_data_service.h" 16 #include "chrome/browser/webdata/web_data_service.h"
17 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
18 #include "chrome/common/extensions/extension_set.h" 18 #include "chrome/common/extensions/extension_set.h"
19 #include "content/test/test_browser_thread.h" 19 #include "content/test/test_browser_thread.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 using content::BrowserThread; 23 using content::BrowserThread;
24 using extensions::Extension;
24 using webkit_glue::WebIntentServiceData; 25 using webkit_glue::WebIntentServiceData;
25 26
26 class MockExtensionService: public TestExtensionService { 27 class MockExtensionService: public TestExtensionService {
27 public: 28 public:
28 virtual ~MockExtensionService() {} 29 virtual ~MockExtensionService() {}
29 MOCK_CONST_METHOD0(extensions, const ExtensionSet*()); 30 MOCK_CONST_METHOD0(extensions, const ExtensionSet*());
30 MOCK_CONST_METHOD2(GetExtensionById, 31 MOCK_CONST_METHOD2(GetExtensionById,
31 const Extension*(const std::string&, bool)); 32 const Extension*(const std::string&, bool));
32 }; 33 };
33 34
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 TestConsumer consumer; 636 TestConsumer consumer;
636 registry_.GetIntentServices(ASCIIToUTF16("http://webintents.org/share"), 637 registry_.GetIntentServices(ASCIIToUTF16("http://webintents.org/share"),
637 ASCIIToUTF16("image/*"), 638 ASCIIToUTF16("image/*"),
638 base::Bind(&TestConsumer::OnIntentsQueryDone, 639 base::Bind(&TestConsumer::OnIntentsQueryDone,
639 base::Unretained(&consumer))); 640 base::Unretained(&consumer)));
640 641
641 consumer.WaitForData(); 642 consumer.WaitForData();
642 ASSERT_EQ(1U, consumer.services_.size()); 643 ASSERT_EQ(1U, consumer.services_.size());
643 EXPECT_EQ(ASCIIToUTF16("image/png,image/jpg"), consumer.services_[0].type); 644 EXPECT_EQ(ASCIIToUTF16("image/png,image/jpg"), consumer.services_[0].type);
644 } 645 }
OLDNEW
« no previous file with comments | « chrome/browser/intents/web_intents_registry.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698