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

Unified Diff: extensions/browser/guest_view/guest_view_manager_unittest.cc

Issue 464533002: Move guest_view to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small changes are made in guest_view_manager_unittest.cc Created 6 years, 4 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
« no previous file with comments | « extensions/browser/guest_view/guest_view_manager_factory.h ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/guest_view_manager_unittest.cc
diff --git a/chrome/browser/guest_view/guest_view_manager_unittest.cc b/extensions/browser/guest_view/guest_view_manager_unittest.cc
similarity index 78%
rename from chrome/browser/guest_view/guest_view_manager_unittest.cc
rename to extensions/browser/guest_view/guest_view_manager_unittest.cc
index 05b53d581bbf4a0357a0017837bb4ead0612846c..aef377603d3ebe9260ed0d1f4808b36ea83651b6 100644
--- a/chrome/browser/guest_view/guest_view_manager_unittest.cc
+++ b/extensions/browser/guest_view/guest_view_manager_unittest.cc
@@ -2,16 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/guest_view/guest_view_manager.h"
+#include "extensions/browser/guest_view/guest_view_manager.h"
-#include "chrome/test/base/testing_profile.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/web_contents_tester.h"
-#include "testing/gtest/include/gtest/gtest.h"
+#include "extensions/browser/extensions_test.h"
using content::WebContents;
using content::WebContentsTester;
+namespace extensions {
+
namespace guestview {
// This class allows us to access some private variables in
@@ -38,19 +41,21 @@ class TestGuestViewManager : public GuestViewManager {
namespace {
-class GuestViewManagerTest : public testing::Test {
+class GuestViewManagerTest : public extensions::ExtensionsTest {
public:
- GuestViewManagerTest() {}
+ GuestViewManagerTest() :
+ notification_service_(content::NotificationService::Create()) {}
virtual ~GuestViewManagerTest() {}
scoped_ptr<WebContents> CreateWebContents() {
return scoped_ptr<WebContents>(
- WebContentsTester::CreateTestWebContents(&profile_, NULL));
+ WebContentsTester::CreateTestWebContents(&browser_context_, NULL));
}
private:
+ scoped_ptr<content::NotificationService> notification_service_;
content::TestBrowserThreadBundle thread_bundle_;
- TestingProfile profile_;
+ content::TestBrowserContext browser_context_;
DISALLOW_COPY_AND_ASSIGN(GuestViewManagerTest);
};
@@ -58,9 +63,9 @@ class GuestViewManagerTest : public testing::Test {
} // namespace
TEST_F(GuestViewManagerTest, AddRemove) {
- TestingProfile profile;
+ content::TestBrowserContext browser_context;
scoped_ptr<guestview::TestGuestViewManager> manager(
- new guestview::TestGuestViewManager(&profile));
+ new guestview::TestGuestViewManager(&browser_context));
scoped_ptr<WebContents> web_contents1(CreateWebContents());
scoped_ptr<WebContents> web_contents2(CreateWebContents());
@@ -100,3 +105,5 @@ TEST_F(GuestViewManagerTest, AddRemove) {
EXPECT_EQ(0u, manager->GetRemovedInstanceIdSize());
}
+
+} // namespace extensions
« no previous file with comments | « extensions/browser/guest_view/guest_view_manager_factory.h ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698