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

Unified Diff: chrome/browser/browsing_data_local_storage_helper_browsertest.cc

Issue 7480041: Adding session-only localStorage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Adding tests. Created 9 years, 5 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_local_storage_helper_browsertest.cc
diff --git a/chrome/browser/browsing_data_local_storage_helper_browsertest.cc b/chrome/browser/browsing_data_local_storage_helper_browsertest.cc
index e2850663d6d59252a3edf8cedffcb212430c0188..ff26e25f7c6d8c703875aeea5399d0a23d008742 100644
--- a/chrome/browser/browsing_data_local_storage_helper_browsertest.cc
+++ b/chrome/browser/browsing_data_local_storage_helper_browsertest.cc
@@ -17,6 +17,7 @@
#include "chrome/test/ui_test_utils.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/in_process_webkit/webkit_thread.h"
+#include "content/browser/mock_resource_context.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -38,6 +39,14 @@ const FilePath::CharType kTestFileExtension[] = FILE_PATH_LITERAL(
"chrome-extension_behllobkkfkfnphdnhnkndlbkcpglgmj_0.localstorage");
class BrowsingDataLocalStorageHelperTest : public InProcessBrowserTest {
+ public:
+ virtual void SetUpOnMainThread() {
+ // Make sure TestURLRequestContext gets initliazed early enough (it needs to
+ // be constructed in the UI thread). Normally Profile's URLRequestContext is
+ // initialized early enough, but the same is not true for the
+ // TestingProfile.
+ content::MockResourceContext::GetInstance();
+ }
protected:
void CreateLocalStorageFilesForTest() {
FilePath storage_path = GetLocalStoragePathForTestingProfile();

Powered by Google App Engine
This is Rietveld 408576698