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

Unified Diff: chrome/browser/browsing_data_database_helper_browsertest.cc

Issue 7552029: Revert 96098 - ui_tests began crashing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data_database_helper_browsertest.cc
===================================================================
--- chrome/browser/browsing_data_database_helper_browsertest.cc (revision 96106)
+++ chrome/browser/browsing_data_database_helper_browsertest.cc (working copy)
@@ -6,9 +6,8 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/browsing_data_database_helper.h"
#include "chrome/browser/browsing_data_helper_browsertest.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
+#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/browser_thread.h"
@@ -25,7 +24,7 @@
public:
virtual void CreateDatabases() {
webkit_database::DatabaseTracker* db_tracker =
- browser()->profile()->GetDatabaseTracker();
+ testing_profile_.GetDatabaseTracker();
string16 db_name = ASCIIToUTF16("db");
string16 description = ASCIIToUTF16("db_description");
int64 size;
@@ -47,6 +46,9 @@
db_tracker->GetAllOriginsInfo(&origins);
ASSERT_EQ(2U, origins.size());
}
+
+ protected:
+ TestingProfile testing_profile_;
};
// Called back by BrowsingDataDatabaseHelper on the UI thread once the database
@@ -75,7 +77,7 @@
IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, FetchData) {
CreateDatabases();
scoped_refptr<BrowsingDataDatabaseHelper> database_helper(
- new BrowsingDataDatabaseHelper(browser()->profile()));
+ new BrowsingDataDatabaseHelper(&testing_profile_));
StopTestOnCallback stop_test_on_callback(database_helper);
database_helper->StartFetching(
NewCallback(&stop_test_on_callback, &StopTestOnCallback::Callback));
@@ -93,7 +95,7 @@
const char db3[] = "db3";
scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
- new CannedBrowsingDataDatabaseHelper(browser()->profile()));
+ new CannedBrowsingDataDatabaseHelper(&testing_profile_));
helper->AddDatabase(origin1, db1, "");
helper->AddDatabase(origin1, db2, "");
helper->AddDatabase(origin2, db3, "");
@@ -120,7 +122,7 @@
const char db[] = "db1";
scoped_refptr<CannedBrowsingDataDatabaseHelper> helper(
- new CannedBrowsingDataDatabaseHelper(browser()->profile()));
+ new CannedBrowsingDataDatabaseHelper(&testing_profile_));
helper->AddDatabase(origin, db, "");
helper->AddDatabase(origin, db, "");
« no previous file with comments | « chrome/browser/bookmarks/bookmark_node_data_unittest.cc ('k') | chrome/browser/browsing_data_indexed_db_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698