class TestRenderViewContextMenu : public RenderViewContextMenu {
public:
- TestRenderViewContextMenu(WebContents* web_contents,
+ TestRenderViewContextMenu(content::RenderFrameHost* render_frame_host,
content::ContextMenuParams params)
- : RenderViewContextMenu(web_contents, params) { }
+ : RenderViewContextMenu(render_frame_host, params) { }
virtual void PlatformInit() OVERRIDE { }
virtual void PlatformCancel() OVERRIDE { }
TestRenderViewContextMenu* CreateContextMenu(GURL url) {
content::ContextMenuParams params;
- params.media_type = WebKit::WebContextMenuData::MediaTypeNone;
+ params.media_type = blink::WebContextMenuData::MediaTypeNone;
params.link_url = url;
params.unfiltered_link_url = url;
WebContents* web_contents =
params.writing_direction_right_to_left = 0;
#endif // OS_MACOSX
TestRenderViewContextMenu* menu = new TestRenderViewContextMenu(
- browser()->tab_strip_model()->GetActiveWebContents(), params);
+ browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(),
+ params);
menu->Init();
return menu;
}
void AddProtocolHandler(const std::string& protocol,
const GURL& url,
- const string16& title) {
+ const base::string16& title) {
ProtocolHandler handler = ProtocolHandler::CreateProtocolHandler(
protocol, url, title);
ProtocolHandlerRegistry* registry =
AddProtocolHandler(std::string("web+search"),
GURL("http://www.google.com/%s"),
- UTF8ToUTF16(std::string("Test handler")));
+ base::UTF8ToUTF16(std::string("Test handler")));
GURL url("web+search:testing");
ProtocolHandlerRegistry* registry =
ProtocolHandlerRegistryFactory::GetForProfile(browser()->profile());
ASSERT_TRUE(test_server()->Start());
GURL handler_url = test_server()->GetURL("files/custom_handler_foo.html");
AddProtocolHandler("foo", handler_url,
- UTF8ToUTF16(std::string("Test foo Handler")));
+ base::UTF8ToUTF16(std::string("Test foo Handler")));
ui_test_utils::NavigateToURL(browser(), GURL("foo:test"));