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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc

Issue 9224002: Make WebUI objects not derive from WebUI. WebUI objects own the controller. This is the ownership... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to head to clear linux_chromeos browsertest failures 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc
===================================================================
--- chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc (revision 117871)
+++ chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc (working copy)
@@ -58,8 +58,8 @@
EXPECT_EQ(1, browser()->tab_count());
EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab));
- PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>(
- preview_tab->web_contents()->GetWebUI());
+ PrintPreviewUI* preview_ui = static_cast<PrintPreviewUI*>(
+ preview_tab->web_contents()->GetWebUI()->GetController());
ASSERT_TRUE(preview_ui != NULL);
scoped_refptr<RefCountedBytes> data;
@@ -112,8 +112,8 @@
EXPECT_EQ(1, browser()->tab_count());
EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab));
- PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>(
- preview_tab->web_contents()->GetWebUI());
+ PrintPreviewUI* preview_ui = static_cast<PrintPreviewUI*>(
+ preview_tab->web_contents()->GetWebUI()->GetController());
ASSERT_TRUE(preview_ui != NULL);
scoped_refptr<RefCountedBytes> data;
@@ -173,8 +173,8 @@
EXPECT_EQ(1, browser()->tab_count());
EXPECT_EQ(1U, GetConstrainedWindowCount(initiator_tab));
- PrintPreviewUI* preview_ui = reinterpret_cast<PrintPreviewUI*>(
- preview_tab->web_contents()->GetWebUI());
+ PrintPreviewUI* preview_ui = static_cast<PrintPreviewUI*>(
+ preview_tab->web_contents()->GetWebUI()->GetController());
ASSERT_TRUE(preview_ui != NULL);
// Test with invalid |preview_ui_addr|.

Powered by Google App Engine
This is Rietveld 408576698