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

Unified Diff: content/browser/dom_storage/dom_storage_browsertest.cc

Issue 2767103002: Fix localstorage data migration. (Closed)
Patch Set: share one encoding function Created 3 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 | « no previous file | content/browser/dom_storage/local_storage_context_mojo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_browsertest.cc
diff --git a/content/browser/dom_storage/dom_storage_browsertest.cc b/content/browser/dom_storage/dom_storage_browsertest.cc
index 543bbf4ed4d20dec35870933dec90bb1e40e7322..8c4b74502697de74a685be09ca0bf7cf4e820199 100644
--- a/content/browser/dom_storage/dom_storage_browsertest.cc
+++ b/content/browser/dom_storage/dom_storage_browsertest.cc
@@ -116,4 +116,30 @@ IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, MAYBE_DataPersists) {
SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito);
}
+class DOMStorageMigrationBrowserTest : public DOMStorageBrowserTest {
+ public:
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ ContentBrowserTest::SetUpCommandLine(command_line);
+ // Only enable mojo local storage if this is not a PRE_ test.
+ const testing::TestInfo* test =
+ testing::UnitTest::GetInstance()->current_test_info();
+ if (!base::StartsWith(test->name(), "PRE_", base::CompareCase::SENSITIVE))
+ command_line->AppendSwitch(switches::kMojoLocalStorage);
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, PRE_DataMigrates) {
+ SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito);
+}
+
+// http://crbug.com/654704 PRE_ tests aren't supported on Android.
+#if defined(OS_ANDROID)
+#define MAYBE_DataMigrates DISABLED_DataMigrates
+#else
+#define MAYBE_DataMigrates DataMigrates
+#endif
+IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, MAYBE_DataMigrates) {
+ SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito);
+}
+
} // namespace content
« no previous file with comments | « no previous file | content/browser/dom_storage/local_storage_context_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698