Commit 59b499ef authored by Giovanni Ortuño Urquidi's avatar Giovanni Ortuño Urquidi Committed by Commit Bot

desktop-pwas: Change base::Bind and base::Closure to base::BindOnce and base::OnceClosure

Changes all uses of base::Bind and base::Closure in
BookmarkAppNavigationThrottle code. base::Bind and base::Closure are
deprecated in favor of base::BindOnce and base::OnceClosure.

Bug: 804653
Change-Id: Idc4b84649b52835d67aaedd83c50cb7c0e0a7c00
Reviewed-on: https://chromium-review.googlesource.com/880082Reviewed-by: default avatarMatt Giuca <mgiuca@chromium.org>
Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532301}
parent 4faf2d6b
...@@ -369,7 +369,7 @@ BookmarkAppNavigationThrottle::ProcessNavigation(bool is_redirect) { ...@@ -369,7 +369,7 @@ BookmarkAppNavigationThrottle::ProcessNavigation(bool is_redirect) {
// experience for out-of-scope navigations improves. // experience for out-of-scope navigations improves.
DVLOG(1) << "Open in new tab."; DVLOG(1) << "Open in new tab.";
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&BookmarkAppNavigationThrottle::OpenInNewTab, FROM_HERE, base::BindOnce(&BookmarkAppNavigationThrottle::OpenInNewTab,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
RecordProcessNavigationResult( RecordProcessNavigationResult(
ProcessNavigationResult::kDeferOpenNewTabInAppOutOfScope); ProcessNavigationResult::kDeferOpenNewTabInAppOutOfScope);
...@@ -392,7 +392,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary( ...@@ -392,7 +392,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary(
if (!source->HasOpener()) { if (!source->HasOpener()) {
DVLOG(1) << "Deferring opening app."; DVLOG(1) << "Deferring opening app.";
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&BookmarkAppNavigationThrottle::OpenBookmarkApp, FROM_HERE,
base::BindOnce(&BookmarkAppNavigationThrottle::OpenBookmarkApp,
weak_ptr_factory_.GetWeakPtr(), target_app)); weak_ptr_factory_.GetWeakPtr(), target_app));
} else { } else {
OpenBookmarkApp(target_app); OpenBookmarkApp(target_app);
...@@ -402,7 +403,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary( ...@@ -402,7 +403,8 @@ BookmarkAppNavigationThrottle::OpenInAppWindowAndCloseTabIfNecessary(
// a WebContents should be done asynchronously to avoid UAFs. Closing the // a WebContents should be done asynchronously to avoid UAFs. Closing the
// WebContents will cancel the navigation. // WebContents will cancel the navigation.
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&BookmarkAppNavigationThrottle::CloseWebContents, FROM_HERE,
base::BindOnce(&BookmarkAppNavigationThrottle::CloseWebContents,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
return content::NavigationThrottle::DEFER; return content::NavigationThrottle::DEFER;
} }
......
...@@ -278,7 +278,7 @@ void NavigateToURLAndWait(NavigateParams* params) { ...@@ -278,7 +278,7 @@ void NavigateToURLAndWait(NavigateParams* params) {
observer->WaitForNavigationFinished(); observer->WaitForNavigationFinished();
} }
// Wrapper so that we can use base::Bind with NavigateToURL. // Wrapper so that we can use base::BindOnce with NavigateToURL.
void NavigateToURLWrapper(NavigateParams* params) { void NavigateToURLWrapper(NavigateParams* params) {
ui_test_utils::NavigateToURL(params); ui_test_utils::NavigateToURL(params);
} }
...@@ -379,15 +379,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -379,15 +379,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
// Checks that, after running |action|, the initial tab's window doesn't have // Checks that, after running |action|, the initial tab's window doesn't have
// any new tabs, the initial tab did not navigate, and that no new windows // any new tabs, the initial tab did not navigate, and that no new windows
// have been opened. // have been opened.
void TestTabActionDoesNotNavigateOrOpenAppWindow( void TestTabActionDoesNotNavigateOrOpenAppWindow(base::OnceClosure action) {
const base::Closure& action) {
size_t num_browsers = chrome::GetBrowserCount(profile()); size_t num_browsers = chrome::GetBrowserCount(profile());
int num_tabs = browser()->tab_strip_model()->count(); int num_tabs = browser()->tab_strip_model()->count();
content::WebContents* initial_tab = content::WebContents* initial_tab =
browser()->tab_strip_model()->GetActiveWebContents(); browser()->tab_strip_model()->GetActiveWebContents();
GURL initial_url = initial_tab->GetLastCommittedURL(); GURL initial_url = initial_tab->GetLastCommittedURL();
action.Run(); std::move(action).Run();
EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile())); EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile()));
EXPECT_EQ(browser(), chrome::FindLastActive()); EXPECT_EQ(browser(), chrome::FindLastActive());
...@@ -401,14 +400,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -401,14 +400,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
// the initial tab is still focused, and that the initial tab didn't // the initial tab is still focused, and that the initial tab didn't
// navigate. // navigate.
void TestTabActionOpensBackgroundTab(const GURL& target_url, void TestTabActionOpensBackgroundTab(const GURL& target_url,
const base::Closure& action) { base::OnceClosure action) {
size_t num_browsers = chrome::GetBrowserCount(profile()); size_t num_browsers = chrome::GetBrowserCount(profile());
int num_tabs = browser()->tab_strip_model()->count(); int num_tabs = browser()->tab_strip_model()->count();
content::WebContents* initial_tab = content::WebContents* initial_tab =
browser()->tab_strip_model()->GetActiveWebContents(); browser()->tab_strip_model()->GetActiveWebContents();
GURL initial_url = initial_tab->GetLastCommittedURL(); GURL initial_url = initial_tab->GetLastCommittedURL();
action.Run(); std::move(action).Run();
EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile())); EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile()));
EXPECT_EQ(browser(), chrome::FindLastActive()); EXPECT_EQ(browser(), chrome::FindLastActive());
...@@ -426,14 +425,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -426,14 +425,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
// Checks that a new regular browser window is opened, that the new window // Checks that a new regular browser window is opened, that the new window
// is in the foreground, and that the initial tab didn't navigate. // is in the foreground, and that the initial tab didn't navigate.
void TestTabActionOpensForegroundWindow(const GURL& target_url, void TestTabActionOpensForegroundWindow(const GURL& target_url,
const base::Closure& action) { base::OnceClosure action) {
size_t num_browsers = chrome::GetBrowserCount(profile()); size_t num_browsers = chrome::GetBrowserCount(profile());
int num_tabs = browser()->tab_strip_model()->count(); int num_tabs = browser()->tab_strip_model()->count();
content::WebContents* initial_tab = content::WebContents* initial_tab =
browser()->tab_strip_model()->GetActiveWebContents(); browser()->tab_strip_model()->GetActiveWebContents();
GURL initial_url = initial_tab->GetLastCommittedURL(); GURL initial_url = initial_tab->GetLastCommittedURL();
action.Run(); std::move(action).Run();
EXPECT_EQ(++num_browsers, chrome::GetBrowserCount(profile())); EXPECT_EQ(++num_browsers, chrome::GetBrowserCount(profile()));
...@@ -452,14 +451,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -452,14 +451,14 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
// any new tabs, the initial tab did not navigate, and that a new app window // any new tabs, the initial tab did not navigate, and that a new app window
// with |target_url| is opened. // with |target_url| is opened.
void TestTabActionOpensAppWindow(const GURL& target_url, void TestTabActionOpensAppWindow(const GURL& target_url,
const base::Closure& action) { base::OnceClosure action) {
content::WebContents* initial_tab = content::WebContents* initial_tab =
browser()->tab_strip_model()->GetActiveWebContents(); browser()->tab_strip_model()->GetActiveWebContents();
GURL initial_url = initial_tab->GetLastCommittedURL(); GURL initial_url = initial_tab->GetLastCommittedURL();
int num_tabs = browser()->tab_strip_model()->count(); int num_tabs = browser()->tab_strip_model()->count();
size_t num_browsers = chrome::GetBrowserCount(profile()); size_t num_browsers = chrome::GetBrowserCount(profile());
action.Run(); std::move(action).Run();
EXPECT_EQ(num_tabs, browser()->tab_strip_model()->count()); EXPECT_EQ(num_tabs, browser()->tab_strip_model()->count());
EXPECT_EQ(++num_browsers, chrome::GetBrowserCount(profile())); EXPECT_EQ(++num_browsers, chrome::GetBrowserCount(profile()));
...@@ -477,13 +476,13 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -477,13 +476,13 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
// |target_url|. Returns true if there were no errors. // |target_url|. Returns true if there were no errors.
bool TestActionDoesNotOpenAppWindow(Browser* browser, bool TestActionDoesNotOpenAppWindow(Browser* browser,
const GURL& target_url, const GURL& target_url,
const base::Closure& action) { base::OnceClosure action) {
content::WebContents* initial_tab = content::WebContents* initial_tab =
browser->tab_strip_model()->GetActiveWebContents(); browser->tab_strip_model()->GetActiveWebContents();
int num_tabs = browser->tab_strip_model()->count(); int num_tabs = browser->tab_strip_model()->count();
size_t num_browsers = chrome::GetBrowserCount(browser->profile()); size_t num_browsers = chrome::GetBrowserCount(browser->profile());
action.Run(); std::move(action).Run();
EXPECT_EQ(num_tabs, browser->tab_strip_model()->count()); EXPECT_EQ(num_tabs, browser->tab_strip_model()->count());
EXPECT_EQ(num_browsers, chrome::GetBrowserCount(browser->profile())); EXPECT_EQ(num_browsers, chrome::GetBrowserCount(browser->profile()));
...@@ -499,7 +498,7 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -499,7 +498,7 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
// navigate. // navigate.
void TestAppActionOpensForegroundTab(Browser* app_browser, void TestAppActionOpensForegroundTab(Browser* app_browser,
const GURL& target_url, const GURL& target_url,
const base::Closure& action) { base::OnceClosure action) {
size_t num_browsers = chrome::GetBrowserCount(profile()); size_t num_browsers = chrome::GetBrowserCount(profile());
int num_tabs_browser = browser()->tab_strip_model()->count(); int num_tabs_browser = browser()->tab_strip_model()->count();
int num_tabs_app_browser = app_browser->tab_strip_model()->count(); int num_tabs_app_browser = app_browser->tab_strip_model()->count();
...@@ -512,7 +511,7 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -512,7 +511,7 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
GURL initial_app_url = app_web_contents->GetLastCommittedURL(); GURL initial_app_url = app_web_contents->GetLastCommittedURL();
GURL initial_tab_url = initial_tab->GetLastCommittedURL(); GURL initial_tab_url = initial_tab->GetLastCommittedURL();
action.Run(); std::move(action).Run();
EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile())); EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile()));
...@@ -533,21 +532,22 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest { ...@@ -533,21 +532,22 @@ class BookmarkAppNavigationThrottleBrowserTest : public ExtensionBrowserTest {
// main browser window is still the active one and navigated to |target_url|. // main browser window is still the active one and navigated to |target_url|.
// Returns true if there were no errors. // Returns true if there were no errors.
bool TestTabActionDoesNotOpenAppWindow(const GURL& target_url, bool TestTabActionDoesNotOpenAppWindow(const GURL& target_url,
const base::Closure& action) { base::OnceClosure action) {
return TestActionDoesNotOpenAppWindow(browser(), target_url, action); return TestActionDoesNotOpenAppWindow(browser(), target_url,
std::move(action));
} }
// Checks that no new windows are opened after running |action| and that the // Checks that no new windows are opened after running |action| and that the
// iframe in the initial tab navigated to |target_url|. Returns true if there // iframe in the initial tab navigated to |target_url|. Returns true if there
// were no errors. // were no errors.
bool TestIFrameActionDoesNotOpenAppWindow(const GURL& target_url, bool TestIFrameActionDoesNotOpenAppWindow(const GURL& target_url,
const base::Closure& action) { base::OnceClosure action) {
size_t num_browsers = chrome::GetBrowserCount(profile()); size_t num_browsers = chrome::GetBrowserCount(profile());
int num_tabs = browser()->tab_strip_model()->count(); int num_tabs = browser()->tab_strip_model()->count();
content::WebContents* initial_tab = content::WebContents* initial_tab =
browser()->tab_strip_model()->GetActiveWebContents(); browser()->tab_strip_model()->GetActiveWebContents();
action.Run(); std::move(action).Run();
EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile())); EXPECT_EQ(num_browsers, chrome::GetBrowserCount(profile()));
EXPECT_EQ(browser(), chrome::FindLastActive()); EXPECT_EQ(browser(), chrome::FindLastActive());
...@@ -593,7 +593,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -593,7 +593,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
app_url, base::Bind(&ClickLinkAndWait, app_url,
base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
app_url, LinkTarget::SELF, GetParam())); app_url, LinkTarget::SELF, GetParam()));
...@@ -610,7 +611,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -610,7 +611,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
app_url, base::Bind(&ClickLinkAndWait, app_url,
base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
app_url, LinkTarget::SELF, GetParam())); app_url, LinkTarget::SELF, GetParam()));
...@@ -650,10 +652,10 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleTransitionBrowserTest, ...@@ -650,10 +652,10 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleTransitionBrowserTest,
target_url == target_url ==
embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath)) { embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath)) {
TestTabActionOpensAppWindow(target_url, TestTabActionOpensAppWindow(target_url,
base::Bind(&NavigateToURLAndWait, &params)); base::BindOnce(&NavigateToURLAndWait, &params));
} else { } else {
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
target_url, base::Bind(&NavigateToURLAndWait, &params)); target_url, base::BindOnce(&NavigateToURLAndWait, &params));
} }
} }
...@@ -681,7 +683,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -681,7 +683,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
params.frame_tree_node_id = iframe->GetFrameTreeNodeId(); params.frame_tree_node_id = iframe->GetFrameTreeNodeId();
content::TestFrameNavigationObserver observer(iframe); content::TestFrameNavigationObserver observer(iframe);
TestIFrameActionDoesNotOpenAppWindow( TestIFrameActionDoesNotOpenAppWindow(
app_url, base::Bind(&NavigateToURLWrapper, &params)); app_url, base::BindOnce(&NavigateToURLWrapper, &params));
ASSERT_TRUE(ui::PageTransitionCoreTypeIs(observer.transition_type(), ASSERT_TRUE(ui::PageTransitionCoreTypeIs(observer.transition_type(),
ui::PAGE_TRANSITION_AUTO_SUBFRAME)); ui::PAGE_TRANSITION_AUTO_SUBFRAME));
...@@ -708,7 +710,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -708,7 +710,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
ui::PAGE_TRANSITION_LINK); ui::PAGE_TRANSITION_LINK);
params.frame_tree_node_id = iframe->GetFrameTreeNodeId(); params.frame_tree_node_id = iframe->GetFrameTreeNodeId();
ASSERT_TRUE(TestIFrameActionDoesNotOpenAppWindow( ASSERT_TRUE(TestIFrameActionDoesNotOpenAppWindow(
GetLaunchingPageURL(), base::Bind(&NavigateToURLWrapper, &params))); GetLaunchingPageURL(), base::BindOnce(&NavigateToURLWrapper, &params)));
} }
content::RenderFrameHost* iframe = GetIFrame(initial_tab); content::RenderFrameHost* iframe = GetIFrame(initial_tab);
...@@ -718,7 +720,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -718,7 +720,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
params.frame_tree_node_id = iframe->GetFrameTreeNodeId(); params.frame_tree_node_id = iframe->GetFrameTreeNodeId();
content::TestFrameNavigationObserver observer(iframe); content::TestFrameNavigationObserver observer(iframe);
TestIFrameActionDoesNotOpenAppWindow( TestIFrameActionDoesNotOpenAppWindow(
app_url, base::Bind(&NavigateToURLWrapper, &params)); app_url, base::BindOnce(&NavigateToURLWrapper, &params));
ASSERT_TRUE(ui::PageTransitionCoreTypeIs( ASSERT_TRUE(ui::PageTransitionCoreTypeIs(
observer.transition_type(), ui::PAGE_TRANSITION_MANUAL_SUBFRAME)); observer.transition_type(), ui::PAGE_TRANSITION_MANUAL_SUBFRAME));
...@@ -744,7 +746,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -744,7 +746,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
ui::PageTransitionFromInt(ui::PAGE_TRANSITION_LINK | ui::PageTransitionFromInt(ui::PAGE_TRANSITION_LINK |
ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)); ui::PAGE_TRANSITION_FROM_ADDRESS_BAR));
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
app_url, base::Bind(&NavigateToURLWrapper, &params))); app_url, base::BindOnce(&NavigateToURLWrapper, &params)));
ExpectNavigationResultHistogramEquals( ExpectNavigationResultHistogramEquals(
global_histogram(), global_histogram(),
...@@ -762,7 +764,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -762,7 +764,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_TYPED); NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_TYPED);
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
app_url, base::Bind(&NavigateToURLWrapper, &params))); app_url, base::BindOnce(&NavigateToURLWrapper, &params)));
} }
// Navigate to an in-scope URL to generate a link navigation that didn't // Navigate to an in-scope URL to generate a link navigation that didn't
...@@ -772,7 +774,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -772,7 +774,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath);
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
in_scope_url, in_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
in_scope_url, LinkTarget::SELF, "" /* rel */))); in_scope_url, LinkTarget::SELF, "" /* rel */)));
...@@ -783,13 +785,13 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -783,13 +785,13 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
NavigateParams params(browser(), out_of_scope_url, NavigateParams params(browser(), out_of_scope_url,
ui::PAGE_TRANSITION_TYPED); ui::PAGE_TRANSITION_TYPED);
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
out_of_scope_url, base::Bind(&NavigateToURLWrapper, &params))); out_of_scope_url, base::BindOnce(&NavigateToURLWrapper, &params)));
} }
base::HistogramTester scoped_histogram; base::HistogramTester scoped_histogram;
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
in_scope_url, in_scope_url,
base::Bind( base::BindOnce(
[](content::WebContents* web_contents, const GURL& in_scope_url) { [](content::WebContents* web_contents, const GURL& in_scope_url) {
auto observer = GetTestNavigationObserver(in_scope_url); auto observer = GetTestNavigationObserver(in_scope_url);
web_contents->GetController().GoBack(); web_contents->GetController().GoBack();
...@@ -815,7 +817,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, TabApp) { ...@@ -815,7 +817,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, TabApp) {
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
app_url, base::Bind(&ClickLinkAndWait, app_url,
base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
app_url, LinkTarget::SELF, GetParam())); app_url, LinkTarget::SELF, GetParam()));
...@@ -833,7 +836,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -833,7 +836,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionOpensAppWindow( TestTabActionOpensAppWindow(
app_url, base::Bind(&ClickLinkAndWait, app_url,
base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
app_url, LinkTarget::SELF, GetParam())); app_url, LinkTarget::SELF, GetParam()));
...@@ -851,7 +855,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -851,7 +855,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionOpensAppWindow( TestTabActionOpensAppWindow(
app_url, base::Bind(&ClickLinkAndWait, app_url,
base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
app_url, LinkTarget::BLANK, GetParam())); app_url, LinkTarget::BLANK, GetParam()));
...@@ -873,7 +878,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -873,7 +878,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
kLaunchingPageHost, CreateServerRedirect(app_url)); kLaunchingPageHost, CreateServerRedirect(app_url));
TestTabActionOpensAppWindow( TestTabActionOpensAppWindow(
app_url, app_url,
base::Bind(&ClickLinkAndWaitForURL, base::BindOnce(&ClickLinkAndWaitForURL,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
redirecting_url, app_url, LinkTarget::SELF, GetParam())); redirecting_url, app_url, LinkTarget::SELF, GetParam()));
...@@ -894,7 +899,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -894,7 +899,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
kLaunchingPageHost, CreateServerRedirect(app_url)); kLaunchingPageHost, CreateServerRedirect(app_url));
TestTabActionOpensAppWindow( TestTabActionOpensAppWindow(
app_url, app_url,
base::Bind(&ClickLinkAndWaitForURL, base::BindOnce(&ClickLinkAndWaitForURL,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
redirecting_url, app_url, LinkTarget::BLANK, GetParam())); redirecting_url, app_url, LinkTarget::BLANK, GetParam()));
...@@ -1028,7 +1033,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -1028,7 +1033,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath);
TestTabActionOpensAppWindow( TestTabActionOpensAppWindow(
in_scope_url, in_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
in_scope_url, LinkTarget::SELF, GetParam())); in_scope_url, LinkTarget::SELF, GetParam()));
...@@ -1048,7 +1053,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -1048,7 +1053,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath);
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
out_of_scope_url, out_of_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
out_of_scope_url, LinkTarget::SELF, GetParam())); out_of_scope_url, LinkTarget::SELF, GetParam()));
...@@ -1102,7 +1107,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest, ...@@ -1102,7 +1107,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest,
NavigateParams params(current_browser, start_url, NavigateParams params(current_browser, start_url,
ui::PAGE_TRANSITION_TYPED); ui::PAGE_TRANSITION_TYPED);
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
start_url, base::Bind(&NavigateToURLWrapper, &params))); start_url, base::BindOnce(&NavigateToURLWrapper, &params)));
} else if (start_url_path == kLaunchingPagePath) { } else if (start_url_path == kLaunchingPagePath) {
// Return early here since the app window can't start with an out-of-scope // Return early here since the app window can't start with an out-of-scope
// URL. // URL.
...@@ -1123,7 +1128,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest, ...@@ -1123,7 +1128,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest,
if (start_in == StartIn::BROWSER) { if (start_in == StartIn::BROWSER) {
TestActionDoesNotOpenAppWindow( TestActionDoesNotOpenAppWindow(
current_browser, target_url, current_browser, target_url,
base::Bind(&SubmitFormAndWait, base::BindOnce(
&SubmitFormAndWait,
current_browser->tab_strip_model()->GetActiveWebContents(), current_browser->tab_strip_model()->GetActiveWebContents(),
target_url, request_type)); target_url, request_type));
...@@ -1142,7 +1148,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest, ...@@ -1142,7 +1148,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest,
if (target_url_path == kInScopeUrlPath) { if (target_url_path == kInScopeUrlPath) {
TestActionDoesNotOpenAppWindow( TestActionDoesNotOpenAppWindow(
current_browser, target_url, current_browser, target_url,
base::Bind(&SubmitFormAndWait, base::BindOnce(
&SubmitFormAndWait,
current_browser->tab_strip_model()->GetActiveWebContents(), current_browser->tab_strip_model()->GetActiveWebContents(),
target_url, request_type)); target_url, request_type));
...@@ -1157,7 +1164,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest, ...@@ -1157,7 +1164,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleFormSubmissionBrowserTest,
DCHECK_EQ(target_url_path, kOutOfScopeUrlPath); DCHECK_EQ(target_url_path, kOutOfScopeUrlPath);
TestAppActionOpensForegroundTab( TestAppActionOpensForegroundTab(
current_browser, target_url, current_browser, target_url,
base::Bind(&SubmitFormAndWait, base::BindOnce(&SubmitFormAndWait,
current_browser->tab_strip_model()->GetActiveWebContents(), current_browser->tab_strip_model()->GetActiveWebContents(),
target_url, request_type)); target_url, request_type));
...@@ -1175,7 +1182,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -1175,7 +1182,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
InstallTestBookmarkApp(); InstallTestBookmarkApp();
NavigateToLaunchingPage(); NavigateToLaunchingPage();
TestTabActionDoesNotNavigateOrOpenAppWindow(base::Bind( TestTabActionDoesNotNavigateOrOpenAppWindow(base::BindOnce(
[](content::WebContents* web_contents, const GURL& target_url) { [](content::WebContents* web_contents, const GURL& target_url) {
std::string script = base::StringPrintf( std::string script = base::StringPrintf(
"(() => {" "(() => {"
...@@ -1205,7 +1212,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, Fetch) { ...@@ -1205,7 +1212,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, Fetch) {
InstallTestBookmarkApp(); InstallTestBookmarkApp();
NavigateToLaunchingPage(); NavigateToLaunchingPage();
TestTabActionDoesNotNavigateOrOpenAppWindow(base::Bind( TestTabActionDoesNotNavigateOrOpenAppWindow(base::BindOnce(
[](content::WebContents* web_contents, const GURL& target_url) { [](content::WebContents* web_contents, const GURL& target_url) {
std::string script = base::StringPrintf( std::string script = base::StringPrintf(
"(() => {" "(() => {"
...@@ -1235,7 +1242,8 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -1235,7 +1242,8 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionOpensBackgroundTab( TestTabActionOpensBackgroundTab(
app_url, base::Bind(&ExecuteContextMenuLinkCommandAndWait, app_url,
base::BindOnce(&ExecuteContextMenuLinkCommandAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
app_url, IDC_CONTENT_CONTEXT_OPENLINKNEWTAB)); app_url, IDC_CONTENT_CONTEXT_OPENLINKNEWTAB));
...@@ -1253,7 +1261,8 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -1253,7 +1261,8 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionOpensForegroundWindow( TestTabActionOpensForegroundWindow(
app_url, base::Bind(&ExecuteContextMenuLinkCommandAndWait, app_url,
base::BindOnce(&ExecuteContextMenuLinkCommandAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
app_url, IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW)); app_url, IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW));
...@@ -1273,7 +1282,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -1273,7 +1282,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestAppActionOpensForegroundTab( TestAppActionOpensForegroundTab(
app_browser, app_url, app_browser, app_url,
base::Bind(&ExecuteContextMenuLinkCommandAndWait, base::BindOnce(&ExecuteContextMenuLinkCommandAndWait,
app_browser->tab_strip_model()->GetActiveWebContents(), app_browser->tab_strip_model()->GetActiveWebContents(),
app_url, IDC_CONTENT_CONTEXT_OPENLINKNEWTAB)); app_url, IDC_CONTENT_CONTEXT_OPENLINKNEWTAB));
...@@ -1335,7 +1344,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -1335,7 +1344,8 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath);
TestActionDoesNotOpenAppWindow( TestActionDoesNotOpenAppWindow(
incognito_browser, in_scope_url, incognito_browser, in_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(
&ClickLinkAndWait,
incognito_browser->tab_strip_model()->GetActiveWebContents(), incognito_browser->tab_strip_model()->GetActiveWebContents(),
in_scope_url, LinkTarget::SELF, GetParam())); in_scope_url, LinkTarget::SELF, GetParam()));
...@@ -1355,13 +1365,13 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -1355,13 +1365,13 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath);
NavigateParams params(browser(), out_of_scope_url, ui::PAGE_TRANSITION_TYPED); NavigateParams params(browser(), out_of_scope_url, ui::PAGE_TRANSITION_TYPED);
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
out_of_scope_url, base::Bind(&NavigateToURLWrapper, &params))); out_of_scope_url, base::BindOnce(&NavigateToURLWrapper, &params)));
const GURL in_scope_url = const GURL in_scope_url =
embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionOpensAppWindow( TestTabActionOpensAppWindow(
in_scope_url, in_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
in_scope_url, LinkTarget::SELF, GetParam())); in_scope_url, LinkTarget::SELF, GetParam()));
...@@ -1382,13 +1392,13 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -1382,13 +1392,13 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath);
NavigateParams params(browser(), out_of_scope_url, ui::PAGE_TRANSITION_TYPED); NavigateParams params(browser(), out_of_scope_url, ui::PAGE_TRANSITION_TYPED);
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
out_of_scope_url, base::Bind(&NavigateToURLWrapper, &params))); out_of_scope_url, base::BindOnce(&NavigateToURLWrapper, &params)));
const GURL in_scope_url = const GURL in_scope_url =
embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
TestTabActionOpensAppWindow( TestTabActionOpensAppWindow(
in_scope_url, in_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
in_scope_url, LinkTarget::BLANK, GetParam())); in_scope_url, LinkTarget::BLANK, GetParam()));
...@@ -1408,14 +1418,14 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -1408,14 +1418,14 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath); const GURL app_url = embedded_test_server()->GetURL(kAppUrlHost, kAppUrlPath);
NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_TYPED); NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_TYPED);
ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow( ASSERT_TRUE(TestTabActionDoesNotOpenAppWindow(
app_url, base::Bind(&NavigateToURLWrapper, &params))); app_url, base::BindOnce(&NavigateToURLWrapper, &params)));
base::HistogramTester scoped_histogram; base::HistogramTester scoped_histogram;
const GURL in_scope_url = const GURL in_scope_url =
embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath);
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
in_scope_url, in_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(&ClickLinkAndWait,
browser()->tab_strip_model()->GetActiveWebContents(), browser()->tab_strip_model()->GetActiveWebContents(),
in_scope_url, LinkTarget::SELF, GetParam())); in_scope_url, LinkTarget::SELF, GetParam()));
...@@ -1441,7 +1451,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -1441,7 +1451,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_AUTO_BOOKMARK); NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_AUTO_BOOKMARK);
TestTabActionDoesNotOpenAppWindow( TestTabActionDoesNotOpenAppWindow(
embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath), embedded_test_server()->GetURL(kAppUrlHost, kInScopeUrlPath),
base::Bind(&NavigateToURLWrapper, &params)); base::BindOnce(&NavigateToURLWrapper, &params));
// The first AUTO_BOOKMARK navigation is the one we triggered and the second // The first AUTO_BOOKMARK navigation is the one we triggered and the second
// one is the redirect. // one is the redirect.
...@@ -1465,8 +1475,8 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest, ...@@ -1465,8 +1475,8 @@ IN_PROC_BROWSER_TEST_F(BookmarkAppNavigationThrottleBrowserTest,
const GURL app_url = AppLaunchInfo::GetFullLaunchURL(app); const GURL app_url = AppLaunchInfo::GetFullLaunchURL(app);
NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_AUTO_BOOKMARK); NavigateParams params(browser(), app_url, ui::PAGE_TRANSITION_AUTO_BOOKMARK);
TestTabActionDoesNotOpenAppWindow(GetLaunchingPageURL(), TestTabActionDoesNotOpenAppWindow(
base::Bind(&NavigateToURLWrapper, &params)); GetLaunchingPageURL(), base::BindOnce(&NavigateToURLWrapper, &params));
ExpectNavigationResultHistogramEquals( ExpectNavigationResultHistogramEquals(
global_histogram(), global_histogram(),
...@@ -1516,7 +1526,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest, ...@@ -1516,7 +1526,7 @@ IN_PROC_BROWSER_TEST_P(BookmarkAppNavigationThrottleLinkBrowserTest,
embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath); embedded_test_server()->GetURL(kAppUrlHost, kOutOfScopeUrlPath);
TestAppActionOpensForegroundTab( TestAppActionOpensForegroundTab(
app_browser, out_of_scope_url, app_browser, out_of_scope_url,
base::Bind(&ClickLinkAndWait, base::BindOnce(&ClickLinkAndWait,
app_browser->tab_strip_model()->GetActiveWebContents(), app_browser->tab_strip_model()->GetActiveWebContents(),
out_of_scope_url, LinkTarget::SELF, GetParam())); out_of_scope_url, LinkTarget::SELF, GetParam()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment