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

Unified Diff: chrome/browser/external_protocol/external_protocol_handler_unittest.cc

Issue 1091253008: Fix an issue that external protocol in subframes are not handled on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix test Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/external_protocol/external_protocol_handler_unittest.cc
diff --git a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
index 1aac925915287ac0527a9c2e69d0c17390f8c694..53cfd6633c2a8082b30a4f915820805abb46137c 100644
--- a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
+++ b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
@@ -40,7 +40,7 @@ class FakeExternalProtocolHandlerDelegate
os_state_(ShellIntegration::UNKNOWN_DEFAULT),
has_launched_(false),
has_prompted_(false),
- has_blocked_ (false) {}
+ has_blocked_(false) {}
ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker(
ShellIntegration::DefaultWebClientObserver* observer,
@@ -61,7 +61,9 @@ class FakeExternalProtocolHandlerDelegate
void RunExternalProtocolDialog(const GURL& url,
int render_process_host_id,
- int routing_id) override {
+ int routing_id,
+ ui::PageTransition page_transition,
+ bool has_user_gesture) override {
ASSERT_EQ(block_state_, ExternalProtocolHandler::UNKNOWN);
ASSERT_NE(os_state_, ShellIntegration::IS_DEFAULT);
has_prompted_ = true;
@@ -120,7 +122,8 @@ class ExternalProtocolHandlerTest : public testing::Test {
delegate_.set_block_state(block_state);
delegate_.set_os_state(os_state);
- ExternalProtocolHandler::LaunchUrlWithDelegate(url, 0, 0, &delegate_);
+ ExternalProtocolHandler::LaunchUrlWithDelegate(
+ url, 0, 0, ui::PAGE_TRANSITION_LINK, true, &delegate_);
if (block_state != ExternalProtocolHandler::BLOCK)
base::MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698