/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
D | DatabaseTestBase.java | 4 import android.database.Cursor; 5 import android.database.sqlite.SQLiteDatabase; 24 protected SQLiteDatabase database; field in DatabaseTestBase 29 database = SQLiteDatabase.openDatabase("path", null, 0); in setUp() 30 shDatabase = Robolectric.shadowOf(database); in setUp() 31 database.execSQL("CREATE TABLE table_name (\n" + in setUp() 39 database.execSQL("CREATE TABLE rawtable (\n" + in setUp() 47 database.execSQL("CREATE TABLE exectable (\n" + in setUp() 63 database.insert("rawtable", null, values); in setUp() 72 database.insert("rawtable", null, values2); in setUp() [all …]
|
D | SQLiteOpenHelperTest.java | 5 import android.database.sqlite.SQLiteDatabase; 6 import android.database.sqlite.SQLiteDatabase.CursorFactory; 7 import android.database.sqlite.SQLiteOpenHelper; 30 SQLiteDatabase database = helper.getReadableDatabase(); in testInitialGetReadableDatabase() local 31 assertInitialDB(database); in testInitialGetReadableDatabase() 36 SQLiteDatabase database = helper.getReadableDatabase(); in testSubsequentGetReadableDatabase() local 38 database = helper.getReadableDatabase(); in testSubsequentGetReadableDatabase() 40 assertSubsequentDB(database); in testSubsequentGetReadableDatabase() 53 SQLiteDatabase database = helper.getWritableDatabase(); in testInitialGetWritableDatabase() local 54 assertInitialDB(database); in testInitialGetWritableDatabase() [all …]
|
D | SQLiteStatementTest.java | 3 import android.database.sqlite.SQLiteDatabase; 4 import android.database.sqlite.SQLiteDoneException; 5 import android.database.sqlite.SQLiteStatement; 21 private SQLiteDatabase database; field in SQLiteStatementTest 25 database = SQLiteDatabase.openDatabase("path", null, 0); in setUp() 26 …SQLiteStatement createStatement = database.compileStatement("CREATE TABLE `routine` (`id` INTEGER … in setUp() 29 …SQLiteStatement createStatement2 = database.compileStatement("CREATE TABLE `countme` (`id` INTEGER… in setUp() 35 database.close(); in tearDown() 40 …SQLiteStatement insertStatement = database.compileStatement("INSERT INTO `routine` (`name` ,`lastU… in testExecuteInsert() 52 Statement statement = shadowOf(database).getConnection().createStatement(); in testExecuteInsert() [all …]
|
/external/chromium_org/content/browser/fileapi/ |
D | sandbox_prioritized_origin_database_unittest.cc | 26 SandboxPrioritizedOriginDatabase database(dir.path(), NULL); in TEST() local 29 EXPECT_TRUE(database.InitializePrimaryOrigin(kOrigin1)); in TEST() 32 EXPECT_TRUE(database.GetPathForOrigin(kOrigin1, &path)); in TEST() 33 EXPECT_TRUE(database.GetPathForOrigin(kOrigin2, &path)); in TEST() 36 EXPECT_TRUE(database.HasOriginPath(kOrigin1)); in TEST() 37 EXPECT_TRUE(database.GetPathForOrigin(kOrigin1, &path)); in TEST() 39 EXPECT_TRUE(database.HasOriginPath(kOrigin2)); in TEST() 40 EXPECT_TRUE(database.GetPathForOrigin(kOrigin2, &path)); in TEST() 44 database.ListAllOrigins(&origins); in TEST() 53 database.RemovePathForOrigin(kOrigin1); in TEST() [all …]
|
D | sandbox_origin_database_unittest.cc | 41 SandboxOriginDatabase database(kFSDir, NULL); in TEST() local 44 EXPECT_FALSE(database.HasOriginPath(origin)); in TEST() 46 EXPECT_FALSE(database.HasOriginPath(origin)); in TEST() 52 EXPECT_FALSE(database.GetPathForOrigin(std::string(), &path0)); in TEST() 54 EXPECT_TRUE(database.GetPathForOrigin(origin, &path0)); in TEST() 55 EXPECT_TRUE(database.HasOriginPath(origin)); in TEST() 56 EXPECT_TRUE(database.GetPathForOrigin(origin, &path1)); in TEST() 71 SandboxOriginDatabase database(kFSDir, NULL); in TEST() local 75 EXPECT_FALSE(database.HasOriginPath(origin0)); in TEST() 76 EXPECT_FALSE(database.HasOriginPath(origin1)); in TEST() [all …]
|
D | sandbox_isolated_origin_database_unittest.cc | 25 SandboxIsolatedOriginDatabase database(kOrigin, dir.path(), in TEST() local 28 EXPECT_TRUE(database.HasOriginPath(kOrigin)); in TEST() 32 EXPECT_FALSE(database.GetPathForOrigin(std::string(), &path1)); in TEST() 33 EXPECT_FALSE(database.GetPathForOrigin("foo", &path1)); in TEST() 35 EXPECT_TRUE(database.HasOriginPath(kOrigin)); in TEST() 36 EXPECT_TRUE(database.GetPathForOrigin(kOrigin, &path1)); in TEST() 37 EXPECT_TRUE(database.GetPathForOrigin(kOrigin, &path2)); in TEST()
|
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
D | ShadowSQLiteOpenHelper.java | 4 import android.database.sqlite.SQLiteDatabase; 5 import android.database.sqlite.SQLiteDatabase.CursorFactory; 6 import android.database.sqlite.SQLiteOpenHelper; 20 private static SQLiteDatabase database; field in ShadowSQLiteOpenHelper 23 if (database != null) { in __constructor__() 24 database.close(); in __constructor__() 26 database = null; in __constructor__() 31 if (database != null) { in close() 32 database.close(); in close() 34 database = null; in close() [all …]
|
/external/chromium_org/third_party/WebKit/Source/modules/webdatabase/ |
D | DatabaseTracker.cpp | 51 static void databaseClosed(DatabaseBackendBase* database) in databaseClosed() argument 55 createDatabaseIdentifierFromSecurityOrigin(database->securityOrigin()), in databaseClosed() 56 database->stringIdentifier()); in databaseClosed() 85 void DatabaseTracker::addOpenDatabase(DatabaseBackendBase* database) in addOpenDatabase() argument 91 … String originIdentifier = createDatabaseIdentifierFromSecurityOrigin(database->securityOrigin()); in addOpenDatabase() 98 String name(database->stringIdentifier()); in addOpenDatabase() 105 databaseSet->add(database); in addOpenDatabase() 110 …Ptr<NotifyDatabaseObserverOnCloseTask> create(PassRefPtrWillBeRawPtr<DatabaseBackendBase> database) in create() argument 112 return adoptPtr(new NotifyDatabaseObserverOnCloseTask(database)); in create() 126 explicit NotifyDatabaseObserverOnCloseTask(PassRefPtrWillBeRawPtr<DatabaseBackendBase> database) in NotifyDatabaseObserverOnCloseTask() argument [all …]
|
D | ChangeVersionWrapper.cpp | 46 ASSERT(transaction && transaction->database()); in performPreflight() 48 DatabaseBackend* database = transaction->database(); in performPreflight() local 51 if (!database->getVersionFromDatabase(actualVersion)) { in performPreflight() 52 int sqliteError = database->sqliteDatabase().lastError(); in performPreflight() 53 database->reportChangeVersionResult(1, SQLError::UNKNOWN_ERR, sqliteError); in performPreflight() 55 sqliteError, database->sqliteDatabase().lastErrorMsg()); in performPreflight() 60 database->reportChangeVersionResult(2, SQLError::VERSION_ERR, 0); in performPreflight() 70 ASSERT(transaction && transaction->database()); in performPostflight() 72 DatabaseBackend* database = transaction->database(); in performPostflight() local 74 if (!database->setVersionInDatabase(m_newVersion)) { in performPostflight() [all …]
|
D | SQLTransactionClient.cpp | 45 static void databaseModified(DatabaseBackendBase* database) in databaseModified() argument 49 createDatabaseIdentifierFromSecurityOrigin(database->securityOrigin()), in databaseModified() 50 database->stringIdentifier()); in databaseModified() 54 void SQLTransactionClient::didCommitWriteTransaction(DatabaseBackendBase* database) in didCommitWriteTransaction() argument 56 ExecutionContext* executionContext = database->databaseContext()->executionContext(); in didCommitWriteTransaction() 58 …nContext->postTask(bind(&databaseModified, PassRefPtrWillBeRawPtr<DatabaseBackendBase>(database))); in didCommitWriteTransaction() 62 databaseModified(database); in didCommitWriteTransaction() 65 bool SQLTransactionClient::didExceedQuota(DatabaseBackendBase* database) in didExceedQuota() argument 69 ASSERT(database->databaseContext()->executionContext()->isContextThread()); in didExceedQuota()
|
D | DatabaseTask.cpp | 39 DatabaseTask::DatabaseTask(DatabaseBackend* database, TaskSynchronizer* synchronizer) in DatabaseTask() argument 40 : m_database(database) in DatabaseTask() 86 DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask(DatabaseBackend* database, bool setVersionInNew… in DatabaseOpenTask() argument 87 : DatabaseTask(database, synchronizer) in DatabaseOpenTask() 99 m_success = database()->performOpenAndVerify(m_setVersionInNewDatabase, m_error, errorMessage); in doPerformTask() 114 DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask(DatabaseBackend* database, TaskSynchronizer* … in DatabaseCloseTask() argument 115 : DatabaseTask(database, synchronizer) in DatabaseCloseTask() 121 Database::from(database())->close(); in doPerformTask() 135 : DatabaseTask(Database::from(transaction->database()), 0) in DatabaseTransactionTask() 172 DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask(DatabaseBackend* database, TaskSync… in DatabaseTableNamesTask() argument [all …]
|
D | SQLStatementBackend.cpp | 129 SQLiteDatabase* database = &db->sqliteDatabase(); in execute() local 131 SQLiteStatement statement(*database, m_statement); in execute() 135 …ss of statement %s - error %i (%s)", m_statement.ascii().data(), result, database->lastErrorMsg()); in execute() 139 …ata::create(SQLError::SYNTAX_ERR, "could not prepare statement", result, database->lastErrorMsg()); in execute() 163 …rrorData::create(SQLError::DATABASE_ERR, "could not bind value", result, database->lastErrorMsg()); in execute() 186 …ata::create(SQLError::DATABASE_ERR, "could not iterate results", result, database->lastErrorMsg()); in execute() 192 m_resultSet->setInsertId(database->lastInsertRowID()); in execute() 199 …T_ERR, "could not execute statement due to a constaint failure", result, database->lastErrorMsg()); in execute() 203 …a::create(SQLError::DATABASE_ERR, "could not execute statement", result, database->lastErrorMsg()); in execute() 210 m_resultSet->setRowsAffected(database->lastChanges()); in execute() [all …]
|
D | DatabaseThread.cpp | 140 void DatabaseThread::recordDatabaseOpen(DatabaseBackend* database) in recordDatabaseOpen() argument 143 ASSERT(database); in recordDatabaseOpen() 144 ASSERT(!m_openDatabaseSet.contains(database)); in recordDatabaseOpen() 145 m_openDatabaseSet.add(database); in recordDatabaseOpen() 148 void DatabaseThread::recordDatabaseClosed(DatabaseBackend* database) in recordDatabaseClosed() argument 151 ASSERT(database); in recordDatabaseClosed() 152 ASSERT(m_terminationRequested || m_openDatabaseSet.contains(database)); in recordDatabaseClosed() 153 m_openDatabaseSet.remove(database); in recordDatabaseClosed() 156 bool DatabaseThread::isDatabaseOpen(DatabaseBackend* database) in isDatabaseOpen() argument 159 ASSERT(database); in isDatabaseOpen() [all …]
|
D | DatabaseManager.cpp | 72 …r<DatabaseCreationCallbackTask> create(PassRefPtrWillBeRawPtr<Database> database, PassOwnPtr<Datab… in create() argument 74 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallback)); in create() 83 …DatabaseCreationCallbackTask(PassRefPtrWillBeRawPtr<Database> database, PassOwnPtr<DatabaseCallbac… in DatabaseCreationCallbackTask() argument 84 : m_database(database) in DatabaseCreationCallbackTask() 223 RefPtrWillBeRawPtr<Database> database = Database::create(context, backend); in openDatabase() local 226 …DatabaseClient::from(context)->didOpenDatabase(database, context->securityOrigin()->host(), name, … in openDatabase() 229 … WTF_LOG(StorageAPI, "Scheduling DatabaseCreationCallbackTask for database %p\n", database.get()); in openDatabase() 230 …database->executionContext()->postTask(DatabaseCreationCallbackTask::create(database, creationCall… in openDatabase() 233 ASSERT(database); in openDatabase() 234 return database.release(); in openDatabase() [all …]
|
D | WorkerGlobalScopeWebDatabase.cpp | 48 RefPtrWillBeRawPtr<Database> database = nullptr; in openDatabase() local 52 …database = dbManager.openDatabase(&context, name, version, displayName, estimatedSize, creationCal… in openDatabase() 53 ASSERT(database || error != DatabaseError::None); in openDatabase() 60 return database.release(); in openDatabase() 66 RefPtrWillBeRawPtr<DatabaseSync> database = nullptr; in openDatabaseSync() local 70 …database = dbManager.openDatabaseSync(&context, name, version, displayName, estimatedSize, creatio… in openDatabaseSync() 71 ASSERT(database || error != DatabaseError::None); in openDatabaseSync() 78 return database.release(); in openDatabaseSync()
|
D | DatabaseServer.cpp | 57 RefPtrWillBeRawPtr<DatabaseBackendBase> database = nullptr; in openDatabase() local 59 …database = createDatabase(backendContext, type, name, expectedVersion, displayName, estimatedSize,… in openDatabase() 60 return database.release(); in openDatabase() 67 RefPtrWillBeRawPtr<DatabaseBackendBase> database = nullptr; in createDatabase() local 70 …database = adoptRefWillBeNoop(new Database(backendContext, name, expectedVersion, displayName, est… in createDatabase() 73 …database = adoptRefWillBeNoop(new DatabaseSync(backendContext, name, expectedVersion, displayName,… in createDatabase() 76 if (!database->openAndVerifyVersion(setVersionInNewDatabase, error, errorMessage)) in createDatabase() 78 return database.release(); in createDatabase()
|
D | DatabaseContext.cpp | 176 void DatabaseContext::didOpenDatabase(DatabaseBackendBase& database) in didOpenDatabase() argument 178 if (!database.isSyncDatabase()) in didOpenDatabase() 182 m_openSyncDatabases.add(&database, adoptPtr(new DatabaseCloser(database))); in didOpenDatabase() 184 m_openSyncDatabases.add(&database); in didOpenDatabase() 188 void DatabaseContext::didCloseDatabase(DatabaseBackendBase& database) in didCloseDatabase() argument 191 if (!database.isSyncDatabase()) in didCloseDatabase() 194 m_openSyncDatabases.remove(&database); in didCloseDatabase()
|
D | SQLStatementSync.cpp | 57 SQLiteDatabase* database = &db->sqliteDatabase(); in execute() local 59 SQLiteStatement statement(*database, m_statement); in execute() 66 db->setLastErrorMessage("could not prepare statement", result, database->lastErrorMsg()); in execute() 89 db->setLastErrorMessage("could not bind value", result, database->lastErrorMsg()); in execute() 114 db->setLastErrorMessage("could not iterate results", result, database->lastErrorMsg()); in execute() 120 resultSet->setInsertId(database->lastInsertRowID()); in execute() 132 db->setLastErrorMessage("could not execute statement", result, database->lastErrorMsg()); in execute() 136 resultSet->setRowsAffected(database->lastChanges()); in execute()
|
/external/chromium_org/chrome/browser/extensions/activity_log/ |
D | hashed_ad_network_database_unittest.cc | 35 AdNetworkDatabase* database() { return database_.get(); } in database() function in extensions::HashedAdNetworkDatabaseUnitTest 75 EXPECT_TRUE(database()->IsAdNetwork(GURL("http://alpha.adnetwork"))); in TEST_F() 76 EXPECT_TRUE(database()->IsAdNetwork(GURL("http://bravo.adnetwork"))); in TEST_F() 77 EXPECT_TRUE(database()->IsAdNetwork(GURL("http://charlie.delta.adnetwork"))); in TEST_F() 80 EXPECT_TRUE(database()->IsAdNetwork(GURL("http://alpha.adnetwork/foo"))); in TEST_F() 81 EXPECT_TRUE(database()->IsAdNetwork(GURL("http://bravo.adnetwork/foo/bar"))); in TEST_F() 83 database()->IsAdNetwork(GURL("http://charlie.delta.adnetwork/foo.html"))); in TEST_F() 87 EXPECT_FALSE(database()->IsAdNetwork(GURL("http://foo.alpha.adnetwork"))); in TEST_F() 88 EXPECT_FALSE(database()->IsAdNetwork(GURL("http://foo.bar.bravo.adnetwork"))); in TEST_F() 90 database()->IsAdNetwork(GURL("http://foo.charlie.delta.adnetwork"))); in TEST_F() [all …]
|
/external/chromium_org/content/browser/service_worker/ |
D | service_worker_database_unittest.cc | 80 scoped_ptr<ServiceWorkerDatabase> database( in TEST() local 85 database->LazyOpen(false)); in TEST() 87 EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->LazyOpen(true)); in TEST() 89 database.reset(CreateDatabase(database_dir.path())); in TEST() 90 EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->LazyOpen(false)); in TEST() 94 scoped_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory()); in TEST() local 98 database->LazyOpen(false)); in TEST() 100 EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->LazyOpen(true)); in TEST() 101 database.reset(CreateDatabaseInMemory()); in TEST() 105 database->LazyOpen(false)); in TEST() [all …]
|
/external/chromium_org/third_party/sqlite/src/doc/ |
D | pager-invariants.txt | 6 *** Definition: A page of the database file is said to be "overwriteable" if 16 the database file at the start of the transaction. 18 (1) A page of the database file is never overwritten unless one of the 28 both the content in the database when the rollback journal was written 29 and the content in the database at the beginning of the current 32 (3) Writes to the database file are an integer multiple of the page size 35 (4) Reads from the database file are either aligned on a page boundary and 37 first 100 bytes of the database file. 39 (5) All writes to the database file are synced prior to the rollback journal 42 (6) If a master journal file is used, then all writes to the database file [all …]
|
/external/chromium_org/chrome/browser/resources/predictors/ |
D | autocomplete_action_predictor.js | 19 function updateAutocompleteActionPredictorDb(database) { argument 25 updateAutocompleteActionPredictorDbView(database); 28 updateAutocompleteActionPredictorDbView(database); 37 function updateAutocompleteActionPredictorDbView(database) { argument 39 var showEnabled = database.enabled && database.db; 52 for (var i = 0; i < database.db.length; ++i) { 53 var entry = database.db[i];
|
/external/chromium_org/components/test/data/autofill/merge/tools/ |
D | serialize_profiles.py | 20 database = sys.argv[1] 21 if not os.path.isfile(database): 22 print "Cannot read database at \"%s\"" % database 27 connection = sqlite3.connect(database, 0) 32 database) 49 database) 61 print "Failed to read the autofill_profiles table from \"%s\"" % database 74 database)
|
/external/chromium_org/third_party/sqlite/src/test/ |
D | lock3.test | 12 # focus of this script is database locks and the operation of the 22 # Establish two connections to the same database. Put some 23 # sample data into the database. 37 # Get a deferred lock on the database using one connection. The 47 # Get an immediate lock on the database using one connection. The 48 # other connection should be able to read the database but not write 57 } {1 {database is locked}} 63 # Get an exclusive lock on the database using one connection. The 64 # other connection should be unable to read or write the database. 69 } {1 {database is locked}} [all …]
|
D | backup2.test | 25 # Fill a database with test data. 55 # Remember a check-sum on the database file. 82 } {1 {restore failed: source database busy}} 113 } {1 {backup failed: attempt to write a readonly database}} 115 # Try to backup to something that is not a database file. 121 puts $out "This is not a valid database file" 125 } {1 {backup failed: file is encrypted or is not a database}} 127 # Try to backup database that does not exist 133 } {1 {backup failed: unknown database aux1}} 150 } {1 {cannot open source database: unable to open database file}} [all …]
|