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

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

Issue 426713002: Revert of Fix the handling of user gestures for external protocol handler dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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 0b27465e98f17b5d7061d50224b26ed7f73e75f2..cce6ba2dacac4b7d415112bb50a4669159aef7c7 100644
--- a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
+++ b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
@@ -51,8 +51,9 @@ class FakeExternalProtocolHandlerDelegate
}
virtual ExternalProtocolHandler::BlockState GetBlockState(
- const std::string& scheme,
- bool initiated_by_user_gesture) OVERRIDE { return block_state_; }
+ const std::string& scheme) OVERRIDE {
+ return block_state_;
+ }
virtual void BlockRequest() OVERRIDE {
ASSERT_TRUE(block_state_ == ExternalProtocolHandler::BLOCK ||
@@ -108,6 +109,11 @@ class ExternalProtocolHandlerTest : public testing::Test {
file_thread_.Start();
}
+ virtual void TearDown() {
+ // Ensure that g_accept_requests gets set back to true after test execution.
+ ExternalProtocolHandler::PermitLaunchUrl();
+ }
+
void DoTest(ExternalProtocolHandler::BlockState block_state,
ShellIntegration::DefaultWebClientState os_state,
bool should_prompt, bool should_launch, bool should_block) {
@@ -118,7 +124,7 @@ class ExternalProtocolHandlerTest : public testing::Test {
delegate_.set_block_state(block_state);
delegate_.set_os_state(os_state);
- ExternalProtocolHandler::LaunchUrlWithDelegate(url, 0, 0, &delegate_, true);
+ ExternalProtocolHandler::LaunchUrlWithDelegate(url, 0, 0, &delegate_);
if (block_state != ExternalProtocolHandler::BLOCK)
base::MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698