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

Side by Side Diff: content/browser/renderer_host/render_view_host_manager_browsertest.cc

Issue 10825085: Move RunAllPendingInMessageLoop from ui_test_utils.h to test_utils.h, so that it can be reused by c… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/test/base/view_event_test_base.cc ('k') | content/public/test/test_utils.h » ('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) 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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/site_instance_impl.h" 10 #include "content/browser/site_instance_impl.h"
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 // Ensure that view-source navigations force a new SiteInstance. 1007 // Ensure that view-source navigations force a new SiteInstance.
1008 EXPECT_NE(site_instance1, site_instance2); 1008 EXPECT_NE(site_instance1, site_instance2);
1009 1009
1010 // Now navigate to a different instance so that we swap out again. 1010 // Now navigate to a different instance so that we swap out again.
1011 NavigateToURL(shell(), https_server.GetURL("files/title2.html")); 1011 NavigateToURL(shell(), https_server.GetURL("files/title2.html"));
1012 rvh_observers.AddObserverToRVH(shell()->web_contents()->GetRenderViewHost()); 1012 rvh_observers.AddObserverToRVH(shell()->web_contents()->GetRenderViewHost());
1013 1013
1014 // This used to leak a render view host. 1014 // This used to leak a render view host.
1015 shell()->Close(); 1015 shell()->Close();
1016 1016
1017 MessageLoop::current()->PostTask(FROM_HERE, 1017 RunAllPendingInMessageLoop(); // Needed on ChromeOS.
1018 MessageLoop::QuitWhenIdleClosure());
1019 content::RunMessageLoop();
1020 1018
1021 EXPECT_EQ(0U, rvh_observers.GetNumObservers()); 1019 EXPECT_EQ(0U, rvh_observers.GetNumObservers());
1022 } 1020 }
1023 1021
1024 } // namespace content 1022 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698