| OLD | NEW |
| 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 3750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3761 profile(), Profile::IMPLICIT_ACCESS); | 3761 profile(), Profile::IMPLICIT_ACCESS); |
| 3762 if (history) { | 3762 if (history) { |
| 3763 history->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure()); | 3763 history->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure()); |
| 3764 base::MessageLoop::current()->Run(); | 3764 base::MessageLoop::current()->Run(); |
| 3765 } | 3765 } |
| 3766 | 3766 |
| 3767 // Do normal cleanup before deleting the profile directory below. | 3767 // Do normal cleanup before deleting the profile directory below. |
| 3768 NavigationControllerTest::TearDown(); | 3768 NavigationControllerTest::TearDown(); |
| 3769 | 3769 |
| 3770 ASSERT_TRUE(base::Delete(test_dir_, true)); | 3770 ASSERT_TRUE(base::Delete(test_dir_, true)); |
| 3771 ASSERT_FALSE(file_util::PathExists(test_dir_)); | 3771 ASSERT_FALSE(base::PathExists(test_dir_)); |
| 3772 } | 3772 } |
| 3773 | 3773 |
| 3774 // Deletes the current profile manager and creates a new one. Indirectly this | 3774 // Deletes the current profile manager and creates a new one. Indirectly this |
| 3775 // shuts down the history database and reopens it. | 3775 // shuts down the history database and reopens it. |
| 3776 void ReopenDatabase() { | 3776 void ReopenDatabase() { |
| 3777 session_helper_.set_service(NULL); | 3777 session_helper_.set_service(NULL); |
| 3778 SessionServiceFactory::SetForTestProfile(profile(), NULL); | 3778 SessionServiceFactory::SetForTestProfile(profile(), NULL); |
| 3779 | 3779 |
| 3780 SessionService* service = new SessionService(profile()); | 3780 SessionService* service = new SessionService(profile()); |
| 3781 SessionServiceFactory::SetForTestProfile(profile(), service); | 3781 SessionServiceFactory::SetForTestProfile(profile(), service); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3884 PAGE_TRANSITION_LINK); | 3884 PAGE_TRANSITION_LINK); |
| 3885 session_helper_.AssertNavigationEquals(nav, | 3885 session_helper_.AssertNavigationEquals(nav, |
| 3886 windows_[0]->tabs[0]->navigations[0]); | 3886 windows_[0]->tabs[0]->navigations[0]); |
| 3887 nav.set_url(url2); | 3887 nav.set_url(url2); |
| 3888 session_helper_.AssertNavigationEquals(nav, | 3888 session_helper_.AssertNavigationEquals(nav, |
| 3889 windows_[0]->tabs[0]->navigations[1]); | 3889 windows_[0]->tabs[0]->navigations[1]); |
| 3890 } | 3890 } |
| 3891 */ | 3891 */ |
| 3892 | 3892 |
| 3893 } // namespace content | 3893 } // namespace content |
| OLD | NEW |