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

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

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 #include "chrome/browser/ui/webui/chrome_web_ui.h" 6 #include "chrome/browser/ui/webui/chrome_web_ui.h"
7 #include "chrome/browser/ui/webui/hung_renderer_dialog.h" 7 #include "chrome/browser/ui/webui/hung_renderer_dialog.h"
8 #include "chrome/browser/ui/webui/web_ui_browsertest.h" 8 #include "chrome/browser/ui/webui/web_ui_browsertest.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/test/base/test_html_dialog_observer.h" 10 #include "chrome/test/base/test_html_dialog_observer.h"
(...skipping 23 matching lines...) Expand all
34 // The TestHtmlDialogObserver will catch our dialog when it gets created. 34 // The TestHtmlDialogObserver will catch our dialog when it gets created.
35 TestHtmlDialogObserver dialog_observer(this); 35 TestHtmlDialogObserver dialog_observer(this);
36 36
37 // Show a disabled Hung Renderer Dialog that won't kill processes or restart 37 // Show a disabled Hung Renderer Dialog that won't kill processes or restart
38 // hang timers. 38 // hang timers.
39 HungRendererDialog::ShowHungRendererDialogInternal(tab_contents, false); 39 HungRendererDialog::ShowHungRendererDialogInternal(tab_contents, false);
40 40
41 // Now we can get the WebUI object from the observer, and make some details 41 // Now we can get the WebUI object from the observer, and make some details
42 // about our test available to the JavaScript. 42 // about our test available to the JavaScript.
43 WebUI* webui = dialog_observer.GetWebUI(); 43 WebUI* webui = dialog_observer.GetWebUI();
44 webui->tab_contents()->GetRenderViewHost()->SetWebUIProperty( 44 webui->web_contents()->GetRenderViewHost()->SetWebUIProperty(
45 "expectedUrl", chrome::kChromeUIHungRendererDialogURL); 45 "expectedUrl", chrome::kChromeUIHungRendererDialogURL);
46 webui->tab_contents()->GetRenderViewHost()->SetWebUIProperty( 46 webui->web_contents()->GetRenderViewHost()->SetWebUIProperty(
47 "expectedTitle", "about:blank"); 47 "expectedTitle", "about:blank");
48 48
49 // Tell the test which WebUI instance we are dealing with and complete 49 // Tell the test which WebUI instance we are dealing with and complete
50 // initialization of this test. 50 // initialization of this test.
51 SetWebUIInstance(webui); 51 SetWebUIInstance(webui);
52 } 52 }
OLDNEW
« no previous file with comments | « chrome/test/data/webui/edit_search_engine_dialog_browsertest.cc ('k') | content/browser/webui/generic_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698