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

Side by Side Diff: chrome/browser/external_protocol/external_protocol_handler_unittest.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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/browser/external_protocol/external_protocol_handler.h" 5 #include "chrome/browser/external_protocol/external_protocol_handler.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "content/public/test/test_browser_thread.h" 8 #include "content/public/test/test_browser_thread.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 has_prompted_ = true; 78 has_prompted_ = true;
79 } 79 }
80 80
81 void LaunchUrlWithoutSecurityCheck(const GURL& url) override { 81 void LaunchUrlWithoutSecurityCheck(const GURL& url) override {
82 ASSERT_EQ(block_state_, ExternalProtocolHandler::DONT_BLOCK); 82 ASSERT_EQ(block_state_, ExternalProtocolHandler::DONT_BLOCK);
83 ASSERT_NE(os_state_, ShellIntegration::IS_DEFAULT); 83 ASSERT_NE(os_state_, ShellIntegration::IS_DEFAULT);
84 has_launched_ = true; 84 has_launched_ = true;
85 } 85 }
86 86
87 void FinishedProcessingCheck() override { 87 void FinishedProcessingCheck() override {
88 base::MessageLoop::current()->Quit(); 88 base::MessageLoop::current()->QuitWhenIdle();
89 } 89 }
90 90
91 void set_os_state(ShellIntegration::DefaultWebClientState value) { 91 void set_os_state(ShellIntegration::DefaultWebClientState value) {
92 os_state_ = value; 92 os_state_ = value;
93 } 93 }
94 94
95 void set_block_state(ExternalProtocolHandler::BlockState value) { 95 void set_block_state(ExternalProtocolHandler::BlockState value) {
96 block_state_ = value; 96 block_state_ = value;
97 } 97 }
98 98
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 DoTest(ExternalProtocolHandler::UNKNOWN, 194 DoTest(ExternalProtocolHandler::UNKNOWN,
195 ShellIntegration::NOT_DEFAULT, 195 ShellIntegration::NOT_DEFAULT,
196 true, false, false); 196 true, false, false);
197 } 197 }
198 198
199 TEST_F(ExternalProtocolHandlerTest, TestLaunchSchemeUnknownChromeUnknown) { 199 TEST_F(ExternalProtocolHandlerTest, TestLaunchSchemeUnknownChromeUnknown) {
200 DoTest(ExternalProtocolHandler::UNKNOWN, 200 DoTest(ExternalProtocolHandler::UNKNOWN,
201 ShellIntegration::UNKNOWN_DEFAULT, 201 ShellIntegration::UNKNOWN_DEFAULT,
202 true, false, false); 202 true, false, false);
203 } 203 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/permissions_updater_unittest.cc ('k') | chrome/browser/first_run/try_chrome_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698