OLD | NEW |
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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2276 // Release profile's reference to the session service. Otherwise the file | 2276 // Release profile's reference to the session service. Otherwise the file |
2277 // will still be open and we won't be able to delete the directory below. | 2277 // will still be open and we won't be able to delete the directory below. |
2278 session_helper_.ReleaseService(); // profile owns this | 2278 session_helper_.ReleaseService(); // profile owns this |
2279 SessionServiceFactory::SetForTestProfile(profile(), NULL); | 2279 SessionServiceFactory::SetForTestProfile(profile(), NULL); |
2280 | 2280 |
2281 // Make sure we wait for history to shut down before continuing. The task | 2281 // Make sure we wait for history to shut down before continuing. The task |
2282 // we add will cause our message loop to quit once it is destroyed. | 2282 // we add will cause our message loop to quit once it is destroyed. |
2283 HistoryService* history = | 2283 HistoryService* history = |
2284 profile()->GetHistoryService(Profile::IMPLICIT_ACCESS); | 2284 profile()->GetHistoryService(Profile::IMPLICIT_ACCESS); |
2285 if (history) { | 2285 if (history) { |
2286 history->SetOnBackendDestroyTask(new MessageLoop::QuitTask); | 2286 history->SetOnBackendDestroyTask(MessageLoop::QuitClosure()); |
2287 MessageLoop::current()->Run(); | 2287 MessageLoop::current()->Run(); |
2288 } | 2288 } |
2289 | 2289 |
2290 // Do normal cleanup before deleting the profile directory below. | 2290 // Do normal cleanup before deleting the profile directory below. |
2291 NavigationControllerTest::TearDown(); | 2291 NavigationControllerTest::TearDown(); |
2292 | 2292 |
2293 ASSERT_TRUE(file_util::Delete(test_dir_, true)); | 2293 ASSERT_TRUE(file_util::Delete(test_dir_, true)); |
2294 ASSERT_FALSE(file_util::PathExists(test_dir_)); | 2294 ASSERT_FALSE(file_util::PathExists(test_dir_)); |
2295 } | 2295 } |
2296 | 2296 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2402 TabNavigation nav(0, url0, GURL(), string16(), | 2402 TabNavigation nav(0, url0, GURL(), string16(), |
2403 webkit_glue::CreateHistoryStateForURL(url0), | 2403 webkit_glue::CreateHistoryStateForURL(url0), |
2404 content::PAGE_TRANSITION_LINK); | 2404 content::PAGE_TRANSITION_LINK); |
2405 session_helper_.AssertNavigationEquals(nav, | 2405 session_helper_.AssertNavigationEquals(nav, |
2406 windows_[0]->tabs[0]->navigations[0]); | 2406 windows_[0]->tabs[0]->navigations[0]); |
2407 nav.set_url(url2); | 2407 nav.set_url(url2); |
2408 session_helper_.AssertNavigationEquals(nav, | 2408 session_helper_.AssertNavigationEquals(nav, |
2409 windows_[0]->tabs[0]->navigations[1]); | 2409 windows_[0]->tabs[0]->navigations[1]); |
2410 } | 2410 } |
2411 */ | 2411 */ |
OLD | NEW |