Chromium Code Reviews| 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 a6d04cde898ee2a6118990c8c7427b528d7cb1ec..1d5b13104ce3d4e8808b67a8c91625e7e51d7fa2 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager_unittest.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc |
| @@ -65,13 +65,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 NULL; |
|
nasko
2015/10/15 17:40:10
nullptr
carlosk
2015/10/19 17:21:01
Done.
|
| } |
| 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; |
| } |