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

Side by Side 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, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
8 #include "content/browser/dom_storage/local_storage_context_mojo.h" 8 #include "content/browser/dom_storage/local_storage_context_mojo.h"
9 #include "content/browser/web_contents/web_contents_impl.h" 9 #include "content/browser/web_contents/web_contents_impl.h"
10 #include "content/common/dom_storage/dom_storage_types.h" 10 #include "content/common/dom_storage/dom_storage_types.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, PRE_DataPersists) { 109 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, PRE_DataPersists) {
110 EnsureConnected(); 110 EnsureConnected();
111 SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito); 111 SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito);
112 Flush(); 112 Flush();
113 } 113 }
114 114
115 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, MAYBE_DataPersists) { 115 IN_PROC_BROWSER_TEST_F(MojoDOMStorageBrowserTest, MAYBE_DataPersists) {
116 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito); 116 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito);
117 } 117 }
118 118
119 class DOMStorageMigrationBrowserTest : public DOMStorageBrowserTest {
120 public:
121 void SetUpCommandLine(base::CommandLine* command_line) override {
122 ContentBrowserTest::SetUpCommandLine(command_line);
123 // Only enable mojo local storage if this is not a PRE_ test.
124 const testing::TestInfo* test =
125 testing::UnitTest::GetInstance()->current_test_info();
126 if (!base::StartsWith(test->name(), "PRE_", base::CompareCase::SENSITIVE))
127 command_line->AppendSwitch(switches::kMojoLocalStorage);
128 }
129 };
130
131 IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, PRE_DataMigrates) {
132 SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito);
133 }
134
135 // http://crbug.com/654704 PRE_ tests aren't supported on Android.
136 #if defined(OS_ANDROID)
137 #define MAYBE_DataMigrates DISABLED_DataMigrates
138 #else
139 #define MAYBE_DataMigrates DataMigrates
140 #endif
141 IN_PROC_BROWSER_TEST_F(DOMStorageMigrationBrowserTest, MAYBE_DataMigrates) {
142 SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito);
143 }
144
119 } // namespace content 145 } // namespace content
OLDNEW
« 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