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

Side by Side Diff: content/browser/web_contents/navigation_controller_impl_unittest.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after
3415 // Release profile's reference to the session service. Otherwise the file 3415 // Release profile's reference to the session service. Otherwise the file
3416 // will still be open and we won't be able to delete the directory below. 3416 // will still be open and we won't be able to delete the directory below.
3417 session_helper_.ReleaseService(); // profile owns this 3417 session_helper_.ReleaseService(); // profile owns this
3418 SessionServiceFactory::SetForTestProfile(profile(), NULL); 3418 SessionServiceFactory::SetForTestProfile(profile(), NULL);
3419 3419
3420 // Make sure we wait for history to shut down before continuing. The task 3420 // Make sure we wait for history to shut down before continuing. The task
3421 // we add will cause our message loop to quit once it is destroyed. 3421 // we add will cause our message loop to quit once it is destroyed.
3422 HistoryService* history = HistoryServiceFactory::GetForProfiles( 3422 HistoryService* history = HistoryServiceFactory::GetForProfiles(
3423 profile(), Profile::IMPLICIT_ACCESS); 3423 profile(), Profile::IMPLICIT_ACCESS);
3424 if (history) { 3424 if (history) {
3425 history->SetOnBackendDestroyTask(MessageLoop::QuitClosure()); 3425 history->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure());
3426 MessageLoop::current()->Run(); 3426 base::MessageLoop::current()->Run();
3427 } 3427 }
3428 3428
3429 // Do normal cleanup before deleting the profile directory below. 3429 // Do normal cleanup before deleting the profile directory below.
3430 NavigationControllerTest::TearDown(); 3430 NavigationControllerTest::TearDown();
3431 3431
3432 ASSERT_TRUE(file_util::Delete(test_dir_, true)); 3432 ASSERT_TRUE(file_util::Delete(test_dir_, true));
3433 ASSERT_FALSE(file_util::PathExists(test_dir_)); 3433 ASSERT_FALSE(file_util::PathExists(test_dir_));
3434 } 3434 }
3435 3435
3436 // Deletes the current profile manager and creates a new one. Indirectly this 3436 // Deletes the current profile manager and creates a new one. Indirectly this
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
3546 PAGE_TRANSITION_LINK); 3546 PAGE_TRANSITION_LINK);
3547 session_helper_.AssertNavigationEquals(nav, 3547 session_helper_.AssertNavigationEquals(nav,
3548 windows_[0]->tabs[0]->navigations[0]); 3548 windows_[0]->tabs[0]->navigations[0]);
3549 nav.set_url(url2); 3549 nav.set_url(url2);
3550 session_helper_.AssertNavigationEquals(nav, 3550 session_helper_.AssertNavigationEquals(nav,
3551 windows_[0]->tabs[0]->navigations[1]); 3551 windows_[0]->tabs[0]->navigations[1]);
3552 } 3552 }
3553 */ 3553 */
3554 3554
3555 } // namespace content 3555 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698