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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_browsertest.cc

Issue 11470013: IndexedDB: Tests for unknown serialized data versions in backing stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landed test data separately Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion123456Schema, 282 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion123456Schema,
283 DestroyTest) { 283 DestroyTest) {
284 int64 original_size = RequestDiskUsage(); 284 int64 original_size = RequestDiskUsage();
285 EXPECT_GT(original_size, 0); 285 EXPECT_GT(original_size, 0);
286 SimpleTest(GetTestUrl("indexeddb", "open_bad_db.html")); 286 SimpleTest(GetTestUrl("indexeddb", "open_bad_db.html"));
287 int64 new_size = RequestDiskUsage(); 287 int64 new_size = RequestDiskUsage();
288 EXPECT_NE(original_size, new_size); 288 EXPECT_NE(original_size, new_size);
289 } 289 }
290 290
291 class IndexedDBBrowserTestWithVersion987654SSVData : public
292 IndexedDBBrowserTestWithPreexistingLevelDB {
293 virtual std::string EnclosingLevelDBDir() {
294 return "ssv_version_987654";
295 }
296 };
297
298 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion987654SSVData,
299 DestroyTest) {
300 int64 original_size = RequestDiskUsage();
301 EXPECT_GT(original_size, 0);
302 SimpleTest(GetTestUrl("indexeddb", "open_bad_db.html"));
303 int64 new_size = RequestDiskUsage();
304 EXPECT_NE(original_size, new_size);
305 }
306
291 class IndexedDBBrowserTestWithCorruptLevelDB : public 307 class IndexedDBBrowserTestWithCorruptLevelDB : public
292 IndexedDBBrowserTestWithPreexistingLevelDB { 308 IndexedDBBrowserTestWithPreexistingLevelDB {
293 virtual std::string EnclosingLevelDBDir() { 309 virtual std::string EnclosingLevelDBDir() {
294 return "corrupt_leveldb"; 310 return "corrupt_leveldb";
295 } 311 }
296 }; 312 };
297 313
298 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithCorruptLevelDB, 314 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithCorruptLevelDB,
299 DestroyTest) { 315 DestroyTest) {
300 int64 original_size = RequestDiskUsage(); 316 int64 original_size = RequestDiskUsage();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); 386 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16);
371 387
372 base::KillProcess( 388 base::KillProcess(
373 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true); 389 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true);
374 shell()->Close(); 390 shell()->Close();
375 391
376 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); 392 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
377 } 393 }
378 394
379 } // namespace content 395 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698