| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/guest_view_manager.h" | 5 #include "extensions/browser/guest_view/guest_view_manager.h" |
| 6 | 6 |
| 7 #include "content/public/browser/notification_service.h" | 7 #include "content/public/browser/notification_service.h" |
| 8 #include "content/public/test/test_browser_context.h" | 8 #include "content/public/test/test_browser_context.h" |
| 9 #include "content/public/test/test_browser_thread_bundle.h" | 9 #include "content/public/test/test_browser_thread_bundle.h" |
| 10 #include "content/public/test/web_contents_tester.h" | 10 #include "content/public/test/web_contents_tester.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace guestview | 40 } // namespace guestview |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 class GuestViewManagerTest : public extensions::ExtensionsTest { | 44 class GuestViewManagerTest : public extensions::ExtensionsTest { |
| 45 public: | 45 public: |
| 46 GuestViewManagerTest() : | 46 GuestViewManagerTest() : |
| 47 notification_service_(content::NotificationService::Create()) {} | 47 notification_service_(content::NotificationService::Create()) {} |
| 48 virtual ~GuestViewManagerTest() {} | 48 ~GuestViewManagerTest() override {} |
| 49 | 49 |
| 50 scoped_ptr<WebContents> CreateWebContents() { | 50 scoped_ptr<WebContents> CreateWebContents() { |
| 51 return scoped_ptr<WebContents>( | 51 return scoped_ptr<WebContents>( |
| 52 WebContentsTester::CreateTestWebContents(&browser_context_, NULL)); | 52 WebContentsTester::CreateTestWebContents(&browser_context_, NULL)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 scoped_ptr<content::NotificationService> notification_service_; | 56 scoped_ptr<content::NotificationService> notification_service_; |
| 57 content::TestBrowserThreadBundle thread_bundle_; | 57 content::TestBrowserThreadBundle thread_bundle_; |
| 58 content::TestBrowserContext browser_context_; | 58 content::TestBrowserContext browser_context_; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 EXPECT_EQ(3, manager->last_instance_id_removed_for_testing()); | 100 EXPECT_EQ(3, manager->last_instance_id_removed_for_testing()); |
| 101 | 101 |
| 102 EXPECT_FALSE(manager->CanUseGuestInstanceID(1)); | 102 EXPECT_FALSE(manager->CanUseGuestInstanceID(1)); |
| 103 EXPECT_FALSE(manager->CanUseGuestInstanceID(2)); | 103 EXPECT_FALSE(manager->CanUseGuestInstanceID(2)); |
| 104 EXPECT_FALSE(manager->CanUseGuestInstanceID(3)); | 104 EXPECT_FALSE(manager->CanUseGuestInstanceID(3)); |
| 105 | 105 |
| 106 EXPECT_EQ(0u, manager->GetRemovedInstanceIdSize()); | 106 EXPECT_EQ(0u, manager->GetRemovedInstanceIdSize()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace extensions | 109 } // namespace extensions |
| OLD | NEW |