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

Unified Diff: chrome/browser/chromeos/login/simple_web_view_dialog_browsertest.cc

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/simple_web_view_dialog_browsertest.cc
diff --git a/chrome/browser/chromeos/login/simple_web_view_dialog_browsertest.cc b/chrome/browser/chromeos/login/simple_web_view_dialog_browsertest.cc
deleted file mode 100644
index e0a40d880e8902c18608587b4b81666e7d9dfe64..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/login/simple_web_view_dialog_browsertest.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2014 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 "base/compiler_specific.h"
-#include "base/logging.h"
-#include "base/macros.h"
-#include "chrome/browser/chromeos/login/captive_portal_view.h"
-#include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
-#include "chrome/browser/chromeos/login/login_display_host_impl.h"
-#include "chrome/browser/chromeos/login/login_manager_test.h"
-#include "chrome/browser/chromeos/login/simple_web_view_dialog.h"
-#include "chrome/browser/chromeos/login/webui_login_view.h"
-#include "chrome/browser/chromeos/profiles/profile_helper.h"
-#include "content/public/browser/interstitial_page.h"
-#include "content/public/browser/interstitial_page_delegate.h"
-#include "ui/views/controls/webview/webview.h"
-
-namespace chromeos {
-
-namespace {
-
-class StubDelegate : public CaptivePortalWindowProxyDelegate {
- public:
- StubDelegate() {}
- virtual ~StubDelegate() {}
- virtual void OnPortalDetected() OVERRIDE {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(StubDelegate);
-};
-
-class InterstitialPageDelegate : public content::InterstitialPageDelegate {
- public:
- explicit InterstitialPageDelegate(content::WebContents* web_contents) {
- content::InterstitialPage* page = content::InterstitialPage::Create(
- web_contents, true, GURL("http://foo"), this);
- page->Show();
- }
-
- virtual ~InterstitialPageDelegate() {}
-
- private:
- // InterstitialPageDelegate implementation:
- virtual std::string GetHTMLContents() OVERRIDE { return "HTML Contents"; }
-
- DISALLOW_COPY_AND_ASSIGN(InterstitialPageDelegate);
-};
-
-} // namespace
-
-class SimpleWebViewDialogTest : public LoginManagerTest {
- public:
- SimpleWebViewDialogTest(): LoginManagerTest(false) {}
- virtual ~SimpleWebViewDialogTest() {}
-
- InterstitialPageDelegate* CreateDelegate(CaptivePortalWindowProxy* proxy) {
- SimpleWebViewDialog* dialog = proxy->captive_portal_view_for_testing();
- CHECK(dialog) << "CaptivePortalView is not initialized";
- return new InterstitialPageDelegate(dialog->web_view_->web_contents());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialogTest);
-};
-
-IN_PROC_BROWSER_TEST_F(SimpleWebViewDialogTest, Interstitial) {
- content::WebContents* web_contents = LoginDisplayHostImpl::default_host()
- ->GetWebUILoginView()
- ->GetWebContents();
- StubDelegate delegate;
- CaptivePortalWindowProxy proxy(&delegate, web_contents);
- proxy.Show();
-
- // Delegate creates a page and passes himself to it. Page owns the
- // delegate and will be destroyed by the end of the test.
- CreateDelegate(&proxy);
-}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/simple_web_view_dialog.cc ('k') | chrome/browser/chromeos/login/supervised_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698