| OLD | NEW |
| 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" | 6 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" |
| 7 #include "chrome/browser/intents/web_intents_registry.h" | 7 #include "chrome/browser/intents/web_intents_registry.h" |
| 8 #include "chrome/browser/intents/web_intents_registry_factory.h" | 8 #include "chrome/browser/intents/web_intents_registry_factory.h" |
| 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 10 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 10 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 class RegisterIntentHandlerInfoBarDelegateTest | 37 class RegisterIntentHandlerInfoBarDelegateTest |
| 38 : public TabContentsWrapperTestHarness { | 38 : public TabContentsWrapperTestHarness { |
| 39 protected: | 39 protected: |
| 40 RegisterIntentHandlerInfoBarDelegateTest() | 40 RegisterIntentHandlerInfoBarDelegateTest() |
| 41 : ui_thread_(BrowserThread::UI, MessageLoopForUI::current()) {} | 41 : ui_thread_(BrowserThread::UI, MessageLoopForUI::current()) {} |
| 42 | 42 |
| 43 virtual void SetUp() { | 43 virtual void SetUp() { |
| 44 TabContentsWrapperTestHarness::SetUp(); | 44 TabContentsWrapperTestHarness::SetUp(); |
| 45 | 45 |
| 46 profile()->CreateWebDataService(false); | |
| 47 web_intents_registry_ = BuildForProfile(profile()); | 46 web_intents_registry_ = BuildForProfile(profile()); |
| 48 } | 47 } |
| 49 | 48 |
| 50 virtual void TearDown() { | 49 virtual void TearDown() { |
| 51 web_intents_registry_ = NULL; | 50 web_intents_registry_ = NULL; |
| 52 | 51 |
| 53 TabContentsWrapperTestHarness::TearDown(); | 52 TabContentsWrapperTestHarness::TearDown(); |
| 54 } | 53 } |
| 55 | 54 |
| 56 MockWebIntentsRegistry* web_intents_registry_; | 55 MockWebIntentsRegistry* web_intents_registry_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 RegisterIntentHandlerInfoBarDelegate delegate( | 68 RegisterIntentHandlerInfoBarDelegate delegate( |
| 70 contents_wrapper()->infobar_tab_helper(), | 69 contents_wrapper()->infobar_tab_helper(), |
| 71 WebIntentsRegistryFactory::GetForProfile(profile()), | 70 WebIntentsRegistryFactory::GetForProfile(profile()), |
| 72 service, NULL, GURL()); | 71 service, NULL, GURL()); |
| 73 | 72 |
| 74 EXPECT_CALL(*web_intents_registry_, RegisterIntentService(service)); | 73 EXPECT_CALL(*web_intents_registry_, RegisterIntentService(service)); |
| 75 delegate.Accept(); | 74 delegate.Accept(); |
| 76 } | 75 } |
| 77 | 76 |
| 78 } // namespace | 77 } // namespace |
| OLD | NEW |