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

Unified Diff: chrome/browser/ui/webui/test_chrome_web_ui_factory_browsertest.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/test_chrome_web_ui_factory_browsertest.cc
===================================================================
--- chrome/browser/ui/webui/test_chrome_web_ui_factory_browsertest.cc (revision 117871)
+++ chrome/browser/ui/webui/test_chrome_web_ui_factory_browsertest.cc (working copy)
@@ -12,6 +12,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using content::WebContents;
+using content::WebUIController;
using ::testing::_;
using ::testing::Eq;
using ::testing::StrictMock;
@@ -20,15 +21,14 @@
// Returns a new WebUI object for the TabContents from |arg0|.
ACTION(ReturnNewWebUI) {
- static content::WebUIController temp_controller;
- return new WebUI(arg0, &temp_controller);
+ return new WebUIController(arg0);
}
// Mock the TestChromeWebUIFactory::WebUIProvider to prove that we are called as
// expected.
class MockWebUIProvider : public TestChromeWebUIFactory::WebUIProvider {
public:
- MOCK_METHOD2(NewWebUI, WebUI*(WebContents* tab_contents, const GURL& url));
+ MOCK_METHOD2(NewWebUI, WebUIController*(WebUI* web_ui, const GURL& url));
};
// Dummy URL location for us to override.

Powered by Google App Engine
This is Rietveld 408576698