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

Side by Side Diff: content/browser/tab_contents/navigation_controller_unittest.cc

Issue 8872030: Removing MessageLoop::QuitTask() from content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix escaping Created 9 years 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) 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
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
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 */
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_unittest.cc ('k') | content/common/net/url_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698