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

Side by Side Diff: chrome/browser/importer/toolbar_importer_utils_browsertest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/importer/importer_host.cc ('k') | chrome/browser/internal_auth_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "chrome/browser/importer/toolbar_importer_utils.h" 7 #include "chrome/browser/importer/toolbar_importer_utils.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
11 11
12 namespace { 12 namespace {
13 13
14 class ToolbarImporterUtilsTest : public InProcessBrowserTest { 14 class ToolbarImporterUtilsTest : public InProcessBrowserTest {
15 public: 15 public:
16 ToolbarImporterUtilsTest() : did_run_(false) { 16 ToolbarImporterUtilsTest() : did_run_(false) {
17 } 17 }
18 18
19 void Callback(bool result) { 19 void Callback(bool result) {
20 DCHECK(!result); 20 DCHECK(!result);
21 did_run_ = true; 21 did_run_ = true;
22 MessageLoop::current()->Quit(); 22 base::MessageLoop::current()->Quit();
23 } 23 }
24 24
25 protected: 25 protected:
26 bool did_run_; 26 bool did_run_;
27 }; 27 };
28 28
29 IN_PROC_BROWSER_TEST_F(ToolbarImporterUtilsTest, NoCrash) { 29 IN_PROC_BROWSER_TEST_F(ToolbarImporterUtilsTest, NoCrash) {
30 // Regression test for http://crbug.com/89752 30 // Regression test for http://crbug.com/89752
31 toolbar_importer_utils::IsGoogleGAIACookieInstalled( 31 toolbar_importer_utils::IsGoogleGAIACookieInstalled(
32 base::Bind(&ToolbarImporterUtilsTest::Callback, 32 base::Bind(&ToolbarImporterUtilsTest::Callback,
33 base::Unretained(this)), 33 base::Unretained(this)),
34 browser()->profile()); 34 browser()->profile());
35 if (!did_run_) { 35 if (!did_run_) {
36 content::RunMessageLoop(); 36 content::RunMessageLoop();
37 } 37 }
38 ASSERT_TRUE(did_run_); 38 ASSERT_TRUE(did_run_);
39 } 39 }
40 40
41 } // namespace 41 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/importer/importer_host.cc ('k') | chrome/browser/internal_auth_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698