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

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

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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 | sql/BUILD.gn » ('j') | third_party/sqlite/src/src/os_unix.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_database_unittest.cc
diff --git a/content/browser/dom_storage/dom_storage_database_unittest.cc b/content/browser/dom_storage/dom_storage_database_unittest.cc
index 20b714c039b89f29a84366b44748243ff6d5727f..11f5132877541142bf166aa1669417205d612bf0 100644
--- a/content/browser/dom_storage/dom_storage_database_unittest.cc
+++ b/content/browser/dom_storage/dom_storage_database_unittest.cc
@@ -13,7 +13,6 @@
#include "sql/statement.h"
#include "sql/test/scoped_error_ignorer.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/sqlite/sqlite3.h"
using base::ASCIIToUTF16;
@@ -349,7 +348,15 @@ TEST(DOMStorageDatabaseTest, TestCanOpenFileThatIsNotADatabase) {
{
sql::ScopedErrorIgnorer ignore_errors;
- ignore_errors.IgnoreError(SQLITE_IOERR_SHORT_READ);
+
+ // Earlier versions of Chromium compiled against SQLite 3.6.7.3, which
+ // returned SQLITE_IOERR_SHORT_READ in this case. Some platforms may still
+ // compile against an earlier SQLite via USE_SYSTEM_SQLITE.
+ if (ignore_errors.SQLiteLibVersionNumber() < 3008007) {
+ ignore_errors.IgnoreError(SQLITE_IOERR_SHORT_READ);
+ } else {
+ ignore_errors.IgnoreError(SQLITE_NOTADB);
+ }
// Try and open the file. As it's not a database, we should end up deleting
// it and creating a new, valid file, so everything should actually
« no previous file with comments | « no previous file | sql/BUILD.gn » ('j') | third_party/sqlite/src/src/os_unix.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698