Commit 83db0cb4 authored by rnk@chromium.org's avatar rnk@chromium.org

Isolate ExternalProtocolHandlerTest from other tests in the TearDown method.

The issue is that these tests call LaunchUrlWithDelegate(), which sets
g_accept_requests to false unconditionally.  This can cause other tests, such
as AutocompleteInput.InputType, to fail if run with different sharding or
different ordering.

The solution is to call PermitLaunchUrl() from the TearDown method, which
resets g_accept_requests to true.

R=benwells@chromium.org
BUG=105574
TEST=Run unit_tests.exe with three shards and watch the DrMemory bots


Review URL: http://codereview.chromium.org/8763006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112404 0039d316-1c4b-4281-b951-d872f2087c98
parent b83949e5
...@@ -102,6 +102,11 @@ class ExternalProtocolHandlerTest : public testing::Test { ...@@ -102,6 +102,11 @@ class ExternalProtocolHandlerTest : public testing::Test {
file_thread_.Start(); 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, void DoTest(ExternalProtocolHandler::BlockState block_state,
ShellIntegration::DefaultWebClientState os_state, ShellIntegration::DefaultWebClientState os_state,
bool should_prompt, bool should_launch, bool should_block) { bool should_prompt, bool should_launch, bool should_block) {
......
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