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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc

Issue 10790141: Revert "Revert 148074 - Pass the render process id to the FrameNavigationState." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/app/chrome_command_ids.h" 5 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 6 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/tab_contents/render_view_context_menu.h" 10 #include "chrome/browser/tab_contents/render_view_context_menu.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 GURL url = extension->GetResourceURL("userAction/a.html"); 182 GURL url = extension->GetResourceURL("userAction/a.html");
183 183
184 ui_test_utils::NavigateToURL(browser(), url); 184 ui_test_utils::NavigateToURL(browser(), url);
185 185
186 // This corresponds to "Open link in new tab". 186 // This corresponds to "Open link in new tab".
187 content::ContextMenuParams params; 187 content::ContextMenuParams params;
188 params.is_editable = false; 188 params.is_editable = false;
189 params.media_type = WebKit::WebContextMenuData::MediaTypeNone; 189 params.media_type = WebKit::WebContextMenuData::MediaTypeNone;
190 params.page_url = url; 190 params.page_url = url;
191 params.frame_id = WebNavigationTabObserver::Get(tab)-> 191 params.frame_id = WebNavigationTabObserver::Get(tab)->
192 frame_navigation_state().GetMainFrameID(); 192 frame_navigation_state().GetMainFrameID().frame_num;
193 params.link_url = extension->GetResourceURL("userAction/b.html"); 193 params.link_url = extension->GetResourceURL("userAction/b.html");
194 194
195 TestRenderViewContextMenu menu(tab, params); 195 TestRenderViewContextMenu menu(tab, params);
196 menu.Init(); 196 menu.Init();
197 menu.ExecuteCommand(IDC_CONTENT_CONTEXT_OPENLINKNEWTAB); 197 menu.ExecuteCommand(IDC_CONTENT_CONTEXT_OPENLINKNEWTAB);
198 198
199 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 199 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
200 } 200 }
201 201
202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WebNavigationRequestOpenTab) { 202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WebNavigationRequestOpenTab) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 CommandLine::ForCurrentProcess()->AppendSwitch( 314 CommandLine::ForCurrentProcess()->AppendSwitch(
315 switches::kAllowLegacyExtensionManifests); 315 switches::kAllowLegacyExtensionManifests);
316 316
317 ASSERT_TRUE( 317 ASSERT_TRUE(
318 RunExtensionSubtest("webnavigation", "test_history.html")) 318 RunExtensionSubtest("webnavigation", "test_history.html"))
319 << message_; 319 << message_;
320 } 320 }
321 321
322 } // namespace extensions 322 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_navigation/web_navigation_api.cc ('k') | chrome/common/extensions/api/web_navigation.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698