| Index: content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| index f534336b4128e1b5d5e5a19d19c066d4cea5516f..6f2df70576129327c968b41470c216a6031f850f 100644
|
| --- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| +++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
|
| @@ -66,13 +66,21 @@ class RenderFrameHostManagerTestWebUIControllerFactory
|
| // WebUIFactory implementation.
|
| WebUIController* CreateWebUIControllerForURL(WebUI* web_ui,
|
| const GURL& url) const override {
|
| - if (!(should_create_webui_ && HasWebUIScheme(url)))
|
| - return NULL;
|
| - return new WebUIController(web_ui);
|
| + // If WebUI creation is enabled for the test and this is a WebUI URL,
|
| + // returns a new instance.
|
| + if (should_create_webui_ && HasWebUIScheme(url))
|
| + return new WebUIController(web_ui);
|
| + return nullptr;
|
| }
|
|
|
| WebUI::TypeID GetWebUIType(BrowserContext* browser_context,
|
| const GURL& url) const override {
|
| + // If WebUI creation is enabled for the test and this is a WebUI URL,
|
| + // returns a mock WebUI type.
|
| + if (should_create_webui_ && HasWebUIScheme(url)) {
|
| + return const_cast<RenderFrameHostManagerTestWebUIControllerFactory*>(
|
| + this);
|
| + }
|
| return WebUI::kNoWebUI;
|
| }
|
|
|
|
|