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

Unified Diff: chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h

Issue 8497001: Revert 108924 - Tests for WebUI Hung Renderer Dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « chrome/test/data/webui/hung_renderer_dialog_test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h
===================================================================
--- chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h (revision 108959)
+++ chrome/test/data/webui/hung_renderer_dialog_ui_test-inl.h (working copy)
@@ -1,52 +0,0 @@
-// Copyright (c) 2011 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 "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/webui/chrome_web_ui.h"
-#include "chrome/browser/ui/webui/hung_renderer_dialog.h"
-#include "chrome/browser/ui/webui/web_ui_browsertest.h"
-#include "chrome/common/url_constants.h"
-#include "chrome/test/base/test_html_dialog_observer.h"
-#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/webui/web_ui.h"
-
-// Test framework for chrome/test/data/webui/hung_renderer_dialog_test.js.
-class HungRendererDialogUITest : public WebUIBrowserTest {
- public:
- HungRendererDialogUITest();
- virtual ~HungRendererDialogUITest();
-
- private:
- virtual void SetUpOnMainThread() OVERRIDE;
-};
-
-void HungRendererDialogUITest::SetUpOnMainThread() {
- // Force the flag so that we will use the WebUI version of the Dialog.
- ChromeWebUI::OverrideMoreWebUI(true);
-
- // Choose which tab contents to report as hung. In this case, the default
- // tab contents will be about:blank.
- ASSERT_TRUE(browser() != NULL);
- TabContents* tab_contents = browser()->GetSelectedTabContents();
-
- // The TestHtmlDialogObserver will catch our dialog when it gets created.
- TestHtmlDialogObserver dialog_observer;
-
- // Show the actual Hung Renderer Dialog.
- HungRendererDialog::ShowHungRendererDialog(tab_contents);
-
- // Now we can get the WebUI object from the observer, and make some details
- // about our test available to the JavaScript.
- WebUI* webui = dialog_observer.GetWebUI();
- webui->tab_contents()->render_view_host()->SetWebUIProperty(
- "expectedUrl", chrome::kChromeUIHungRendererDialogURL);
- webui->tab_contents()->render_view_host()->SetWebUIProperty(
- "expectedTitle", "about:blank");
-
- // Tell the test which WebUI instance we are dealing with and complete
- // initialization of this test.
- SetWebUIInstance(webui);
- WebUIBrowserTest::SetUpOnMainThread();
-}
« no previous file with comments | « chrome/test/data/webui/hung_renderer_dialog_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698