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

Unified Diff: content/test/web_contents_tester.cc

Issue 10826311: Move the corresponding cc files from content\test to be alongside their headers in content\public\t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | « content/test/unittest_test_suite.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/web_contents_tester.cc
===================================================================
--- content/test/web_contents_tester.cc (revision 151499)
+++ content/test/web_contents_tester.cc (working copy)
@@ -1,84 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/test/web_contents_tester.h"
-
-#include "content/browser/web_contents/test_web_contents.h"
-
-namespace content {
-
-namespace {
-
-// The two subclasses here are instantiated via the deprecated
-// CreateWebContentsFor... factories below.
-
-class TestWebContentsCountFocus : public TestWebContents {
- public:
- explicit TestWebContentsCountFocus(content::BrowserContext* browser_context)
- : TestWebContents(browser_context), focus_called_(0) {
- }
-
- virtual int GetNumberOfFocusCalls() OVERRIDE {
- return focus_called_;
- }
-
- virtual void Focus() OVERRIDE {
- focus_called_++;
- }
-
- private:
- int focus_called_;
-};
-
-class TestWebContentsCountSetFocusToLocationBar : public TestWebContents {
- public:
- explicit TestWebContentsCountSetFocusToLocationBar(
- content::BrowserContext* browser_context)
- : TestWebContents(browser_context), focus_called_(0) {
- }
-
- virtual void SetFocusToLocationBar(bool select_all) { ++focus_called_; }
- virtual int GetNumberOfFocusCalls() OVERRIDE {
- return focus_called_;
- }
-
- private:
- int focus_called_;
-};
-
-} // namespace
-
-// static
-WebContentsTester* WebContentsTester::For(WebContents* contents) {
- return static_cast<TestWebContents*>(contents);
-}
-
-// static
-WebContents* WebContentsTester::CreateTestWebContents(
- BrowserContext* browser_context,
- SiteInstance* instance) {
- return TestWebContents::Create(browser_context, instance);
-}
-
-// static
-WebContents* WebContentsTester::CreateTestWebContentsCountSetFocusToLocationBar(
- BrowserContext* browser_context,
- SiteInstance* instance) {
- TestWebContentsCountSetFocusToLocationBar* web_contents =
- new TestWebContentsCountSetFocusToLocationBar(browser_context);
- web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL);
- return web_contents;
-}
-
-// static
-WebContents* WebContentsTester::CreateTestWebContentsCountFocus(
- BrowserContext* browser_context,
- SiteInstance* instance) {
- TestWebContentsCountFocus* web_contents =
- new TestWebContentsCountFocus(browser_context);
- web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL);
- return web_contents;
-}
-
-} // namespace content
« no previous file with comments | « content/test/unittest_test_suite.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698