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

Unified Diff: chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc

Issue 9706012: Add abstractions that let embedders drive tests of WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CONTENT_EXPORT on statically linked functions. Merge to head for commit. Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/favicon/favicon_handler_unittest.cc ('k') | chrome/browser/instant/instant_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
index cd583458772eafeae3d2cf0a03beb2ac66ab137a..630755e6804b7944a4d64f23ecd0a521b6a9d1e7 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
@@ -19,20 +19,22 @@
#include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
#include "content/test/mock_geolocation.h"
#include "content/test/mock_render_process_host.h"
#include "content/test/test_browser_thread.h"
#include "content/test/test_renderer_host.h"
+#include "content/test/web_contents_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
using content::MockRenderProcessHost;
using content::RenderViewHostTester;
using content::WebContents;
+using content::WebContentsTester;
// ClosedDelegateTracker ------------------------------------------------------
@@ -590,7 +592,7 @@ TEST_F(GeolocationPermissionContextTests, InfoBarUsesCommittedEntry) {
details.entry = contents()->GetController().GetLastCommittedEntry();
ASSERT_FALSE(infobar_0->ShouldExpire(details));
// Commit the "GoBack()" above, and ensure the infobar is now expired.
- contents()->CommitPendingNavigation();
+ WebContentsTester::For(contents())->CommitPendingNavigation();
details.entry = contents()->GetController().GetLastCommittedEntry();
ASSERT_TRUE(infobar_0->ShouldExpire(details));
« no previous file with comments | « chrome/browser/favicon/favicon_handler_unittest.cc ('k') | chrome/browser/instant/instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698