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

Unified Diff: chrome/browser/chromeos/offline/offline_load_page_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
Index: chrome/browser/chromeos/offline/offline_load_page_unittest.cc
diff --git a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
index b307cd14a41d4bcba8381e9051f876447e3c7e35..32d275e7e50772d0cf0e8649ede503b81dc98bc1 100644
--- a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
+++ b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc
@@ -5,12 +5,16 @@
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/offline/offline_load_page.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
-#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/public/browser/interstitial_page.h"
+#include "content/public/browser/navigation_controller.h"
+#include "content/public/browser/web_contents.h"
#include "content/test/test_browser_thread.h"
+#include "content/test/web_contents_tester.h"
using content::BrowserThread;
using content::InterstitialPage;
+using content::WebContents;
+using content::WebContentsTester;
static const char* kURL1 = "http://www.google.com/";
static const char* kURL2 = "http://www.gmail.com/";
@@ -22,10 +26,10 @@ class OfflineLoadPageTest;
// An OfflineLoadPage class that does not create windows.
class TestOfflineLoadPage : public chromeos::OfflineLoadPage {
public:
- TestOfflineLoadPage(TabContents* tab_contents,
+ TestOfflineLoadPage(WebContents* web_contents,
const GURL& url,
OfflineLoadPageTest* test_page)
- : chromeos::OfflineLoadPage(tab_contents, url, CompletionCallback()),
+ : chromeos::OfflineLoadPage(web_contents, url, CompletionCallback()),
test_page_(test_page) {
interstitial_page_->DontCreateViewForTesting();
}
@@ -68,7 +72,7 @@ class OfflineLoadPageTest : public ChromeRenderViewHostTestHarness {
}
void Navigate(const char* url, int page_id) {
- contents()->TestDidNavigate(
+ WebContentsTester::For(contents())->TestDidNavigate(
contents()->GetRenderViewHost(), page_id, GURL(url),
content::PAGE_TRANSITION_TYPED);
}
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.h ('k') | chrome/browser/content_settings/tab_specific_content_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698