diff --git a/Cargo.lock b/Cargo.lock index a545e2e4ee8..a114365378d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1425,6 +1425,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -1772,6 +1781,15 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "doxygen-rs" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9" +dependencies = [ + "phf", +] + [[package]] name = "dpi" version = "0.1.2" @@ -3221,6 +3239,44 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "heed" +version = "0.20.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d4f449bab7320c56003d37732a917e18798e2f1709d80263face2b4f9436ddb" +dependencies = [ + "bitflags 2.9.1", + "byteorder", + "heed-traits", + "heed-types", + "libc", + "lmdb-master-sys", + "once_cell", + "page_size", + "serde", + "synchronoise", + "url", +] + +[[package]] +name = "heed-traits" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3130048d404c57ce5a1ac61a903696e8fcde7e8c2991e9fcfc1f27c3ef74ff" + +[[package]] +name = "heed-types" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d3f528b053a6d700b2734eabcd0fd49cb8230647aa72958467527b0b7917114" +dependencies = [ + "bincode", + "byteorder", + "heed-traits", + "serde", + "serde_json", +] + [[package]] name = "hermit-abi" version = "0.4.0" @@ -4457,6 +4513,17 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" +[[package]] +name = "lmdb-master-sys" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "864808e0b19fb6dd3b70ba94ee671b82fce17554cf80aeb0a155c65bb08027df" +dependencies = [ + "cc", + "doxygen-rs", + "libc", +] + [[package]] name = "lock_api" version = "0.4.13" @@ -4868,6 +4935,7 @@ dependencies = [ "async-tungstenite", "base", "base64 0.22.1", + "bincode", "bytes", "chrono", "compositing_traits", @@ -4884,6 +4952,7 @@ dependencies = [ "futures-util", "generic-array", "headers 0.4.1", + "heed", "http 1.3.1", "http-body-util", "hyper 1.6.0", @@ -5581,6 +5650,16 @@ dependencies = [ "ttf-parser", ] +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "parking_lot" version = "0.12.4" @@ -7671,6 +7750,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "synchronoise" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dbc01390fc626ce8d1cffe3376ded2b72a11bb70e1c75f404a210e4daa4def2" +dependencies = [ + "crossbeam-queue", +] + [[package]] name = "synstructure" version = "0.13.2" diff --git a/components/config/prefs.rs b/components/config/prefs.rs index 896a4fe0bc4..c0d2bbe05c8 100644 --- a/components/config/prefs.rs +++ b/components/config/prefs.rs @@ -85,6 +85,7 @@ pub struct Preferences { pub dom_fullscreen_test: bool, pub dom_gamepad_enabled: bool, pub dom_imagebitmap_enabled: bool, + pub dom_indexeddb_enabled: bool, pub dom_intersection_observer_enabled: bool, pub dom_microdata_testing_enabled: bool, pub dom_mouse_event_which_enabled: bool, @@ -258,6 +259,7 @@ impl Preferences { dom_fullscreen_test: false, dom_gamepad_enabled: true, dom_imagebitmap_enabled: false, + dom_indexeddb_enabled: false, dom_intersection_observer_enabled: false, dom_microdata_testing_enabled: false, dom_mouse_event_which_enabled: false, diff --git a/components/fonts/tests/font_context.rs b/components/fonts/tests/font_context.rs index 0793c1e4ce1..a362f7122d6 100644 --- a/components/fonts/tests/font_context.rs +++ b/components/fonts/tests/font_context.rs @@ -47,7 +47,9 @@ mod font_context { let (system_font_service, system_font_service_proxy) = MockSystemFontService::spawn(); let (core_sender, _) = ipc::channel().unwrap(); let (storage_sender, _) = ipc::channel().unwrap(); - let mock_resource_threads = ResourceThreads::new(core_sender, storage_sender); + let (indexeddb_sender, _) = ipc::channel().unwrap(); + let mock_resource_threads = + ResourceThreads::new(core_sender, storage_sender, indexeddb_sender); let mock_compositor_api = CrossProcessCompositorApi::dummy(); let proxy_clone = Arc::new(system_font_service_proxy.to_sender().to_proxy()); diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml index 49be8762c10..6b41873a373 100644 --- a/components/net/Cargo.toml +++ b/components/net/Cargo.toml @@ -20,6 +20,7 @@ async-recursion = "1.1" async-tungstenite = { workspace = true } base = { workspace = true } base64 = { workspace = true } +bincode = { workspace = true } bytes = "1" chrono = { workspace = true } compositing_traits = { workspace = true } @@ -35,6 +36,7 @@ futures-core = { version = "0.3.30", default-features = false } futures-util = { version = "0.3.30", default-features = false } generic-array = "0.14" headers = { workspace = true } +heed = "0.20" http = { workspace = true } http-body-util = { workspace = true } hyper = { workspace = true, features = ["client", "http1", "http2"] } diff --git a/components/net/indexeddb/engines/heed.rs b/components/net/indexeddb/engines/heed.rs new file mode 100644 index 00000000000..825ed9bb4c0 --- /dev/null +++ b/components/net/indexeddb/engines/heed.rs @@ -0,0 +1,251 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use std::collections::HashMap; +use std::path::{Path, PathBuf}; +use std::sync::{Arc, RwLock}; + +use heed::types::*; +use heed::{Database, Env, EnvOpenOptions}; +use log::warn; +use net_traits::indexeddb_thread::{AsyncOperation, IndexedDBTxnMode}; +use tokio::sync::oneshot; + +use super::{KvsEngine, KvsTransaction, SanitizedName}; +use crate::resource_thread::CoreResourceThreadPool; + +type HeedDatabase = Database; + +// A simple store that also has a key generator that can be used if no key +// is provided for the stored objects +#[derive(Clone)] +struct Store { + inner: HeedDatabase, + // https://www.w3.org/TR/IndexedDB-2/#key-generator + key_generator: Option, +} + +pub struct HeedEngine { + heed_env: Arc, + open_stores: Arc>>, + read_pool: Arc, + write_pool: Arc, +} + +impl HeedEngine { + pub fn new( + base_dir: &Path, + db_file_name: &Path, + thread_pool: Arc, + ) -> Self { + let mut db_dir = PathBuf::new(); + db_dir.push(base_dir); + db_dir.push(db_file_name); + + std::fs::create_dir_all(&db_dir).expect("Could not create OS directory for idb"); + // FIXME:(arihant2math) gracefully handle errors like hitting max dbs + #[allow(unsafe_code)] + let env = unsafe { + EnvOpenOptions::new() + .max_dbs(1024) + .open(db_dir) + .expect("Failed to open db_dir") + }; + Self { + heed_env: Arc::new(env), + open_stores: Arc::new(RwLock::new(HashMap::new())), + read_pool: thread_pool.clone(), + write_pool: thread_pool, + } + } +} + +impl KvsEngine for HeedEngine { + fn create_store(&self, store_name: SanitizedName, auto_increment: bool) { + let mut write_txn = self + .heed_env + .write_txn() + .expect("Could not create idb store writer"); + let _ = self.heed_env.clear_stale_readers(); + let new_store: HeedDatabase = self + .heed_env + .create_database(&mut write_txn, Some(&*store_name.to_string())) + .expect("Failed to create idb store"); + + let key_generator = { if auto_increment { Some(0) } else { None } }; + + let store = Store { + inner: new_store, + key_generator, + }; + + self.open_stores + .write() + .expect("Could not acquire lock on stores") + .insert(store_name, store); + } + + fn delete_store(&self, store_name: SanitizedName) { + // TODO: Actually delete store instead of just clearing it + let mut write_txn = self + .heed_env + .write_txn() + .expect("Could not create idb store writer"); + let store: HeedDatabase = self + .heed_env + .create_database(&mut write_txn, Some(&*store_name.to_string())) + .expect("Failed to create idb store"); + store.clear(&mut write_txn).expect("Could not clear store"); + let mut open_stores = self.open_stores.write().unwrap(); + open_stores.retain(|key, _| key != &store_name); + } + + fn close_store(&self, store_name: SanitizedName) { + // FIXME: (arihant2math) unused + // FIXME:(arihant2math) return error if no store ... + let mut open_stores = self.open_stores.write().unwrap(); + open_stores.retain(|key, _| key != &store_name); + } + + // Starts a transaction, processes all operations for that transaction, + // and commits the changes. + fn process_transaction( + &self, + transaction: KvsTransaction, + ) -> oneshot::Receiver>> { + // This executes in a thread pool, and `readwrite` transactions + // will block their thread if the writer is occupied, so we can + // probably do some smart things here in order to optimize. + // Queueing 8 writers will for example block 7 threads, + // so write operations are reserved for just one thread, + // so that the rest of the threads can work in parallel with read txns. + let heed_env = self.heed_env.clone(); + let stores = self.open_stores.clone(); + + let (tx, rx) = oneshot::channel(); + if let IndexedDBTxnMode::Readonly = transaction.mode { + self.read_pool.spawn(move || { + let env = heed_env; + let rtxn = env.read_txn().expect("Could not create idb store reader"); + for request in transaction.requests { + match request.operation { + AsyncOperation::GetItem(key) => { + let key: Vec = bincode::serialize(&key).unwrap(); + let stores = stores + .read() + .expect("Could not acquire read lock on stores"); + let store = stores + .get(&request.store_name) + .expect("Could not get store"); + let result = store.inner.get(&rtxn, &key).expect("Could not get item"); + + if let Some(blob) = result { + let _ = request.sender.send(Some(blob.to_vec())); + } else { + let _ = request.sender.send(None); + } + }, + _ => { + // We cannot reach this, as checks are made earlier so that + // no modifying requests are executed on readonly transactions + unreachable!( + "Cannot execute modifying request with readonly transactions" + ); + }, + } + } + + if tx.send(None).is_err() { + warn!("IDBTransaction's execution channel is dropped"); + }; + }); + } else { + self.write_pool.spawn(move || { + // Acquiring a writer will block the thread if another `readwrite` transaction is active + let env = heed_env; + let mut wtxn = env.write_txn().expect("Could not creat idb store writer"); + for request in transaction.requests { + match request.operation { + AsyncOperation::PutItem(key, value, overwrite) => { + let key: Vec = bincode::serialize(&key).unwrap(); + let stores = stores + .write() + .expect("Could not acquire write lock on stores"); + let store = stores + .get(&request.store_name) + .expect("Could not get store"); + if overwrite { + let result = + store.inner.put(&mut wtxn, &key, &value).ok().and(Some(key)); + request.sender.send(result).unwrap(); + } else if store + .inner + .get(&wtxn, &key) + .expect("Could not get item") + .is_none() + { + let result = + store.inner.put(&mut wtxn, &key, &value).ok().and(Some(key)); + let _ = request.sender.send(result); + } else { + let _ = request.sender.send(None); + } + }, + AsyncOperation::GetItem(key) => { + let key: Vec = bincode::serialize(&key).unwrap(); + let stores = stores + .read() + .expect("Could not acquire write lock on stores"); + let store = stores + .get(&request.store_name) + .expect("Could not get store"); + let result = store.inner.get(&wtxn, &key).expect("Could not get item"); + + if let Some(blob) = result { + let _ = request.sender.send(Some(blob.to_vec())); + } else { + let _ = request.sender.send(None); + } + }, + AsyncOperation::RemoveItem(key) => { + let key: Vec = bincode::serialize(&key).unwrap(); + let stores = stores + .write() + .expect("Could not acquire write lock on stores"); + let store = stores + .get(&request.store_name) + .expect("Could not get store"); + let result = store.inner.delete(&mut wtxn, &key).ok().and(Some(key)); + let _ = request.sender.send(result); + }, + AsyncOperation::Count(key) => { + let _key: Vec = bincode::serialize(&key).unwrap(); + let stores = stores + .read() + .expect("Could not acquire read lock on stores"); + let _store = stores + .get(&request.store_name) + .expect("Could not get store"); + // FIXME:(arihant2math) Return count with sender + }, + } + } + + wtxn.commit().expect("Failed to commit to database"); + }) + } + rx + } + + fn has_key_generator(&self, store_name: SanitizedName) -> bool { + let has_generator = self + .open_stores + .read() + .expect("Could not acquire read lock on stores") + .get(&store_name) + .expect("Store not found") + .key_generator + .is_some(); + has_generator + } +} diff --git a/components/net/indexeddb/engines/mod.rs b/components/net/indexeddb/engines/mod.rs new file mode 100644 index 00000000000..6e3b45b7659 --- /dev/null +++ b/components/net/indexeddb/engines/mod.rs @@ -0,0 +1,73 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use std::collections::VecDeque; + +use ipc_channel::ipc::IpcSender; +use net_traits::indexeddb_thread::{AsyncOperation, IndexedDBTxnMode}; +use tokio::sync::oneshot; + +pub use self::heed::HeedEngine; + +mod heed; + +#[derive(Eq, Hash, PartialEq)] +pub struct SanitizedName { + name: String, +} + +impl SanitizedName { + pub fn new(name: String) -> SanitizedName { + let name = name.replace("https://", ""); + let name = name.replace("http://", ""); + // FIXME:(arihant2math) Disallowing special characters might be a big problem, + // but better safe than sorry. E.g. the db name '../other_origin/db', + // would let us access databases from another origin. + let name = name + .chars() + .map(|c| match c { + 'A'..='Z' => c, + 'a'..='z' => c, + '0'..='9' => c, + '-' => c, + '_' => c, + _ => '-', + }) + .collect(); + SanitizedName { name } + } +} + +impl std::fmt::Display for SanitizedName { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.name) + } +} + +pub struct KvsOperation { + pub sender: IpcSender>>, + pub store_name: SanitizedName, + pub operation: AsyncOperation, +} + +pub struct KvsTransaction { + pub mode: IndexedDBTxnMode, + pub requests: VecDeque, +} + +pub trait KvsEngine { + fn create_store(&self, store_name: SanitizedName, auto_increment: bool); + + fn delete_store(&self, store_name: SanitizedName); + + #[expect(dead_code)] + fn close_store(&self, store_name: SanitizedName); + + fn process_transaction( + &self, + transaction: KvsTransaction, + ) -> oneshot::Receiver>>; + + fn has_key_generator(&self, store_name: SanitizedName) -> bool; +} diff --git a/components/net/indexeddb/idb_thread.rs b/components/net/indexeddb/idb_thread.rs new file mode 100644 index 00000000000..b47e03330ae --- /dev/null +++ b/components/net/indexeddb/idb_thread.rs @@ -0,0 +1,374 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use std::borrow::ToOwned; +use std::collections::hash_map::Entry; +use std::collections::{HashMap, VecDeque}; +use std::path::PathBuf; +use std::sync::Arc; +use std::thread; + +use ipc_channel::ipc::{self, IpcError, IpcReceiver, IpcSender}; +use log::{debug, warn}; +use net_traits::indexeddb_thread::{ + AsyncOperation, IndexedDBThreadMsg, IndexedDBThreadReturnType, IndexedDBTxnMode, SyncOperation, +}; +use servo_config::pref; +use servo_url::origin::ImmutableOrigin; + +use crate::indexeddb::engines::{ + HeedEngine, KvsEngine, KvsOperation, KvsTransaction, SanitizedName, +}; +use crate::resource_thread::CoreResourceThreadPool; + +pub trait IndexedDBThreadFactory { + fn new(config_dir: Option) -> Self; +} + +impl IndexedDBThreadFactory for IpcSender { + fn new(config_dir: Option) -> IpcSender { + let (chan, port) = ipc::channel().unwrap(); + + let mut idb_base_dir = PathBuf::new(); + if let Some(p) = config_dir { + idb_base_dir.push(p); + } + idb_base_dir.push("IndexedDB"); + + thread::Builder::new() + .name("IndexedDBManager".to_owned()) + .spawn(move || { + IndexedDBManager::new(port, idb_base_dir).start(); + }) + .expect("Thread spawning failed"); + + chan + } +} + +#[derive(Clone, Eq, Hash, PartialEq)] +pub struct IndexedDBDescription { + origin: ImmutableOrigin, + name: String, +} + +impl IndexedDBDescription { + // Converts the database description to a folder name where all + // data for this database is stored + fn as_path(&self) -> PathBuf { + let mut path = PathBuf::new(); + + let sanitized_origin = SanitizedName::new(self.origin.ascii_serialization()); + let sanitized_name = SanitizedName::new(self.name.clone()); + path.push(sanitized_origin.to_string()); + path.push(sanitized_name.to_string()); + + path + } +} + +struct IndexedDBEnvironment { + engine: E, + version: u64, + + transactions: HashMap, + serial_number_counter: u64, +} + +impl IndexedDBEnvironment { + fn new(engine: E, version: u64) -> IndexedDBEnvironment { + IndexedDBEnvironment { + engine, + version, + + transactions: HashMap::new(), + serial_number_counter: 0, + } + } + + fn queue_operation( + &mut self, + sender: IpcSender>>, + store_name: SanitizedName, + serial_number: u64, + mode: IndexedDBTxnMode, + operation: AsyncOperation, + ) { + self.transactions + .entry(serial_number) + .or_insert_with(|| KvsTransaction { + requests: VecDeque::new(), + mode, + }) + .requests + .push_back(KvsOperation { + sender, + operation, + store_name, + }); + } + + // Executes all requests for a transaction (without committing) + fn start_transaction(&mut self, txn: u64, sender: Option>>) { + // FIXME:(arihant2math) find a way to optimizations in this function + // rather than on the engine level code (less repetition) + if let Some(txn) = self.transactions.remove(&txn) { + let _ = self.engine.process_transaction(txn).blocking_recv(); + } + + // We have a sender if the transaction is started manually, and they + // probably want to know when it is finished + if let Some(sender) = sender { + if sender.send(Ok(())).is_err() { + warn!("IDBTransaction starter dropped its channel"); + } + } + } + + fn has_key_generator(&self, store_name: SanitizedName) -> bool { + self.engine.has_key_generator(store_name) + } + + fn create_object_store( + &mut self, + sender: IpcSender>, + store_name: SanitizedName, + auto_increment: bool, + ) { + self.engine.create_store(store_name, auto_increment); + + let _ = sender.send(Ok(())); + } + + fn delete_object_store( + &mut self, + sender: IpcSender>, + store_name: SanitizedName, + ) { + self.engine.delete_store(store_name); + + let _ = sender.send(Ok(())); + } +} + +struct IndexedDBManager { + port: IpcReceiver, + idb_base_dir: PathBuf, + databases: HashMap>, + thread_pool: Arc, +} + +impl IndexedDBManager { + fn new(port: IpcReceiver, idb_base_dir: PathBuf) -> IndexedDBManager { + debug!("New indexedDBManager"); + + let thread_count = thread::available_parallelism() + .map(|i| i.get()) + .unwrap_or(pref!(threadpools_fallback_worker_num) as usize) + .min(pref!(threadpools_async_runtime_workers_max).max(1) as usize); + IndexedDBManager { + port, + idb_base_dir, + databases: HashMap::new(), + thread_pool: Arc::new(CoreResourceThreadPool::new( + thread_count, + "ImageCache".to_string(), + )), + } + } +} + +impl IndexedDBManager { + fn start(&mut self) { + if !pref!(dom_indexeddb_enabled) { + return; + } + loop { + // FIXME:(arihant2math) No message *most likely* means that + // the ipc sender has been dropped, so we break the look + let message = match self.port.recv() { + Ok(msg) => msg, + Err(e) => match e { + IpcError::Disconnected => { + break; + }, + other => { + warn!("Error in IndexedDB thread: {:?}", other); + continue; + }, + }, + }; + match message { + IndexedDBThreadMsg::Sync(operation) => { + self.handle_sync_operation(operation); + }, + IndexedDBThreadMsg::Async( + sender, + origin, + db_name, + store_name, + txn, + mode, + operation, + ) => { + let store_name = SanitizedName::new(store_name); + if let Some(db) = self.get_database_mut(origin, db_name) { + // Queues an operation for a transaction without starting it + db.queue_operation(sender, store_name, txn, mode, operation); + // FIXME:(arihant2math) Schedule transactions properly: + // for now, we start them directly. + db.start_transaction(txn, None); + } + }, + } + } + } + + fn get_database( + &self, + origin: ImmutableOrigin, + db_name: String, + ) -> Option<&IndexedDBEnvironment> { + let idb_description = IndexedDBDescription { + origin, + name: db_name, + }; + + self.databases.get(&idb_description) + } + + fn get_database_mut( + &mut self, + origin: ImmutableOrigin, + db_name: String, + ) -> Option<&mut IndexedDBEnvironment> { + let idb_description = IndexedDBDescription { + origin, + name: db_name, + }; + + self.databases.get_mut(&idb_description) + } + + fn handle_sync_operation(&mut self, operation: SyncOperation) { + match operation { + SyncOperation::CloseDatabase(sender, origin, db_name) => { + let idb_description = IndexedDBDescription { + origin, + name: db_name, + }; + if let Some(_db) = self.databases.remove(&idb_description) { + // TODO: maybe close store here? + } + let _ = sender.send(Ok(())); + }, + SyncOperation::OpenDatabase(sender, origin, db_name, version) => { + let idb_description = IndexedDBDescription { + origin, + name: db_name, + }; + + let idb_base_dir = self.idb_base_dir.as_path(); + + match self.databases.entry(idb_description.clone()) { + Entry::Vacant(e) => { + let db = IndexedDBEnvironment::new( + HeedEngine::new( + idb_base_dir, + &idb_description.as_path(), + self.thread_pool.clone(), + ), + version.unwrap_or(0), + ); + let _ = sender.send(db.version); + e.insert(db); + }, + Entry::Occupied(db) => { + let _ = sender.send(db.get().version); + }, + } + }, + SyncOperation::DeleteDatabase(sender, origin, db_name) => { + let idb_description = IndexedDBDescription { + origin, + name: db_name, + }; + self.databases.remove(&idb_description); + + // FIXME:(rasviitanen) Possible security issue? + // FIXME:(arihant2math) using remove_dir_all with arbitrary input ... + let mut db_dir = self.idb_base_dir.clone(); + db_dir.push(idb_description.as_path()); + if std::fs::remove_dir_all(&db_dir).is_err() { + let _ = sender.send(Err(())); + } else { + let _ = sender.send(Ok(())); + } + }, + SyncOperation::HasKeyGenerator(sender, origin, db_name, store_name) => { + let store_name = SanitizedName::new(store_name); + let result = self + .get_database(origin, db_name) + .map(|db| db.has_key_generator(store_name)) + .expect("No Database"); + sender.send(result).expect("Could not send generator info"); + }, + SyncOperation::Commit(sender, _origin, _db_name, _txn) => { + // FIXME:(arihant2math) This does nothing at the moment + sender + .send(IndexedDBThreadReturnType::Commit(Err(()))) + .expect("Could not send commit status"); + }, + SyncOperation::UpgradeVersion(sender, origin, db_name, _txn, version) => { + if let Some(db) = self.get_database_mut(origin, db_name) { + db.version = version; + }; + + // FIXME:(arihant2math) Get the version from the database instead + // We never fail as of now, so we can just return it like this + // for now... + sender + .send(IndexedDBThreadReturnType::UpgradeVersion(Ok(version))) + .expect("Could not upgrade version"); + }, + SyncOperation::CreateObjectStore( + sender, + origin, + db_name, + store_name, + auto_increment, + ) => { + let store_name = SanitizedName::new(store_name); + if let Some(db) = self.get_database_mut(origin, db_name) { + db.create_object_store(sender, store_name, auto_increment); + } + }, + SyncOperation::DeleteObjectStore(sender, origin, db_name, store_name) => { + let store_name = SanitizedName::new(store_name); + if let Some(db) = self.get_database_mut(origin, db_name) { + db.delete_object_store(sender, store_name); + } + }, + SyncOperation::StartTransaction(sender, origin, db_name, txn) => { + if let Some(db) = self.get_database_mut(origin, db_name) { + db.start_transaction(txn, Some(sender)); + }; + }, + SyncOperation::Version(sender, origin, db_name) => { + if let Some(db) = self.get_database(origin, db_name) { + let _ = sender.send(db.version); + }; + }, + SyncOperation::RegisterNewTxn(sender, origin, db_name) => { + if let Some(db) = self.get_database_mut(origin, db_name) { + db.serial_number_counter += 1; + let _ = sender.send(db.serial_number_counter); + } + }, + SyncOperation::Exit(sender) => { + // FIXME:(rasviitanen) Nothing to do? + let _ = sender.send(IndexedDBThreadReturnType::Exit); + }, + } + } +} diff --git a/components/net/indexeddb/mod.rs b/components/net/indexeddb/mod.rs new file mode 100644 index 00000000000..bb08d422026 --- /dev/null +++ b/components/net/indexeddb/mod.rs @@ -0,0 +1,9 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +pub use self::idb_thread::IndexedDBThreadFactory; + +mod engines; + +pub mod idb_thread; diff --git a/components/net/lib.rs b/components/net/lib.rs index b236f2bc784..caee5ae7791 100644 --- a/components/net/lib.rs +++ b/components/net/lib.rs @@ -15,6 +15,7 @@ pub mod hsts; pub mod http_cache; pub mod http_loader; pub mod image_cache; +pub mod indexeddb; pub mod local_directory_listing; pub mod protocols; pub mod request_interceptor; diff --git a/components/net/resource_thread.rs b/components/net/resource_thread.rs index 94592d19bed..5572d8c7cc1 100644 --- a/components/net/resource_thread.rs +++ b/components/net/resource_thread.rs @@ -23,6 +23,7 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcReceiverSet, IpcSender}; use log::{debug, trace, warn}; use net_traits::blob_url_store::parse_blob_url; use net_traits::filemanager_thread::FileTokenCheck; +use net_traits::indexeddb_thread::IndexedDBThreadMsg; use net_traits::pub_domains::public_suffix_list_size_of; use net_traits::request::{Destination, RequestBuilder, RequestId}; use net_traits::response::{Response, ResponseInit}; @@ -56,6 +57,7 @@ use crate::filemanager_thread::FileManager; use crate::hsts::{self, HstsList}; use crate::http_cache::HttpCache; use crate::http_loader::{HttpState, http_redirect_fetch}; +use crate::indexeddb::idb_thread::IndexedDBThreadFactory; use crate::protocols::ProtocolRegistry; use crate::request_interceptor::RequestInterceptor; use crate::storage_thread::StorageThreadFactory; @@ -104,11 +106,12 @@ pub fn new_resource_threads( ignore_certificate_errors, protocols, ); + let idb: IpcSender = IndexedDBThreadFactory::new(config_dir.clone()); let storage: IpcSender = StorageThreadFactory::new(config_dir, mem_profiler_chan); ( - ResourceThreads::new(public_core, storage.clone()), - ResourceThreads::new(private_core, storage), + ResourceThreads::new(public_core, storage.clone(), idb.clone()), + ResourceThreads::new(private_core, storage, idb), ) } diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs index f5bd03cd8d7..3777a8ba861 100644 --- a/components/script/dom/bindings/error.rs +++ b/components/script/dom/bindings/error.rs @@ -86,12 +86,15 @@ pub(crate) fn throw_dom_exception( }, None => DOMErrorName::DataCloneError, }, + Error::Data => DOMErrorName::DataError, + Error::TransactionInactive => DOMErrorName::TransactionInactiveError, + Error::ReadOnly => DOMErrorName::ReadOnlyError, + Error::Version => DOMErrorName::VersionError, Error::NoModificationAllowed => DOMErrorName::NoModificationAllowedError, Error::QuotaExceeded => DOMErrorName::QuotaExceededError, Error::TypeMismatch => DOMErrorName::TypeMismatchError, Error::InvalidModification => DOMErrorName::InvalidModificationError, Error::NotReadable => DOMErrorName::NotReadableError, - Error::Data => DOMErrorName::DataError, Error::Operation => DOMErrorName::OperationError, Error::NotAllowed => DOMErrorName::NotAllowedError, Error::Type(message) => unsafe { diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs index fbb807b7a95..0e47bc56719 100644 --- a/components/script/dom/domexception.rs +++ b/components/script/dom/domexception.rs @@ -49,9 +49,12 @@ pub(crate) enum DOMErrorName { TimeoutError = DOMExceptionConstants::TIMEOUT_ERR, InvalidNodeTypeError = DOMExceptionConstants::INVALID_NODE_TYPE_ERR, DataCloneError = DOMExceptionConstants::DATA_CLONE_ERR, + DataError, + TransactionInactiveError, + ReadOnlyError, + VersionError, EncodingError, NotReadableError, - DataError, OperationError, NotAllowedError, } @@ -81,9 +84,12 @@ impl DOMErrorName { "TimeoutError" => Some(DOMErrorName::TimeoutError), "InvalidNodeTypeError" => Some(DOMErrorName::InvalidNodeTypeError), "DataCloneError" => Some(DOMErrorName::DataCloneError), + "DataError" => Some(DOMErrorName::DataError), + "TransactionInactiveError" => Some(DOMErrorName::TransactionInactiveError), + "ReadOnlyError" => Some(DOMErrorName::ReadOnlyError), + "VersionError" => Some(DOMErrorName::VersionError), "EncodingError" => Some(DOMErrorName::EncodingError), "NotReadableError" => Some(DOMErrorName::NotReadableError), - "DataError" => Some(DOMErrorName::DataError), "OperationError" => Some(DOMErrorName::OperationError), "NotAllowedError" => Some(DOMErrorName::NotAllowedError), _ => None, @@ -129,11 +135,20 @@ impl DOMException { "The supplied node is incorrect or has an incorrect ancestor for this operation." }, DOMErrorName::DataCloneError => "The object can not be cloned.", + DOMErrorName::DataError => "Provided data is inadequate.", + DOMErrorName::TransactionInactiveError => { + "A request was placed against a transaction which is currently not active, or which is finished." + }, + DOMErrorName::ReadOnlyError => { + "The mutating operation was attempted in a \"readonly\" transaction." + }, + DOMErrorName::VersionError => { + "An attempt was made to open a database using a lower version than the existing version." + }, DOMErrorName::EncodingError => { "The encoding operation (either encoded or decoding) failed." }, DOMErrorName::NotReadableError => "The I/O read operation failed.", - DOMErrorName::DataError => "Provided data is inadequate.", DOMErrorName::OperationError => { "The operation failed for an operation-specific reason." }, diff --git a/components/script/dom/idbdatabase.rs b/components/script/dom/idbdatabase.rs new file mode 100644 index 00000000000..7d8a4395b72 --- /dev/null +++ b/components/script/dom/idbdatabase.rs @@ -0,0 +1,388 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use std::cell::Cell; + +use dom_struct::dom_struct; +use ipc_channel::ipc::IpcSender; +use net_traits::IpcSend; +use net_traits::indexeddb_thread::{IndexedDBThreadMsg, SyncOperation}; +use profile_traits::ipc; +use stylo_atoms::Atom; + +use crate::dom::bindings::cell::DomRefCell; +use crate::dom::bindings::codegen::Bindings::IDBDatabaseBinding::{ + IDBDatabaseMethods, IDBObjectStoreParameters, IDBTransactionOptions, +}; +use crate::dom::bindings::codegen::Bindings::IDBTransactionBinding::IDBTransactionMode; +use crate::dom::bindings::codegen::UnionTypes::StringOrStringSequence; +use crate::dom::bindings::error::{Error, Fallible}; +use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::refcounted::Trusted; +use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object}; +use crate::dom::bindings::root::{DomRoot, MutNullableDom}; +use crate::dom::bindings::str::DOMString; +use crate::dom::domstringlist::DOMStringList; +use crate::dom::event::{Event, EventBubbles, EventCancelable}; +use crate::dom::eventtarget::EventTarget; +use crate::dom::globalscope::GlobalScope; +use crate::dom::idbobjectstore::IDBObjectStore; +use crate::dom::idbtransaction::IDBTransaction; +use crate::dom::idbversionchangeevent::IDBVersionChangeEvent; +use crate::script_runtime::CanGc; + +#[dom_struct] +pub struct IDBDatabase { + eventtarget: EventTarget, + /// + name: DOMString, + /// + version: Cell, + /// + object_store_names: DomRefCell>, + /// + upgrade_transaction: MutNullableDom, + + // Flags + /// + closing: Cell, +} + +impl IDBDatabase { + pub fn new_inherited(name: DOMString, version: u64) -> IDBDatabase { + IDBDatabase { + eventtarget: EventTarget::new_inherited(), + name, + version: Cell::new(version), + object_store_names: Default::default(), + + upgrade_transaction: Default::default(), + closing: Cell::new(false), + } + } + + pub fn new( + global: &GlobalScope, + name: DOMString, + version: u64, + can_gc: CanGc, + ) -> DomRoot { + reflect_dom_object( + Box::new(IDBDatabase::new_inherited(name, version)), + global, + can_gc, + ) + } + + fn get_idb_thread(&self) -> IpcSender { + self.global().resource_threads().sender() + } + + pub fn get_name(&self) -> DOMString { + self.name.clone() + } + + pub fn object_stores(&self) -> DomRoot { + DOMStringList::new( + self.global().as_window(), + self.object_store_names.borrow().clone(), + CanGc::note(), + ) + } + + pub fn version(&self) -> u64 { + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + let operation = SyncOperation::Version( + sender, + self.global().origin().immutable().clone(), + self.name.to_string(), + ); + + let _ = self + .get_idb_thread() + .send(IndexedDBThreadMsg::Sync(operation)); + + receiver.recv().unwrap() + } + + pub fn set_transaction(&self, transaction: &IDBTransaction) { + self.upgrade_transaction.set(Some(transaction)); + } + + #[allow(dead_code)] // This will be used once we allow multiple concurrent connections + pub fn dispatch_versionchange( + &self, + old_version: u64, + new_version: Option, + _can_gc: CanGc, + ) { + let global = self.global(); + let this = Trusted::new(self); + global.task_manager().database_access_task_source().queue( + task!(send_versionchange_notification: move || { + let this = this.root(); + let global = this.global(); + let event = IDBVersionChangeEvent::new( + &global, + Atom::from("versionchange"), + EventBubbles::DoesNotBubble, + EventCancelable::NotCancelable, + old_version, + new_version, + CanGc::note() + ); + event.upcast::().fire(this.upcast(), CanGc::note()); + }), + ); + } +} + +impl IDBDatabaseMethods for IDBDatabase { + /// + fn Transaction( + &self, + store_names: StringOrStringSequence, + mode: IDBTransactionMode, + _options: &IDBTransactionOptions, + ) -> Fallible> { + // FIXIME:(arihant2math) use options + // Step 1: Check if upgrade transaction is running + // FIXME:(rasviitanen) + + // Step 2: if close flag is set, throw error + if self.closing.get() { + return Err(Error::InvalidState); + } + + // Step 3 + Ok(match store_names { + StringOrStringSequence::String(name) => IDBTransaction::new( + &self.global(), + self, + mode, + &DOMStringList::new(self.global().as_window(), vec![name], CanGc::note()), + CanGc::note(), + ), + StringOrStringSequence::StringSequence(sequence) => { + // FIXME:(rasviitanen) Remove eventual duplicated names + // from the sequence + IDBTransaction::new( + &self.global(), + self, + mode, + &DOMStringList::new(self.global().as_window(), sequence, CanGc::note()), + CanGc::note(), + ) + }, + }) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-createobjectstore + fn CreateObjectStore( + &self, + name: DOMString, + options: &IDBObjectStoreParameters, + ) -> Fallible> { + // FIXME:(arihant2math) ^^ Change idl to match above. + // Step 2 + let upgrade_transaction = match self.upgrade_transaction.get() { + Some(txn) => txn, + None => return Err(Error::InvalidState), + }; + + // Step 3 + if !upgrade_transaction.is_active() { + return Err(Error::TransactionInactive); + } + + // Step 4 + let key_path = options.keyPath.as_ref(); + + // Step 5 + if let Some(path) = key_path { + if !IDBObjectStore::is_valid_key_path(path) { + return Err(Error::Syntax); + } + } + + // Step 6 + if self + .object_store_names + .borrow() + .iter() + .any(|store_name| store_name.to_string() == name.to_string()) + { + // TODO: Add constraint as an dom exception and throw that instead + return Err(Error::InvalidState); + } + + // Step 7 + let auto_increment = options.autoIncrement; + + // Step 8 + if auto_increment { + match key_path { + Some(StringOrStringSequence::String(path)) => { + if path == "" { + return Err(Error::InvalidAccess); + } + }, + Some(StringOrStringSequence::StringSequence(_)) => { + return Err(Error::InvalidAccess); + }, + None => {}, + } + } + + // Step 9 + let object_store = IDBObjectStore::new( + &self.global(), + self.name.clone(), + name.clone(), + Some(options), + CanGc::note(), + ); + object_store.set_transaction(&upgrade_transaction); + + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + + let operation = SyncOperation::CreateObjectStore( + sender, + self.global().origin().immutable().clone(), + self.name.to_string(), + name.to_string(), + auto_increment, + ); + + self.get_idb_thread() + .send(IndexedDBThreadMsg::Sync(operation)) + .unwrap(); + + if receiver + .recv() + .expect("Could not receive object store creation status") + .is_err() + { + warn!("Object store creation failed in idb thread"); + return Err(Error::InvalidState); + }; + + self.object_store_names.borrow_mut().push(name); + Ok(object_store) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-deleteobjectstore + fn DeleteObjectStore(&self, name: DOMString) -> Fallible<()> { + // Steps 1 & 2 + let transaction = self.upgrade_transaction.get(); + let transaction = match transaction { + Some(transaction) => transaction, + None => return Err(Error::InvalidState), + }; + + // Step 3 + if !transaction.is_active() { + return Err(Error::TransactionInactive); + } + + // Step 4 + if !self + .object_store_names + .borrow() + .iter() + .any(|store_name| store_name.to_string() == name.to_string()) + { + return Err(Error::NotFound); + } + + // Step 5 + self.object_store_names + .borrow_mut() + .retain(|store_name| store_name.to_string() != name.to_string()); + + // Step 6 + // FIXME:(arihant2math) Remove from index set ... + + // Step 7 + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + + let operation = SyncOperation::DeleteObjectStore( + sender, + self.global().origin().immutable().clone(), + self.name.to_string(), + name.to_string(), + ); + + self.get_idb_thread() + .send(IndexedDBThreadMsg::Sync(operation)) + .unwrap(); + + if receiver + .recv() + .expect("Could not receive object store deletion status") + .is_err() + { + warn!("Object store deletion failed in idb thread"); + return Err(Error::InvalidState); + }; + Ok(()) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-name + fn Name(&self) -> DOMString { + self.name.clone() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-version + fn Version(&self) -> u64 { + self.version() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-objectstorenames + fn ObjectStoreNames(&self) -> DomRoot { + // FIXME: (arihant2math) Sort the list of names, as per spec + DOMStringList::new( + self.global().as_window(), + self.object_store_names.borrow().clone(), + CanGc::note(), + ) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-close + fn Close(&self) { + // Step 1: Set the close pending flag of connection. + self.closing.set(true); + + // Step 2: Handle force flag + // FIXME:(arihant2math) + // Step 3: Wait for all transactions by this db to finish + // FIXME:(arihant2math) + // Step 4: If force flag is set, fire a close event + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + let operation = SyncOperation::CloseDatabase( + sender, + self.global().origin().immutable().clone(), + self.name.to_string(), + ); + let _ = self + .get_idb_thread() + .send(IndexedDBThreadMsg::Sync(operation)); + + if receiver.recv().is_err() { + warn!("Database close failed in idb thread"); + }; + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-onabort + event_handler!(abort, GetOnabort, SetOnabort); + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-onclose + event_handler!(close, GetOnclose, SetOnclose); + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-onerror + event_handler!(error, GetOnerror, SetOnerror); + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-onversionchange + event_handler!(versionchange, GetOnversionchange, SetOnversionchange); +} diff --git a/components/script/dom/idbfactory.rs b/components/script/dom/idbfactory.rs new file mode 100644 index 00000000000..66f7590e2da --- /dev/null +++ b/components/script/dom/idbfactory.rs @@ -0,0 +1,97 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use dom_struct::dom_struct; +use servo_url::origin::ImmutableOrigin; + +use crate::dom::bindings::codegen::Bindings::IDBFactoryBinding::IDBFactoryMethods; +use crate::dom::bindings::error::{Error, Fallible}; +use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object}; +use crate::dom::bindings::root::DomRoot; +use crate::dom::bindings::str::DOMString; +use crate::dom::globalscope::GlobalScope; +use crate::dom::idbopendbrequest::IDBOpenDBRequest; +use crate::script_runtime::CanGc; + +#[dom_struct] +pub struct IDBFactory { + reflector_: Reflector, +} + +impl IDBFactory { + pub fn new_inherited() -> IDBFactory { + IDBFactory { + reflector_: Reflector::new(), + } + } + + pub fn new(global: &GlobalScope, can_gc: CanGc) -> DomRoot { + reflect_dom_object(Box::new(IDBFactory::new_inherited()), global, can_gc) + } +} + +impl IDBFactoryMethods for IDBFactory { + // https://www.w3.org/TR/IndexedDB-2/#dom-idbfactory-open + fn Open(&self, name: DOMString, version: Option) -> Fallible> { + // Step 1: If version is 0 (zero), throw a TypeError. + if version == Some(0) { + return Err(Error::Type( + "The version must be an integer >= 1".to_owned(), + )); + }; + + // Step 2: Let origin be the origin of the global scope used to + // access this IDBFactory. + let global = self.global(); + let origin = global.origin(); + + // Step 3: if origin is an opaque origin, + // throw a "SecurityError" DOMException and abort these steps. + if let ImmutableOrigin::Opaque(_) = origin.immutable() { + return Err(Error::Security); + } + + // Step 4: Let request be a new open request. + let request = IDBOpenDBRequest::new(&self.global(), CanGc::note()); + + // Step 5: Runs in parallel + request.open_database(name, version); + + // Step 6 + Ok(request) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbfactory-deletedatabase + fn DeleteDatabase(&self, name: DOMString) -> Fallible> { + // Step 1: Let origin be the origin of the global scope used to + // access this IDBFactory. + let global = self.global(); + let origin = global.origin(); + + // Step 2: if origin is an opaque origin, + // throw a "SecurityError" DOMException and abort these steps. + if let ImmutableOrigin::Opaque(_) = origin.immutable() { + return Err(Error::Security); + } + + // Step 3: Let request be a new open request + let request = IDBOpenDBRequest::new(&self.global(), CanGc::note()); + + // Step 4: Runs in parallel + request.delete_database(name.to_string()); + + // Step 5: Return request + Ok(request) + } + + // // https://www.w3.org/TR/IndexedDB-2/#dom-idbfactory-databases + // fn Databases(&self) -> Rc { + // unimplemented!(); + // } + // + // // https://www.w3.org/TR/IndexedDB-2/#dom-idbfactory-cmp + // fn Cmp(&self, _cx: SafeJSContext, _first: HandleValue, _second: HandleValue) -> i16 { + // unimplemented!(); + // } +} diff --git a/components/script/dom/idbobjectstore.rs b/components/script/dom/idbobjectstore.rs new file mode 100644 index 00000000000..92629798e41 --- /dev/null +++ b/components/script/dom/idbobjectstore.rs @@ -0,0 +1,588 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use std::ptr; + +use dom_struct::dom_struct; +use js::conversions::ToJSValConvertible; +use js::jsapi::{ + ESClass, GetBuiltinClass, IsArrayBufferObject, JS_DeleteUCProperty, + JS_GetOwnUCPropertyDescriptor, JS_GetStringLength, JS_IsArrayBufferViewObject, JSObject, + ObjectOpResult, ObjectOpResult_SpecialCodes, PropertyDescriptor, +}; +use js::jsval::UndefinedValue; +use js::rust::{HandleValue, MutableHandleValue}; +use net_traits::IpcSend; +use net_traits::indexeddb_thread::{ + AsyncOperation, IndexedDBKeyType, IndexedDBThreadMsg, SyncOperation, +}; +use profile_traits::ipc; + +use crate::dom::bindings::cell::DomRefCell; +use crate::dom::bindings::codegen::Bindings::IDBDatabaseBinding::IDBObjectStoreParameters; +use crate::dom::bindings::codegen::Bindings::IDBObjectStoreBinding::IDBObjectStoreMethods; +use crate::dom::bindings::codegen::Bindings::IDBTransactionBinding::IDBTransactionMode; +// We need to alias this name, otherwise test-tidy complains at &String reference. +use crate::dom::bindings::codegen::UnionTypes::StringOrStringSequence as StrOrStringSequence; +use crate::dom::bindings::error::{Error, Fallible}; +use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object}; +use crate::dom::bindings::root::{DomRoot, MutNullableDom}; +use crate::dom::bindings::str::DOMString; +use crate::dom::bindings::structuredclone; +use crate::dom::domstringlist::DOMStringList; +use crate::dom::globalscope::GlobalScope; +use crate::dom::idbrequest::IDBRequest; +use crate::dom::idbtransaction::IDBTransaction; +use crate::script_runtime::{CanGc, JSContext as SafeJSContext}; + +#[derive(JSTraceable, MallocSizeOf)] +pub enum KeyPath { + String(DOMString), + StringSequence(Vec), +} + +#[dom_struct] +pub struct IDBObjectStore { + reflector_: Reflector, + name: DomRefCell, + key_path: Option, + index_names: DomRoot, + transaction: MutNullableDom, + auto_increment: bool, + + // We store the db name in the object store to be able to find the correct + // store in the idb thread when checking if we have a key generator + db_name: DOMString, +} + +impl IDBObjectStore { + pub fn new_inherited( + global: &GlobalScope, + db_name: DOMString, + name: DOMString, + options: Option<&IDBObjectStoreParameters>, + can_gc: CanGc, + ) -> IDBObjectStore { + let key_path: Option = match options { + Some(options) => options.keyPath.as_ref().map(|path| match path { + StrOrStringSequence::String(inner) => KeyPath::String(inner.clone()), + StrOrStringSequence::StringSequence(inner) => { + KeyPath::StringSequence(inner.clone()) + }, + }), + None => None, + }; + + IDBObjectStore { + reflector_: Reflector::new(), + name: DomRefCell::new(name), + key_path, + + index_names: DOMStringList::new(global.as_window(), Vec::new(), can_gc), + transaction: Default::default(), + // FIXME:(arihant2math) + auto_increment: false, + + db_name, + } + } + + pub fn new( + global: &GlobalScope, + db_name: DOMString, + name: DOMString, + options: Option<&IDBObjectStoreParameters>, + can_gc: CanGc, + ) -> DomRoot { + reflect_dom_object( + Box::new(IDBObjectStore::new_inherited( + global, db_name, name, options, can_gc, + )), + global, + can_gc, + ) + } + + pub fn get_name(&self) -> DOMString { + self.name.borrow().clone() + } + + pub fn set_transaction(&self, transaction: &IDBTransaction) { + self.transaction.set(Some(transaction)); + } + + pub fn transaction(&self) -> Option> { + self.transaction.get() + } + + // https://www.w3.org/TR/IndexedDB-2/#valid-key-path + pub fn is_valid_key_path(key_path: &StrOrStringSequence) -> bool { + fn is_identifier(_s: &str) -> bool { + // FIXME: (arihant2math) + true + } + + let is_valid = |path: &DOMString| { + path.is_empty() || is_identifier(path) || path.split(".").all(is_identifier) + }; + + match key_path { + StrOrStringSequence::StringSequence(paths) => { + if paths.is_empty() { + return false; + } + + paths.iter().all(is_valid) + }, + StrOrStringSequence::String(path) => is_valid(path), + } + } + + #[allow(unsafe_code)] + // https://www.w3.org/TR/IndexedDB-2/#convert-value-to-key + fn convert_value_to_key( + cx: SafeJSContext, + input: HandleValue, + seen: Option>, + ) -> Result { + // Step 1: If seen was not given, then let seen be a new empty set. + let _seen = seen.unwrap_or_default(); + + // Step 2: If seen contains input, then return invalid. + // FIXME:(rasviitanen) + // Check if we have seen this key + // Does not currently work with HandleValue, + // as it does not implement PartialEq + + // Step 3 + // FIXME:(rasviitanen) Accept buffer, array and date as well + if input.is_number() { + // FIXME:(rasviitanen) check for NaN + let key = structuredclone::write(cx, input, None).expect("Could not serialize key"); + return Ok(IndexedDBKeyType::Number(key.serialized)); + } + + if input.is_string() { + let key = structuredclone::write(cx, input, None).expect("Could not serialize key"); + return Ok(IndexedDBKeyType::String(key.serialized)); + } + + if input.is_object() { + rooted!(in(*cx) let object = input.to_object()); + unsafe { + let mut built_in_class = ESClass::Other; + + if !GetBuiltinClass(*cx, object.handle().into(), &mut built_in_class) { + return Err(Error::Data); + } + + if let ESClass::Date = built_in_class { + // FIXME:(arihant2math) implement it the correct way + let key = + structuredclone::write(cx, input, None).expect("Could not serialize key"); + return Ok(IndexedDBKeyType::Date(key.serialized.clone())); + } + + if IsArrayBufferObject(*object) || JS_IsArrayBufferViewObject(*object) { + let key = + structuredclone::write(cx, input, None).expect("Could not serialize key"); + // FIXME:(arihant2math) Return the correct type here + // it doesn't really matter at the moment... + return Ok(IndexedDBKeyType::Number(key.serialized.clone())); + } + + if let ESClass::Array = built_in_class { + // FIXME:(arihant2math) + unimplemented!("Arrays as keys is currently unsupported"); + } + } + } + + Err(Error::Data) + } + + // https://www.w3.org/TR/IndexedDB-2/#evaluate-a-key-path-on-a-value + #[allow(unsafe_code)] + fn evaluate_key_path_on_value( + cx: SafeJSContext, + value: HandleValue, + mut return_val: MutableHandleValue, + key_path: &KeyPath, + ) { + // The implementation is translated from gecko: + // https://github.com/mozilla/gecko-dev/blob/master/dom/indexedDB/KeyPath.cpp + return_val.set(*value); + + rooted!(in(*cx) let mut target_object = ptr::null_mut::()); + rooted!(in(*cx) let mut current_val = *value); + rooted!(in(*cx) let mut object = ptr::null_mut::()); + + let mut target_object_prop_name: Option = None; + + match key_path { + KeyPath::String(path) => { + // Step 3 + let path_as_string = path.to_string(); + let mut tokenizer = path_as_string.split('.').peekable(); + + while let Some(token) = tokenizer.next() { + if target_object.get().is_null() { + if token == "length" && + tokenizer.peek().is_none() && + current_val.is_string() + { + rooted!(in(*cx) let input_val = current_val.to_string()); + unsafe { + let string_len = JS_GetStringLength(*input_val) as u64; + string_len.to_jsval(*cx, return_val); + } + break; + } + + if !current_val.is_object() { + // FIXME:(rasviitanen) Return a proper error + return; + } + + object.handle_mut().set(current_val.to_object()); + rooted!(in(*cx) let mut desc = PropertyDescriptor::default()); + rooted!(in(*cx) let mut intermediate = UndefinedValue()); + + // So rust says that this value is never read, but it is. + #[allow(unused)] + let mut has_prop = false; + + unsafe { + let prop_name_as_utf16: Vec = token.encode_utf16().collect(); + let mut is_descriptor_none: bool = false; + let ok = JS_GetOwnUCPropertyDescriptor( + *cx, + object.handle().into(), + prop_name_as_utf16.as_ptr(), + prop_name_as_utf16.len(), + desc.handle_mut().into(), + &mut is_descriptor_none, + ); + + if !ok { + // FIXME:(arihant2math) Handle this + return; + } + + if desc.hasWritable_() || desc.hasValue_() { + intermediate.handle_mut().set(desc.handle().value_); + has_prop = true; + } else { + // If we get here it means the object doesn't have the property or the + // property is available throuch a getter. We don't want to call any + // getters to avoid potential re-entrancy. + // The blob object is special since its properties are available + // only through getters but we still want to support them for key + // extraction. So they need to be handled manually. + unimplemented!("Blob tokens are not yet supported"); + } + } + + if has_prop { + // Treat undefined as an error + if intermediate.is_undefined() { + // FIXME:(rasviitanen) Throw/return error + return; + } + + if tokenizer.peek().is_some() { + // ...and walk to it if there are more steps... + current_val.handle_mut().set(*intermediate); + } else { + // ...otherwise use it as key + return_val.set(*intermediate); + } + } else { + target_object.handle_mut().set(*object); + target_object_prop_name = Some(token.to_string()); + } + } + + if !target_object.get().is_null() { + // We have started inserting new objects or are about to just insert + // the first one. + // FIXME:(rasviitanen) Implement this piece + unimplemented!("keyPath tokens that requires insertion are not supported."); + } + } // All tokens processed + + if !target_object.get().is_null() { + // If this fails, we lose, and the web page sees a magical property + // appear on the object :-( + unsafe { + let prop_name_as_utf16: Vec = + target_object_prop_name.unwrap().encode_utf16().collect(); + #[allow(clippy::cast_enum_truncation)] + let mut succeeded = ObjectOpResult { + code_: ObjectOpResult_SpecialCodes::Uninitialized as usize, + }; + if !JS_DeleteUCProperty( + *cx, + target_object.handle().into(), + prop_name_as_utf16.as_ptr(), + prop_name_as_utf16.len(), + &mut succeeded, + ) { + // FIXME:(rasviitanen) Throw/return error + // return; + } + } + } + }, + KeyPath::StringSequence(_) => { + unimplemented!("String sequence keyPath is currently unsupported"); + }, + } + } + + fn has_key_generator(&self) -> bool { + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + + let operation = SyncOperation::HasKeyGenerator( + sender, + self.global().origin().immutable().clone(), + self.db_name.to_string(), + self.name.borrow().to_string(), + ); + + self.global() + .resource_threads() + .sender() + .send(IndexedDBThreadMsg::Sync(operation)) + .unwrap(); + + receiver.recv().unwrap() + } + + // https://www.w3.org/TR/IndexedDB-2/#extract-a-key-from-a-value-using-a-key-path + fn extract_key( + cx: SafeJSContext, + input: HandleValue, + key_path: &KeyPath, + multi_entry: Option, + ) -> Result { + // Step 1: Evaluate key path + // FIXME:(rasviitanen) Do this propertly + rooted!(in(*cx) let mut r = UndefinedValue()); + IDBObjectStore::evaluate_key_path_on_value(cx, input, r.handle_mut(), key_path); + + if let Some(_multi_entry) = multi_entry { + // FIXME:(rasviitanen) handle multi_entry cases + unimplemented!("multiEntry keys are not yet supported"); + } else { + IDBObjectStore::convert_value_to_key(cx, r.handle(), None) + } + } + + // https://www.w3.org/TR/IndexedDB-2/#object-store-in-line-keys + fn uses_inline_keys(&self) -> bool { + self.key_path.is_some() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-put + fn put( + &self, + cx: SafeJSContext, + value: HandleValue, + key: HandleValue, + overwrite: bool, + can_gc: CanGc, + ) -> Fallible> { + // Step 1: Let transaction be this object store handle's transaction. + let transaction = self + .transaction + .get() + .expect("No transaction in Object Store"); + + // Step 2: Let store be this object store handle's object store. + // This is resolved in the `execute_async` function. + + // Step 3: If store has been deleted, throw an "InvalidStateError" DOMException. + // FIXME:(rasviitanen) + + // Step 4-5: If transaction is not active, throw a "TransactionInactiveError" DOMException. + if !transaction.is_active() { + return Err(Error::TransactionInactive); + } + + // Step 5: If transaction is a read-only transaction, throw a "ReadOnlyError" DOMException. + if let IDBTransactionMode::Readonly = transaction.get_mode() { + return Err(Error::ReadOnly); + } + + // Step 6: If store uses in-line keys and key was given, throw a "DataError" DOMException. + if !key.is_undefined() && self.uses_inline_keys() { + return Err(Error::Data); + } + + // Step 7: If store uses out-of-line keys and has no key generator + // and key was not given, throw a "DataError" DOMException. + if !self.uses_inline_keys() && !self.has_key_generator() && key.is_undefined() { + return Err(Error::Data); + } + + // Step 8: If key was given, then: convert a value to a key with key + let serialized_key: IndexedDBKeyType; + + if !key.is_undefined() { + serialized_key = IDBObjectStore::convert_value_to_key(cx, key, None)?; + } else { + // Step 11: We should use in-line keys instead + if let Ok(kpk) = IDBObjectStore::extract_key( + cx, + value, + self.key_path.as_ref().expect("No key path"), + None, + ) { + serialized_key = kpk; + } else { + // FIXME:(rasviitanen) + // Check if store has a key generator + // Check if we can inject a key + return Err(Error::Data); + } + } + + let serialized_value = + structuredclone::write(cx, value, None).expect("Could not serialize value"); + + IDBRequest::execute_async( + self, + AsyncOperation::PutItem(serialized_key, serialized_value.serialized, overwrite), + None, + can_gc, + ) + } +} + +impl IDBObjectStoreMethods for IDBObjectStore { + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-put + fn Put( + &self, + cx: SafeJSContext, + value: HandleValue, + key: HandleValue, + ) -> Fallible> { + self.put(cx, value, key, true, CanGc::note()) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-add + fn Add( + &self, + cx: SafeJSContext, + value: HandleValue, + key: HandleValue, + ) -> Fallible> { + self.put(cx, value, key, false, CanGc::note()) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-delete + fn Delete(&self, cx: SafeJSContext, query: HandleValue) -> Fallible> { + let serialized_query = IDBObjectStore::convert_value_to_key(cx, query, None); + serialized_query.and_then(|q| { + IDBRequest::execute_async(self, AsyncOperation::RemoveItem(q), None, CanGc::note()) + }) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-clear + fn Clear(&self) -> Fallible> { + unimplemented!(); + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-get + fn Get(&self, cx: SafeJSContext, query: HandleValue) -> Fallible> { + let serialized_query = IDBObjectStore::convert_value_to_key(cx, query, None); + serialized_query.and_then(|q| { + IDBRequest::execute_async(self, AsyncOperation::GetItem(q), None, CanGc::note()) + }) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getkey + // fn GetKey(&self, _cx: SafeJSContext, _query: HandleValue) -> DomRoot { + // unimplemented!(); + // } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getall + // fn GetAll( + // &self, + // _cx: SafeJSContext, + // _query: HandleValue, + // _count: Option, + // ) -> DomRoot { + // unimplemented!(); + // } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getallkeys + // fn GetAllKeys( + // &self, + // _cx: SafeJSContext, + // _query: HandleValue, + // _count: Option, + // ) -> DomRoot { + // unimplemented!(); + // } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-count + fn Count(&self, cx: SafeJSContext, query: HandleValue) -> Fallible> { + // Step 1 + let transaction = self.transaction.get().expect("Could not get transaction"); + + // Step 2 + // FIXME(arihant2math): investigate further + + // Step 3 + // FIXME(arihant2math): Cannot tell if store has been deleted + + // Step 4 + if !transaction.is_active() { + return Err(Error::TransactionInactive); + } + + // Step 5 + let _serialized_query = IDBObjectStore::convert_value_to_key(cx, query, None); + + // Step 6 + // match serialized_query { + // Ok(q) => IDBRequest::execute_async(&*self, AsyncOperation::Count(q), None), + // Err(e) => Err(e), + // } + Err(Error::NotSupported) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-name + fn Name(&self) -> DOMString { + self.name.borrow().clone() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-setname + fn SetName(&self, value: DOMString) { + *self.name.borrow_mut() = value; + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-keypath + // fn KeyPath(&self, _cx: SafeJSContext, _val: MutableHandleValue) { + // unimplemented!(); + // } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-indexnames + // fn IndexNames(&self) -> DomRoot { + // unimplemented!(); + // } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-transaction + // fn Transaction(&self) -> DomRoot { + // unimplemented!(); + // } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-autoincrement + fn AutoIncrement(&self) -> bool { + // FIXME(arihant2math): This is wrong + self.auto_increment + } +} diff --git a/components/script/dom/idbopendbrequest.rs b/components/script/dom/idbopendbrequest.rs new file mode 100644 index 00000000000..dfb899c06ce --- /dev/null +++ b/components/script/dom/idbopendbrequest.rs @@ -0,0 +1,371 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use dom_struct::dom_struct; +use ipc_channel::router::ROUTER; +use js::jsval::UndefinedValue; +use js::rust::HandleValue; +use net_traits::IpcSend; +use net_traits::indexeddb_thread::{IndexedDBThreadMsg, SyncOperation}; +use profile_traits::ipc; +use stylo_atoms::Atom; + +use crate::dom::bindings::codegen::Bindings::IDBOpenDBRequestBinding::IDBOpenDBRequestMethods; +use crate::dom::bindings::codegen::Bindings::IDBTransactionBinding::IDBTransactionMode; +use crate::dom::bindings::error::{Error, Fallible}; +use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::refcounted::Trusted; +use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object}; +use crate::dom::bindings::root::DomRoot; +use crate::dom::bindings::str::DOMString; +use crate::dom::event::{Event, EventBubbles, EventCancelable}; +use crate::dom::globalscope::GlobalScope; +use crate::dom::idbdatabase::IDBDatabase; +use crate::dom::idbrequest::IDBRequest; +use crate::dom::idbtransaction::IDBTransaction; +use crate::dom::idbversionchangeevent::IDBVersionChangeEvent; +use crate::js::conversions::ToJSValConvertible; +use crate::realms::enter_realm; +use crate::script_runtime::CanGc; + +#[derive(Clone)] +struct OpenRequestListener { + open_request: Trusted, +} + +impl OpenRequestListener { + // https://www.w3.org/TR/IndexedDB-2/#open-a-database + fn handle_open_db( + &self, + name: String, + request_version: Option, + db_version: u64, + can_gc: CanGc, + ) -> (Fallible>, bool) { + // Step 5-6 + let request_version = match request_version { + Some(v) => v, + None => { + if db_version == 0 { + 1 + } else { + db_version + } + }, + }; + + // Step 7 + if request_version < db_version { + return (Err(Error::Version), false); + } + + // Step 8-9 + let open_request = self.open_request.root(); + let global = open_request.global(); + let connection = IDBDatabase::new( + &global, + DOMString::from_string(name.clone()), + request_version, + can_gc, + ); + + // Step 10 + if request_version > db_version { + // FIXME:(rasviitanen) Do step 10.1-10.5 + // connection.dispatch_versionchange(db_version, Some(request_version)); + // Step 10.6 + open_request.upgrade_db_version(&connection, request_version, CanGc::note()); + // Step 11 + (Ok(connection), true) + } else { + // Step 11 + (Ok(connection), false) + } + } + + fn handle_delete_db(&self, result: Result<(), ()>, can_gc: CanGc) { + let open_request = self.open_request.root(); + let global = open_request.global(); + open_request.idbrequest.set_ready_state_done(); + + match result { + Ok(_) => { + let _ac = enter_realm(&*open_request); + #[allow(unsafe_code)] + unsafe { + open_request + .set_result(js::gc::Handle::from_raw(js::jsapi::UndefinedHandleValue)); + } + + let event = Event::new( + &global, + Atom::from("success"), + EventBubbles::DoesNotBubble, + EventCancelable::NotCancelable, + can_gc, + ); + event.fire(open_request.upcast(), can_gc); + }, + Err(_e) => { + // FIXME(rasviitanen) Set the error of request to the + // appropriate error + + let event = Event::new( + &global, + Atom::from("error"), + EventBubbles::Bubbles, + EventCancelable::Cancelable, + can_gc, + ); + event.fire(open_request.upcast(), can_gc); + }, + } + } +} + +#[dom_struct] +pub struct IDBOpenDBRequest { + idbrequest: IDBRequest, +} + +impl IDBOpenDBRequest { + pub fn new_inherited() -> IDBOpenDBRequest { + IDBOpenDBRequest { + idbrequest: IDBRequest::new_inherited(), + } + } + + pub fn new(global: &GlobalScope, can_gc: CanGc) -> DomRoot { + reflect_dom_object(Box::new(IDBOpenDBRequest::new_inherited()), global, can_gc) + } + + #[allow(unsafe_code)] + // https://www.w3.org/TR/IndexedDB-2/#run-an-upgrade-transaction + fn upgrade_db_version(&self, connection: &IDBDatabase, version: u64, can_gc: CanGc) { + let global = self.global(); + // Step 2 + let transaction = IDBTransaction::new( + &global, + connection, + IDBTransactionMode::Versionchange, + &connection.object_stores(), + can_gc, + ); + + // Step 3 + connection.set_transaction(&transaction); + + // Step 4 + transaction.set_active_flag(false); + + // Step 5-7 + let old_version = connection.version(); + transaction.upgrade_db_version(version); + + // Step 8 + let this = Trusted::new(self); + let connection = Trusted::new(connection); + let trusted_transaction = Trusted::new(&*transaction); + global.task_manager().database_access_task_source().queue( + task!(send_upgradeneeded_notification: move || { + let this = this.root(); + let txn = trusted_transaction.root(); + let conn = connection.root(); + let global = this.global(); + let cx = GlobalScope::get_cx(); + + // Step 8.1 + let _ac = enter_realm(&*conn); + rooted!(in(*cx) let mut connection_val = UndefinedValue()); + unsafe { + conn.to_jsval(*cx, connection_val.handle_mut()); + } + this.idbrequest.set_result(connection_val.handle()); + + // Step 8.2 + this.idbrequest.set_transaction(&txn); + + // Step 8.3 + this.idbrequest.set_ready_state_done(); + + let event = IDBVersionChangeEvent::new( + &global, + Atom::from("upgradeneeded"), + EventBubbles::DoesNotBubble, + EventCancelable::NotCancelable, + old_version, + Some(version), + CanGc::note(), + ); + + // Step 8.4 + txn.set_active_flag(true); + // Step 8.5 + let _did_throw = event.upcast::().fire(this.upcast(), CanGc::note()); + // FIXME:(rasviitanen) Handle throw (Step 8.5) + // https://www.w3.org/TR/IndexedDB-2/#run-an-upgrade-transaction + // Step 8.6 + txn.set_active_flag(false); + + // Implementation specific: we fire the success on db here + // to make sure the success event occurs after the upgrade event. + txn.wait(); + this.dispatch_success(&conn); + }), + ); + + // Step 9: Starts and waits for the transaction to finish + transaction.wait(); + } + + pub fn set_result(&self, result: HandleValue) { + self.idbrequest.set_result(result); + } + + pub fn set_error(&self, error: Error, can_gc: CanGc) { + self.idbrequest.set_error(error, can_gc); + } + + pub fn open_database(&self, name: DOMString, version: Option) { + let global = self.global(); + + let (sender, receiver) = ipc::channel(global.time_profiler_chan().clone()).unwrap(); + let response_listener = OpenRequestListener { + open_request: Trusted::new(self), + }; + + let open_operation = SyncOperation::OpenDatabase( + sender, + global.origin().immutable().clone(), + name.to_string(), + version, + ); + + let task_source = global + .task_manager() + .database_access_task_source() + .to_sendable(); + + let trusted_request = Trusted::new(self); + let name = name.to_string(); + ROUTER.add_typed_route( + receiver.to_ipc_receiver(), + Box::new(move |message| { + let trusted_request = trusted_request.clone(); + let response_listener = response_listener.clone(); + let name = name.clone(); + + task_source.queue( + task!(set_request_result_to_database: move || { + let (result, did_upgrade) = + response_listener.handle_open_db(name, version, message.unwrap(), CanGc::note()); + // If an upgrade event was created, it will be responsible for + // dispatching the success event + if did_upgrade { + return; + } + let request = trusted_request.root(); + let global = request.global(); + match result { + Ok(db) => { + request.dispatch_success(&db); + }, + Err(dom_exception) => { + request.set_result(HandleValue::undefined()); + request.set_error(dom_exception, CanGc::note()); + let event = Event::new( + &global, + Atom::from("error"), + EventBubbles::Bubbles, + EventCancelable::Cancelable, + CanGc::note() + ); + event.fire(request.upcast(), CanGc::note()); + } + } + }), + ); + }), + ); + + global + .resource_threads() + .sender() + .send(IndexedDBThreadMsg::Sync(open_operation)) + .unwrap(); + } + + pub fn delete_database(&self, name: String) { + let global = self.global(); + + let (sender, receiver) = ipc::channel(global.time_profiler_chan().clone()).unwrap(); + let task_source = global + .task_manager() + .database_access_task_source() + .to_sendable(); + let response_listener = OpenRequestListener { + open_request: Trusted::new(self), + }; + + let delete_operation = + SyncOperation::DeleteDatabase(sender, global.origin().immutable().clone(), name); + + ROUTER.add_typed_route( + receiver.to_ipc_receiver(), + Box::new(move |message| { + let response_listener = response_listener.clone(); + task_source.queue(task!(request_callback: move || { + response_listener.handle_delete_db(message.unwrap(), CanGc::note()); + })); + }), + ); + + global + .resource_threads() + .sender() + .send(IndexedDBThreadMsg::Sync(delete_operation)) + .unwrap(); + } + + #[allow(unsafe_code)] + pub fn dispatch_success(&self, result: &IDBDatabase) { + let global = self.global(); + let this = Trusted::new(self); + let result = Trusted::new(result); + + global.task_manager().database_access_task_source().queue( + task!(send_success_notification: move || { + let this = this.root(); + let result = result.root(); + this.idbrequest.set_ready_state_done(); + let global = this.global(); + let cx = GlobalScope::get_cx(); + + let _ac = enter_realm(&*result); + rooted!(in(*cx) let mut result_val = UndefinedValue()); + unsafe { + result.to_jsval(*cx, result_val.handle_mut()); + } + this.set_result(result_val.handle()); + + let event = Event::new( + &global, + Atom::from("success"), + EventBubbles::DoesNotBubble, + EventCancelable::NotCancelable, + CanGc::note() + ); + event.fire(this.upcast(), CanGc::note()); + }), + ); + } +} + +impl IDBOpenDBRequestMethods for IDBOpenDBRequest { + // https://www.w3.org/TR/IndexedDB-2/#dom-idbopendbrequest-onblocked + event_handler!(blocked, GetOnblocked, SetOnblocked); + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbopendbrequest-onupgradeneeded + event_handler!(upgradeneeded, GetOnupgradeneeded, SetOnupgradeneeded); +} diff --git a/components/script/dom/idbrequest.rs b/components/script/dom/idbrequest.rs new file mode 100644 index 00000000000..eedd6a52902 --- /dev/null +++ b/components/script/dom/idbrequest.rs @@ -0,0 +1,276 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use std::cell::Cell; + +use constellation_traits::StructuredSerializedData; +use dom_struct::dom_struct; +use ipc_channel::router::ROUTER; +use js::jsapi::Heap; +use js::jsval::{JSVal, UndefinedValue}; +use js::rust::HandleValue; +use net_traits::IpcSend; +use net_traits::indexeddb_thread::{AsyncOperation, IndexedDBThreadMsg, IndexedDBTxnMode}; +use profile_traits::ipc; +use stylo_atoms::Atom; + +use crate::dom::bindings::codegen::Bindings::IDBRequestBinding::{ + IDBRequestMethods, IDBRequestReadyState, +}; +use crate::dom::bindings::codegen::Bindings::IDBTransactionBinding::IDBTransactionMode; +use crate::dom::bindings::error::{Error, Fallible}; +use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::refcounted::Trusted; +use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object}; +use crate::dom::bindings::root::{DomRoot, MutNullableDom}; +use crate::dom::bindings::structuredclone; +use crate::dom::domexception::{DOMErrorName, DOMException}; +use crate::dom::event::{Event, EventBubbles, EventCancelable}; +use crate::dom::eventtarget::EventTarget; +use crate::dom::globalscope::GlobalScope; +use crate::dom::idbobjectstore::IDBObjectStore; +use crate::dom::idbtransaction::IDBTransaction; +use crate::realms::enter_realm; +use crate::script_runtime::{CanGc, JSContext as SafeJSContext}; + +#[derive(Clone)] +struct RequestListener { + request: Trusted, +} + +impl RequestListener { + fn handle_async_request_finished(&self, result: Option>) { + let request = self.request.root(); + let global = request.global(); + let cx = GlobalScope::get_cx(); + + request.set_ready_state_done(); + + let _ac = enter_realm(&*request); + rooted!(in(*cx) let mut answer = UndefinedValue()); + + if let Some(serialized_data) = result { + let data = StructuredSerializedData { + serialized: serialized_data, + ..Default::default() + }; + + if structuredclone::read(&global, data, answer.handle_mut()).is_err() { + warn!("Error reading structuredclone data"); + } + + request.set_result(answer.handle()); + + let transaction = request + .transaction + .get() + .expect("Request unexpectedly has no transaction"); + + let event = Event::new( + &global, + Atom::from("success"), + EventBubbles::DoesNotBubble, + EventCancelable::NotCancelable, + CanGc::note(), + ); + + transaction.set_active_flag(true); + event + .upcast::() + .fire(request.upcast(), CanGc::note()); + transaction.set_active_flag(false); + } else { + request.set_result(answer.handle()); + + // FIXME:(rasviitanen) + // Set the error of request to result + + let transaction = request + .transaction + .get() + .expect("Request has no transaction"); + + let event = Event::new( + &global, + Atom::from("error"), + EventBubbles::Bubbles, + EventCancelable::Cancelable, + CanGc::note(), + ); + + transaction.set_active_flag(true); + event + .upcast::() + .fire(request.upcast(), CanGc::note()); + transaction.set_active_flag(false); + } + } +} + +#[dom_struct] +pub struct IDBRequest { + eventtarget: EventTarget, + #[ignore_malloc_size_of = "mozjs"] + result: Heap, + error: MutNullableDom, + source: MutNullableDom, + transaction: MutNullableDom, + ready_state: Cell, +} + +impl IDBRequest { + pub fn new_inherited() -> IDBRequest { + IDBRequest { + eventtarget: EventTarget::new_inherited(), + + result: Heap::default(), + error: Default::default(), + source: Default::default(), + transaction: Default::default(), + ready_state: Cell::new(IDBRequestReadyState::Pending), + } + } + + pub fn new(global: &GlobalScope, can_gc: CanGc) -> DomRoot { + reflect_dom_object(Box::new(IDBRequest::new_inherited()), global, can_gc) + } + + pub fn set_source(&self, source: Option<&IDBObjectStore>) { + self.source.set(source); + } + + pub fn set_ready_state_done(&self) { + self.ready_state.set(IDBRequestReadyState::Done); + } + + pub fn set_result(&self, result: HandleValue) { + self.result.set(result.get()); + } + + pub fn set_error(&self, error: Error, can_gc: CanGc) { + // FIXME:(rasviitanen) Support all error types + if let Error::Version = error { + self.error.set(Some(&DOMException::new( + &self.global(), + DOMErrorName::VersionError, + can_gc, + ))); + } + } + + pub fn set_transaction(&self, transaction: &IDBTransaction) { + self.transaction.set(Some(transaction)); + } + + // https://www.w3.org/TR/IndexedDB-2/#asynchronously-execute-a-request + pub fn execute_async( + source: &IDBObjectStore, + operation: AsyncOperation, + request: Option>, + can_gc: CanGc, + ) -> Fallible> { + // Step 1: Let transaction be the transaction associated with source. + let transaction = source.transaction().expect("Store has no transaction"); + let global = transaction.global(); + + // Step 2: Assert: transaction is active. + if !transaction.is_active() { + return Err(Error::TransactionInactive); + } + + // Step 3: If request was not given, let request be a new request with source as source. + let request = request.unwrap_or_else(|| { + let new_request = IDBRequest::new(&global, can_gc); + new_request.set_source(Some(source)); + new_request.set_transaction(&transaction); + new_request + }); + + // Step 4: Add request to the end of transaction’s request list. + transaction.add_request(&request); + + // Step 5: Run the operation, and queue a returning task in parallel + // the result will be put into `receiver` + let transaction_mode = match transaction.get_mode() { + IDBTransactionMode::Readonly => IndexedDBTxnMode::Readonly, + IDBTransactionMode::Readwrite => IndexedDBTxnMode::Readwrite, + IDBTransactionMode::Versionchange => IndexedDBTxnMode::Versionchange, + }; + + let (sender, receiver) = + ipc::channel::>>(global.time_profiler_chan().clone()) + .unwrap(); + + let response_listener = RequestListener { + request: Trusted::new(&request), + }; + + let task_source = global + .task_manager() + .database_access_task_source() + .to_sendable(); + + ROUTER.add_typed_route( + receiver.to_ipc_receiver(), + Box::new(move |message| { + let response_listener = response_listener.clone(); + task_source.queue(task!(request_callback: move || { + response_listener.handle_async_request_finished( + message.expect("Could not unwrap message")); + })); + }), + ); + + transaction + .global() + .resource_threads() + .sender() + .send(IndexedDBThreadMsg::Async( + sender, + global.origin().immutable().clone(), + transaction.get_db_name().to_string(), + source.get_name().to_string(), + transaction.get_serial_number(), + transaction_mode, + operation, + )) + .unwrap(); + + // Step 6 + Ok(request) + } +} + +impl IDBRequestMethods for IDBRequest { + // https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-result + fn Result(&self, _cx: SafeJSContext, _val: js::rust::MutableHandle<'_, js::jsapi::Value>) { + self.result.get(); + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-error + fn GetError(&self) -> Option> { + self.error.get() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-source + fn GetSource(&self) -> Option> { + self.source.get() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-transaction + fn GetTransaction(&self) -> Option> { + self.transaction.get() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-readystate + fn ReadyState(&self) -> IDBRequestReadyState { + self.ready_state.get() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-onsuccess + event_handler!(success, GetOnsuccess, SetOnsuccess); + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbrequest-onerror + event_handler!(error, GetOnerror, SetOnerror); +} diff --git a/components/script/dom/idbtransaction.rs b/components/script/dom/idbtransaction.rs new file mode 100644 index 00000000000..46d72701234 --- /dev/null +++ b/components/script/dom/idbtransaction.rs @@ -0,0 +1,320 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use std::cell::Cell; +use std::collections::HashMap; + +use dom_struct::dom_struct; +use ipc_channel::ipc::IpcSender; +use net_traits::IpcSend; +use net_traits::indexeddb_thread::{IndexedDBThreadMsg, IndexedDBThreadReturnType, SyncOperation}; +use profile_traits::ipc; +use stylo_atoms::Atom; + +use crate::dom::bindings::cell::DomRefCell; +use crate::dom::bindings::codegen::Bindings::DOMStringListBinding::DOMStringListMethods; +use crate::dom::bindings::codegen::Bindings::IDBTransactionBinding::{ + IDBTransactionMethods, IDBTransactionMode, +}; +use crate::dom::bindings::error::{Error, Fallible}; +use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::refcounted::Trusted; +use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object}; +use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; +use crate::dom::bindings::str::DOMString; +use crate::dom::domexception::DOMException; +use crate::dom::domstringlist::DOMStringList; +use crate::dom::event::{Event, EventBubbles, EventCancelable}; +use crate::dom::eventtarget::EventTarget; +use crate::dom::globalscope::GlobalScope; +use crate::dom::idbdatabase::IDBDatabase; +use crate::dom::idbobjectstore::IDBObjectStore; +use crate::dom::idbrequest::IDBRequest; +use crate::script_runtime::CanGc; + +#[dom_struct] +pub struct IDBTransaction { + eventtarget: EventTarget, + object_store_names: Dom, + mode: IDBTransactionMode, + db: Dom, + error: MutNullableDom, + + store_handles: DomRefCell>>, + // https://www.w3.org/TR/IndexedDB-2/#transaction-request-list + requests: DomRefCell>>, + // https://www.w3.org/TR/IndexedDB-2/#transaction-active-flag + active: Cell, + // https://www.w3.org/TR/IndexedDB-2/#transaction-finish + finished: Cell, + // An unique identifier, used to commit and revert this transaction + // FIXME:(rasviitanen) Replace this with a channel + serial_number: u64, +} + +impl IDBTransaction { + fn new_inherited( + connection: &IDBDatabase, + mode: IDBTransactionMode, + scope: &DOMStringList, + serial_number: u64, + ) -> IDBTransaction { + IDBTransaction { + eventtarget: EventTarget::new_inherited(), + object_store_names: Dom::from_ref(scope), + mode, + db: Dom::from_ref(connection), + error: Default::default(), + + store_handles: Default::default(), + requests: Default::default(), + active: Cell::new(true), + finished: Cell::new(false), + serial_number, + } + } + + pub fn new( + global: &GlobalScope, + connection: &IDBDatabase, + mode: IDBTransactionMode, + scope: &DOMStringList, + can_gc: CanGc, + ) -> DomRoot { + let serial_number = IDBTransaction::register_new(global, connection.get_name()); + reflect_dom_object( + Box::new(IDBTransaction::new_inherited( + connection, + mode, + scope, + serial_number, + )), + global, + can_gc, + ) + } + + // Registers a new transaction in the idb thread, and gets an unique serial number in return. + // The serial number is used when placing requests against a transaction + // and allows us to commit/abort transactions running in our idb thread. + // FIXME:(rasviitanen) We could probably replace this with a channel instead, + // and queue requests directly to that channel. + fn register_new(global: &GlobalScope, db_name: DOMString) -> u64 { + let (sender, receiver) = ipc::channel(global.time_profiler_chan().clone()).unwrap(); + + global + .resource_threads() + .sender() + .send(IndexedDBThreadMsg::Sync(SyncOperation::RegisterNewTxn( + sender, + global.origin().immutable().clone(), + db_name.to_string(), + ))) + .unwrap(); + + receiver.recv().unwrap() + } + + // Runs the transaction and waits for it to finish + pub fn wait(&self) { + // Start the transaction + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + + let start_operation = SyncOperation::StartTransaction( + sender, + self.global().origin().immutable().clone(), + self.db.get_name().to_string(), + self.serial_number, + ); + + self.get_idb_thread() + .send(IndexedDBThreadMsg::Sync(start_operation)) + .unwrap(); + + // Wait for transaction to complete + if receiver.recv().is_err() { + warn!("IDBtransaction failed to run"); + }; + } + + pub fn set_active_flag(&self, status: bool) { + self.active.set(status) + } + + pub fn is_active(&self) -> bool { + self.active.get() + } + + pub fn get_mode(&self) -> IDBTransactionMode { + self.mode + } + + pub fn get_db_name(&self) -> DOMString { + self.db.get_name() + } + + pub fn get_serial_number(&self) -> u64 { + self.serial_number + } + + pub fn add_request(&self, request: &IDBRequest) { + self.requests.borrow_mut().push(Dom::from_ref(request)); + } + + pub fn upgrade_db_version(&self, version: u64) { + // Runs the previous request and waits for them to finish + self.wait(); + // Queue a request to upgrade the db version + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + let upgrade_version_operation = SyncOperation::UpgradeVersion( + sender, + self.global().origin().immutable().clone(), + self.db.get_name().to_string(), + self.serial_number, + version, + ); + self.get_idb_thread() + .send(IndexedDBThreadMsg::Sync(upgrade_version_operation)) + .unwrap(); + // Wait for the version to be updated + receiver.recv().unwrap(); + } + + fn dispatch_complete(&self) { + let global = self.global(); + let this = Trusted::new(self); + global.task_manager().database_access_task_source().queue( + task!(send_complete_notification: move || { + let this = this.root(); + let global = this.global(); + let event = Event::new( + &global, + Atom::from("complete"), + EventBubbles::DoesNotBubble, + EventCancelable::NotCancelable, + CanGc::note() + ); + event.fire(this.upcast(), CanGc::note()); + }), + ); + } + + fn get_idb_thread(&self) -> IpcSender { + self.global().resource_threads().sender() + } +} + +impl IDBTransactionMethods for IDBTransaction { + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-db + fn Db(&self) -> DomRoot { + DomRoot::from_ref(&*self.db) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-objectstore + fn ObjectStore(&self, name: DOMString) -> Fallible> { + // Step 1: Handle the case where transaction has finised + if self.finished.get() { + return Err(Error::InvalidState); + } + + // Step 2: Check that the object store exists + if !self.object_store_names.Contains(name.clone()) { + return Err(Error::NotFound); + } + + // Step 3: Each call to this method on the same + // IDBTransaction instance with the same name + // returns the same IDBObjectStore instance. + let mut store_handles = self.store_handles.borrow_mut(); + let store = store_handles.entry(name.to_string()).or_insert_with(|| { + let store = IDBObjectStore::new( + &self.global(), + self.db.get_name(), + name, + None, + CanGc::note(), + ); + store.set_transaction(self); + Dom::from_ref(&*store) + }); + + Ok(DomRoot::from_ref(&*store)) + } + + // https://www.w3.org/TR/IndexedDB-2/#commit-transaction + fn Commit(&self) -> Fallible<()> { + // Step 1 + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); + let start_operation = SyncOperation::Commit( + sender, + self.global().origin().immutable().clone(), + self.db.get_name().to_string(), + self.serial_number, + ); + + self.get_idb_thread() + .send(IndexedDBThreadMsg::Sync(start_operation)) + .unwrap(); + + let result = receiver.recv().unwrap(); + + // Step 2 + if let IndexedDBThreadReturnType::Commit(Err(_result)) = result { + // FIXME:(rasviitanen) also support Unknown error + return Err(Error::QuotaExceeded); + } + + // Step 3 + // FIXME:(rasviitanen) https://www.w3.org/TR/IndexedDB-2/#commit-a-transaction + + // Steps 3.1 and 3.3 + self.dispatch_complete(); + + Ok(()) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-abort + fn Abort(&self) -> Fallible<()> { + // FIXME:(rasviitanen) + // This only sets the flags, and does not abort the transaction + // see https://www.w3.org/TR/IndexedDB-2/#abort-a-transaction + if self.finished.get() { + return Err(Error::InvalidState); + } + + self.active.set(false); + + Ok(()) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-objectstorenames + fn ObjectStoreNames(&self) -> DomRoot { + self.object_store_names.as_rooted() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-mode + fn Mode(&self) -> IDBTransactionMode { + self.mode + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-mode + // fn Durability(&self) -> IDBTransactionDurability { + // // FIXME:(arihant2math) Durability is not implemented at all + // unimplemented!(); + // } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-error + fn GetError(&self) -> Option> { + self.error.get() + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-onabort + event_handler!(abort, GetOnabort, SetOnabort); + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-oncomplete + event_handler!(complete, GetOncomplete, SetOncomplete); + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbtransaction-onerror + event_handler!(error, GetOnerror, SetOnerror); +} diff --git a/components/script/dom/idbversionchangeevent.rs b/components/script/dom/idbversionchangeevent.rs new file mode 100644 index 00000000000..f338a31ca11 --- /dev/null +++ b/components/script/dom/idbversionchangeevent.rs @@ -0,0 +1,117 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use dom_struct::dom_struct; +use stylo_atoms::Atom; + +use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; +use crate::dom::bindings::codegen::Bindings::IDBVersionChangeEventBinding::{ + IDBVersionChangeEventInit, IDBVersionChangeEventMethods, +}; +use crate::dom::bindings::import::module::HandleObject; +use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object}; +use crate::dom::bindings::root::DomRoot; +use crate::dom::bindings::str::DOMString; +use crate::dom::event::{Event, EventBubbles, EventCancelable}; +use crate::dom::globalscope::GlobalScope; +use crate::dom::window::Window; +use crate::script_runtime::CanGc; + +#[dom_struct] +pub(crate) struct IDBVersionChangeEvent { + event: Event, + old_version: u64, + new_version: Option, +} + +impl IDBVersionChangeEvent { + pub fn new_inherited(old_version: u64, new_version: Option) -> IDBVersionChangeEvent { + IDBVersionChangeEvent { + event: Event::new_inherited(), + old_version, + new_version, + } + } + + pub fn new( + global: &GlobalScope, + type_: Atom, + bubbles: EventBubbles, + cancelable: EventCancelable, + old_version: u64, + new_version: Option, + can_gc: CanGc, + ) -> DomRoot { + Self::new_with_proto( + global, + type_, + bool::from(bubbles), + bool::from(cancelable), + old_version, + new_version, + can_gc, + ) + } + + fn new_with_proto( + global: &GlobalScope, + type_: Atom, + bubbles: bool, + cancelable: bool, + old_version: u64, + new_version: Option, + can_gc: CanGc, + ) -> DomRoot { + let ev = reflect_dom_object( + Box::new(IDBVersionChangeEvent::new_inherited( + old_version, + new_version, + )), + global, + can_gc, + ); + { + let event = ev.upcast::(); + event.init_event(type_, bubbles, cancelable); + } + ev + } +} + +impl IDBVersionChangeEventMethods for IDBVersionChangeEvent { + /// + fn Constructor( + window: &Window, + _proto: Option, + can_gc: CanGc, + type_: DOMString, + init: &IDBVersionChangeEventInit, + ) -> DomRoot { + Self::new_with_proto( + &window.global(), + Atom::from(type_), + init.parent.bubbles, + init.parent.cancelable, + init.oldVersion, + init.newVersion, + can_gc, + ) + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbversionchangeevent-oldversion + fn OldVersion(&self) -> u64 { + self.old_version + } + + // https://www.w3.org/TR/IndexedDB-2/#dom-idbversionchangeevent-newversion + fn GetNewVersion(&self) -> Option { + self.new_version + } + + // https://dom.spec.whatwg.org/#dom-event-istrusted + fn IsTrusted(&self) -> bool { + self.event.IsTrusted() + } +} diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index 9b7a6ce4162..663c399c9d0 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -419,6 +419,13 @@ pub(crate) mod htmltrackelement; pub(crate) mod htmlulistelement; pub(crate) mod htmlunknownelement; pub(crate) mod htmlvideoelement; +pub(crate) mod idbdatabase; +pub(crate) mod idbfactory; +pub(crate) mod idbobjectstore; +pub(crate) mod idbopendbrequest; +pub(crate) mod idbrequest; +pub(crate) mod idbtransaction; +pub(crate) mod idbversionchangeevent; pub(crate) mod iirfilternode; pub(crate) mod imagebitmap; pub(crate) mod imagedata; diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index dc3606fa1aa..f653cf580f9 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -136,6 +136,7 @@ use crate::dom::hashchangeevent::HashChangeEvent; use crate::dom::history::History; use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection}; use crate::dom::htmliframeelement::HTMLIFrameElement; +use crate::dom::idbfactory::IDBFactory; use crate::dom::location::Location; use crate::dom::medialist::MediaList; use crate::dom::mediaquerylist::{MediaQueryList, MediaQueryListMatchState}; @@ -248,6 +249,7 @@ pub(crate) struct Window { document: MutNullableDom, location: MutNullableDom, history: MutNullableDom, + indexeddb: MutNullableDom, custom_element_registry: MutNullableDom, performance: MutNullableDom, #[no_trace] @@ -1096,6 +1098,14 @@ impl WindowMethods for Window { self.history.or_init(|| History::new(self, CanGc::note())) } + // https://w3c.github.io/IndexedDB/#factory-interface + fn IndexedDB(&self) -> DomRoot { + self.indexeddb.or_init(|| { + let global_scope = self.upcast::(); + IDBFactory::new(global_scope, CanGc::note()) + }) + } + // https://html.spec.whatwg.org/multipage/#dom-window-customelements fn CustomElements(&self) -> DomRoot { self.custom_element_registry @@ -3093,6 +3103,7 @@ impl Window { navigator: Default::default(), location: Default::default(), history: Default::default(), + indexeddb: Default::default(), custom_element_registry: Default::default(), window_proxy: Default::default(), document: Default::default(), diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs index 7912e90cdcf..aae1ba9f595 100644 --- a/components/script/dom/workerglobalscope.rs +++ b/components/script/dom/workerglobalscope.rs @@ -53,6 +53,7 @@ use crate::dom::bindings::trace::RootedTraceableBox; use crate::dom::crypto::Crypto; use crate::dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope; use crate::dom::globalscope::GlobalScope; +use crate::dom::idbfactory::IDBFactory; use crate::dom::performance::Performance; use crate::dom::promise::Promise; use crate::dom::trustedscripturl::TrustedScriptURL; @@ -127,6 +128,7 @@ pub(crate) struct WorkerGlobalScope { #[no_trace] navigation_start: CrossProcessInstant, performance: MutNullableDom, + indexeddb: MutNullableDom, trusted_types: MutNullableDom, /// A [`TimerScheduler`] used to schedule timers for this [`WorkerGlobalScope`]. @@ -188,6 +190,7 @@ impl WorkerGlobalScope { _devtools_sender: init.from_devtools_sender, navigation_start: CrossProcessInstant::now(), performance: Default::default(), + indexeddb: Default::default(), timer_scheduler: RefCell::default(), insecure_requests_policy, trusted_types: Default::default(), @@ -274,6 +277,14 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope { DomRoot::from_ref(self) } + // https://w3c.github.io/IndexedDB/#factory-interface + fn IndexedDB(&self) -> DomRoot { + self.indexeddb.or_init(|| { + let global_scope = self.upcast::(); + IDBFactory::new(global_scope, CanGc::note()) + }) + } + // https://html.spec.whatwg.org/multipage/#dom-workerglobalscope-location fn Location(&self) -> DomRoot { self.location diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index c407f9cfc73..f26eb586b94 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -99,6 +99,7 @@ static SECURITY_CALLBACKS: JSSecurityCallbacks = JSSecurityCallbacks { pub(crate) enum ScriptThreadEventCategory { AttachLayout, ConstellationMsg, + DatabaseAccessEvent, DevtoolsMsg, DocumentEvent, FileRead, @@ -133,6 +134,9 @@ impl From for ProfilerCategory { match category { ScriptThreadEventCategory::AttachLayout => ProfilerCategory::ScriptAttachLayout, ScriptThreadEventCategory::ConstellationMsg => ProfilerCategory::ScriptConstellationMsg, + ScriptThreadEventCategory::DatabaseAccessEvent => { + ProfilerCategory::ScriptDatabaseAccessEvent + }, ScriptThreadEventCategory::DevtoolsMsg => ProfilerCategory::ScriptDevtoolsMsg, ScriptThreadEventCategory::DocumentEvent => ProfilerCategory::ScriptDocumentEvent, ScriptThreadEventCategory::EnterFullscreen => ProfilerCategory::ScriptEnterFullscreen, @@ -177,6 +181,9 @@ impl From for ScriptHangAnnotation { match category { ScriptThreadEventCategory::AttachLayout => ScriptHangAnnotation::AttachLayout, ScriptThreadEventCategory::ConstellationMsg => ScriptHangAnnotation::ConstellationMsg, + ScriptThreadEventCategory::DatabaseAccessEvent => { + ScriptHangAnnotation::DatabaseAccessEvent + }, ScriptThreadEventCategory::DevtoolsMsg => ScriptHangAnnotation::DevtoolsMsg, ScriptThreadEventCategory::DocumentEvent => ScriptHangAnnotation::DocumentEvent, ScriptThreadEventCategory::InputEvent => ScriptHangAnnotation::InputEvent, diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 5efaeb8dd44..f49e24ad5ed 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1739,6 +1739,12 @@ impl ScriptThread { profiler_chan, f ), + ScriptThreadEventCategory::DatabaseAccessEvent => time_profile!( + ProfilerCategory::ScriptDatabaseAccessEvent, + None, + profiler_chan, + f + ), ScriptThreadEventCategory::DevtoolsMsg => { time_profile!(ProfilerCategory::ScriptDevtoolsMsg, None, profiler_chan, f) }, diff --git a/components/script/task_manager.rs b/components/script/task_manager.rs index 34798bc7f6a..b81ec1e86f0 100644 --- a/components/script/task_manager.rs +++ b/components/script/task_manager.rs @@ -135,6 +135,7 @@ impl TaskManager { task_source_functions!(self, bitmap_task_source, Bitmap); task_source_functions!(self, canvas_blob_task_source, Canvas); task_source_functions!(self, clipboard_task_source, Clipboard); + task_source_functions!(self, database_access_task_source, DatabaseAccess); task_source_functions!(self, dom_manipulation_task_source, DOMManipulation); task_source_functions!(self, file_reading_task_source, FileReading); task_source_functions!(self, font_loading_task_source, FontLoading); diff --git a/components/script/task_source.rs b/components/script/task_source.rs index 031bd9db2de..d8e63c6ea07 100644 --- a/components/script/task_source.rs +++ b/components/script/task_source.rs @@ -26,6 +26,7 @@ pub(crate) enum TaskSourceName { Bitmap, Canvas, Clipboard, + DatabaseAccess, DOMManipulation, FileReading, /// @@ -53,6 +54,7 @@ impl From for ScriptThreadEventCategory { TaskSourceName::Bitmap => ScriptThreadEventCategory::ScriptEvent, TaskSourceName::Canvas => ScriptThreadEventCategory::ScriptEvent, TaskSourceName::Clipboard => ScriptThreadEventCategory::ScriptEvent, + TaskSourceName::DatabaseAccess => ScriptThreadEventCategory::ScriptEvent, TaskSourceName::DOMManipulation => ScriptThreadEventCategory::ScriptEvent, TaskSourceName::FileReading => ScriptThreadEventCategory::FileRead, TaskSourceName::FontLoading => ScriptThreadEventCategory::FontLoading, diff --git a/components/script_bindings/error.rs b/components/script_bindings/error.rs index a95d0b0b78c..7954b9ff3a6 100644 --- a/components/script_bindings/error.rs +++ b/components/script_bindings/error.rs @@ -45,6 +45,12 @@ pub enum Error { InvalidNodeType, /// DataCloneError DOMException DataClone(Option), + /// TransactionInactiveError DOMException + TransactionInactive, + /// ReadOnlyError DOMException + ReadOnly, + /// VersionError DOMException + Version, /// NoModificationAllowedError DOMException NoModificationAllowed, /// QuotaExceededError DOMException diff --git a/components/script_bindings/webidls/IDBDatabase.webidl b/components/script_bindings/webidls/IDBDatabase.webidl new file mode 100644 index 00000000000..e275d7aabe9 --- /dev/null +++ b/components/script_bindings/webidls/IDBDatabase.webidl @@ -0,0 +1,44 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/IndexedDB/#idbdatabase + * + */ + +// https://w3c.github.io/IndexedDB/#idbdatabase +[Pref="dom_indexeddb_enabled", Exposed=(Window,Worker)] +interface IDBDatabase : EventTarget { + readonly attribute DOMString name; + readonly attribute unsigned long long version; + readonly attribute DOMStringList objectStoreNames; + + [Throws, NewObject] IDBTransaction transaction((DOMString or sequence) storeNames, + optional IDBTransactionMode mode = "readonly", + optional IDBTransactionOptions options = {}); + undefined close(); + + [Throws, NewObject] IDBObjectStore createObjectStore( + DOMString name, + optional IDBObjectStoreParameters options = {} + ); + [Throws] undefined deleteObjectStore(DOMString name); + + // Event handlers: + attribute EventHandler onabort; + attribute EventHandler onclose; + attribute EventHandler onerror; + attribute EventHandler onversionchange; +}; + +enum IDBTransactionDurability { "default", "strict", "relaxed" }; + +dictionary IDBTransactionOptions { + IDBTransactionDurability durability = "default"; +}; + +dictionary IDBObjectStoreParameters { + (DOMString or sequence)? keyPath = null; + boolean autoIncrement = false; +}; diff --git a/components/script_bindings/webidls/IDBFactory.webidl b/components/script_bindings/webidls/IDBFactory.webidl new file mode 100644 index 00000000000..87ef2e2dd7e --- /dev/null +++ b/components/script_bindings/webidls/IDBFactory.webidl @@ -0,0 +1,31 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/IndexedDB/#idbfactory + * + */ + +// https://w3c.github.io/IndexedDB/#idbfactory +partial interface mixin WindowOrWorkerGlobalScope { + [Pref="dom_indexeddb_enabled", SameObject] readonly attribute IDBFactory indexedDB; +}; + +// https://w3c.github.io/IndexedDB/#idbfactory +[Pref="dom_indexeddb_enabled", Exposed=(Window,Worker)] +interface IDBFactory { + [NewObject, Throws] IDBOpenDBRequest open(DOMString name, + optional [EnforceRange] unsigned long long version); + [NewObject, Throws] IDBOpenDBRequest deleteDatabase(DOMString name); + + // Promise> databases(); + + // short cmp(any first, any second); +}; + +// https://w3c.github.io/IndexedDB/#dictdef-idbdatabaseinfo +dictionary IDBDatabaseInfo { + DOMString name; + unsigned long long version; +}; diff --git a/components/script_bindings/webidls/IDBObjectStore.webidl b/components/script_bindings/webidls/IDBObjectStore.webidl new file mode 100644 index 00000000000..54e6c908ad5 --- /dev/null +++ b/components/script_bindings/webidls/IDBObjectStore.webidl @@ -0,0 +1,48 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/IndexedDB/#idbobjectstore + * + */ + +// https://w3c.github.io/IndexedDB/#idbobjectstore +[Pref="dom_indexeddb_enabled", Exposed=(Window,Worker)] +interface IDBObjectStore { + attribute DOMString name; + // readonly attribute any keyPath; + // readonly attribute DOMStringList indexNames; + // [SameObject] readonly attribute IDBTransaction transaction; + readonly attribute boolean autoIncrement; + + [NewObject, Throws] IDBRequest put(any value, optional any key); + [NewObject, Throws] IDBRequest add(any value, optional any key); + [NewObject, Throws] IDBRequest delete(any query); + [NewObject, Throws] IDBRequest clear(); + [NewObject, Throws] IDBRequest get(any query); + // [NewObject] IDBRequest getKey(any query); + // [NewObject] IDBRequest getAll(optional any query, + // optional [EnforceRange] unsigned long count); + // [NewObject] IDBRequest getAllKeys(optional any query, + // optional [EnforceRange] unsigned long count); + [NewObject, Throws] IDBRequest count(optional any query); + + // [NewObject] IDBRequest openCursor(optional any query, + // optional IDBCursorDirection direction = "next"); + // [NewObject] IDBRequest openKeyCursor(optional any query, + // optional IDBCursorDirection direction = "next"); + + // IDBIndex index(DOMString name); + + // [NewObject] IDBIndex createIndex(DOMString name, + // (DOMString or sequence) keyPath, + // optional IDBIndexParameters options = {}); + // void deleteIndex(DOMString name); +}; + +// https://w3c.github.io/IndexedDB/#dictdef-idbindexparameters +dictionary IDBIndexParameters { + boolean unique = false; + boolean multiEntry = false; +}; diff --git a/components/script_bindings/webidls/IDBOpenDBRequest.webidl b/components/script_bindings/webidls/IDBOpenDBRequest.webidl new file mode 100644 index 00000000000..7f1b676c230 --- /dev/null +++ b/components/script_bindings/webidls/IDBOpenDBRequest.webidl @@ -0,0 +1,16 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/IndexedDB/#idbopendbrequest + * + */ + +// https://w3c.github.io/IndexedDB/#idbopendbrequest +[Pref="dom_indexeddb_enabled", Exposed=(Window,Worker)] +interface IDBOpenDBRequest : IDBRequest { + // Event handlers: + attribute EventHandler onblocked; + attribute EventHandler onupgradeneeded; +}; diff --git a/components/script_bindings/webidls/IDBRequest.webidl b/components/script_bindings/webidls/IDBRequest.webidl new file mode 100644 index 00000000000..e737314bac3 --- /dev/null +++ b/components/script_bindings/webidls/IDBRequest.webidl @@ -0,0 +1,29 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/IndexedDB/#idbrequest + * + */ + +// https://w3c.github.io/IndexedDB/#idbrequest +[Pref="dom_indexeddb_enabled", Exposed=(Window,Worker)] +interface IDBRequest : EventTarget { + readonly attribute any result; + readonly attribute DOMException? error; + // readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source; + readonly attribute IDBObjectStore? source; + readonly attribute IDBTransaction? transaction; + readonly attribute IDBRequestReadyState readyState; + + // Event handlers: + attribute EventHandler onsuccess; + attribute EventHandler onerror; +}; + +// https://w3c.github.io/IndexedDB/#enumdef-idbrequestreadystate +enum IDBRequestReadyState { + "pending", + "done" +}; diff --git a/components/script_bindings/webidls/IDBTransaction.webidl b/components/script_bindings/webidls/IDBTransaction.webidl new file mode 100644 index 00000000000..504cb48df2c --- /dev/null +++ b/components/script_bindings/webidls/IDBTransaction.webidl @@ -0,0 +1,33 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/IndexedDB/#idbtransaction + * + */ + +// https://w3c.github.io/IndexedDB/#idbtransaction +[Pref="dom_indexeddb_enabled", Exposed=(Window,Worker)] +interface IDBTransaction : EventTarget { + readonly attribute DOMStringList objectStoreNames; + readonly attribute IDBTransactionMode mode; + // readonly attribute IDBTransactionDurability durability; + [SameObject] readonly attribute IDBDatabase db; + readonly attribute DOMException? error; + + [Throws] IDBObjectStore objectStore(DOMString name); + [Throws] undefined commit(); + [Throws] undefined abort(); + + // Event handlers: + attribute EventHandler onabort; + attribute EventHandler oncomplete; + attribute EventHandler onerror; +}; + +enum IDBTransactionMode { + "readonly", + "readwrite", + "versionchange" +}; diff --git a/components/script_bindings/webidls/IDBVersionChangeEvent.webidl b/components/script_bindings/webidls/IDBVersionChangeEvent.webidl new file mode 100644 index 00000000000..f8a6623d5ee --- /dev/null +++ b/components/script_bindings/webidls/IDBVersionChangeEvent.webidl @@ -0,0 +1,25 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://w3c.github.io/IndexedDB/#idbversionchangeevent + * + */ + +// FIXME:(arihant2math) Expose to Worker too + +// https://w3c.github.io/IndexedDB/#idbversionchangeevent +[Pref="dom_indexeddb_enabled", Exposed=(Window)] +interface IDBVersionChangeEvent : Event { + constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict = {}); + + readonly attribute unsigned long long oldVersion; + readonly attribute unsigned long long? newVersion; +}; + +// https://w3c.github.io/IndexedDB/#idbversionchangeevent +dictionary IDBVersionChangeEventInit : EventInit { + unsigned long long oldVersion = 0; + unsigned long long? newVersion = null; +}; diff --git a/components/shared/background_hang_monitor/lib.rs b/components/shared/background_hang_monitor/lib.rs index 223ace39c4b..1eb70d0e92e 100644 --- a/components/shared/background_hang_monitor/lib.rs +++ b/components/shared/background_hang_monitor/lib.rs @@ -18,6 +18,7 @@ use serde::{Deserialize, Serialize}; pub enum ScriptHangAnnotation { AttachLayout, ConstellationMsg, + DatabaseAccessEvent, DevtoolsMsg, DocumentEvent, FileRead, diff --git a/components/shared/net/indexeddb_thread.rs b/components/shared/net/indexeddb_thread.rs new file mode 100644 index 00000000000..4c5243c237b --- /dev/null +++ b/components/shared/net/indexeddb_thread.rs @@ -0,0 +1,173 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use ipc_channel::ipc::IpcSender; +use serde::{Deserialize, Serialize}; +use servo_url::origin::ImmutableOrigin; + +#[derive(Debug, Deserialize, Serialize)] +pub enum IndexedDBThreadReturnType { + Open(Option), + NextSerialNumber(u64), + StartTransaction(Result<(), ()>), + Commit(Result<(), ()>), + Version(u64), + CreateObjectStore(Option), + UpgradeVersion(Result), + KVResult(Option>), + Exit, +} + +// https://www.w3.org/TR/IndexedDB-2/#enumdef-idbtransactionmode +#[derive(Debug, Deserialize, Serialize)] +pub enum IndexedDBTxnMode { + Readonly, + Readwrite, + Versionchange, +} + +// https://www.w3.org/TR/IndexedDB-2/#key-type +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum IndexedDBKeyType { + Number(Vec), + String(Vec), + Binary(Vec), + Date(Vec), + // FIXME:(arihant2math) implment Array(), +} + +// https://www.w3.org/TR/IndexedDB-2/#key-range +#[derive(Clone, Debug, Deserialize, Serialize)] +#[allow(unused)] +pub enum IndexedDBKeyRange {} + +// Operations that are not executed instantly, but rather added to a +// queue that is eventually run. +#[derive(Debug, Deserialize, Serialize)] +pub enum AsyncOperation { + /// Gets the value associated with the given key in the associated idb data + GetItem( + IndexedDBKeyType, // Key + ), + + /// Sets the value of the given key in the associated idb data + PutItem( + IndexedDBKeyType, // Key + Vec, // Value + bool, // Should overwrite + ), + + /// Removes the key/value pair for the given key in the associated idb data + RemoveItem( + IndexedDBKeyType, // Key + ), + + Count( + IndexedDBKeyType, // Key + ), +} + +#[derive(Debug, Deserialize, Serialize)] +pub enum SyncOperation { + // Upgrades the version of the database + UpgradeVersion( + IpcSender, + ImmutableOrigin, + String, // Database + u64, // Serial number for the transaction + u64, // Version to upgrade to + ), + // Checks if an object store has a key generator, used in e.g. Put + HasKeyGenerator( + IpcSender, + ImmutableOrigin, + String, // Database + String, // Store + ), + + // Commits changes of a transaction to the database + Commit( + IpcSender, + ImmutableOrigin, + String, // Database + u64, // Transaction serial number + ), + + // Creates a new store for the database + CreateObjectStore( + IpcSender>, + ImmutableOrigin, + String, // Database + String, // Store + bool, + ), + + DeleteObjectStore( + IpcSender>, + ImmutableOrigin, + String, // Database + String, // Store + ), + + CloseDatabase( + IpcSender>, + ImmutableOrigin, + String, // Database + ), + + OpenDatabase( + IpcSender, // Returns the version + ImmutableOrigin, + String, // Database + Option, // Eventual version + ), + + // Deletes the database + DeleteDatabase( + IpcSender>, + ImmutableOrigin, + String, // Database + ), + + // Returns an unique identifier that is used to be able to + // commit/abort transactions. + RegisterNewTxn( + IpcSender, + ImmutableOrigin, + String, // Database + ), + + // Starts executing the requests of a transaction + // https://www.w3.org/TR/IndexedDB-2/#transaction-start + StartTransaction( + IpcSender>, + ImmutableOrigin, + String, // Database + u64, // The serial number of the mutating transaction + ), + + // Returns the version of the database + Version( + IpcSender, + ImmutableOrigin, + String, // Database + ), + + /// Send a reply when done cleaning up thread resources and then shut it down + Exit(IpcSender), +} + +#[derive(Debug, Deserialize, Serialize)] +pub enum IndexedDBThreadMsg { + Sync(SyncOperation), + Async( + IpcSender>>, // Sender to send the result of the async operation + ImmutableOrigin, + String, // Database + String, // ObjectStore + u64, // Serial number of the transaction that requests this operation + IndexedDBTxnMode, + AsyncOperation, + ), +} diff --git a/components/shared/net/lib.rs b/components/shared/net/lib.rs index 0a490fa3bcf..a4bd72f419c 100644 --- a/components/shared/net/lib.rs +++ b/components/shared/net/lib.rs @@ -32,6 +32,7 @@ use servo_url::{ImmutableOrigin, ServoUrl}; use crate::filemanager_thread::FileManagerThreadMsg; use crate::http_status::HttpStatus; +use crate::indexeddb_thread::IndexedDBThreadMsg; use crate::request::{Request, RequestBuilder}; use crate::response::{HttpsState, Response, ResponseInit}; use crate::storage_thread::StorageThreadMsg; @@ -40,6 +41,7 @@ pub mod blob_url_store; pub mod filemanager_thread; pub mod http_status; pub mod image_cache; +pub mod indexeddb_thread; pub mod mime_classifier; pub mod policy_container; pub mod pub_domains; @@ -414,13 +416,19 @@ where pub struct ResourceThreads { pub core_thread: CoreResourceThread, storage_thread: IpcSender, + idb_thread: IpcSender, } impl ResourceThreads { - pub fn new(c: CoreResourceThread, s: IpcSender) -> ResourceThreads { + pub fn new( + c: CoreResourceThread, + s: IpcSender, + i: IpcSender, + ) -> ResourceThreads { ResourceThreads { core_thread: c, storage_thread: s, + idb_thread: i, } } @@ -439,6 +447,16 @@ impl IpcSend for ResourceThreads { } } +impl IpcSend for ResourceThreads { + fn send(&self, msg: IndexedDBThreadMsg) -> IpcSendResult { + self.idb_thread.send(msg) + } + + fn sender(&self) -> IpcSender { + self.idb_thread.clone() + } +} + impl IpcSend for ResourceThreads { fn send(&self, msg: StorageThreadMsg) -> IpcSendResult { self.storage_thread.send(msg) diff --git a/components/shared/profile/time.rs b/components/shared/profile/time.rs index 877d1aaee15..bbc6515b4f8 100644 --- a/components/shared/profile/time.rs +++ b/components/shared/profile/time.rs @@ -111,6 +111,8 @@ pub enum ProfilerCategory { ScriptPortMessage = 0x7e, ScriptWebGPUMsg = 0x7f, + ScriptDatabaseAccessEvent = 0x80, + /// Web performance metrics. TimeToFirstPaint = 0x90, TimeToFirstContentfulPaint = 0x91, @@ -128,6 +130,7 @@ impl ProfilerCategory { ProfilerCategory::ImageSaving => "ImageSaving", ProfilerCategory::ScriptAttachLayout => "ScriptAttachLayout", ProfilerCategory::ScriptConstellationMsg => "ScriptConstellationMsg", + ProfilerCategory::ScriptDatabaseAccessEvent => "ScriptDatabaseAccessEvent", ProfilerCategory::ScriptDevtoolsMsg => "ScriptDevtoolsMsg", ProfilerCategory::ScriptDocumentEvent => "ScriptDocumentEvent", ProfilerCategory::ScriptEvaluate => "ScriptEvaluate", diff --git a/python/servo/platform/build_target.py b/python/servo/platform/build_target.py index d0ecb4b4361..4f026432b07 100644 --- a/python/servo/platform/build_target.py +++ b/python/servo/platform/build_target.py @@ -380,6 +380,7 @@ class OpenHarmonyTarget(CrossBuildTarget): env["HOST_CXXFLAGS"] = "" ohos_cflags = [ "-D__MUSL__", + "-DMDB_USE_ROBUST=0", f" --target={clang_target_triple}", f" --sysroot={ohos_sysroot_posix}", "-Wno-error=unused-command-line-argument", diff --git a/tests/wpt/include.ini b/tests/wpt/include.ini index 04ad8c201cb..0ea801be060 100644 --- a/tests/wpt/include.ini +++ b/tests/wpt/include.ini @@ -178,6 +178,8 @@ skip: true skip: true [import-maps] skip: false +[indexeddb] + skip: false [intersection-observer] skip: false [js] diff --git a/tests/wpt/meta/indexeddb/__dir__.ini b/tests/wpt/meta/indexeddb/__dir__.ini new file mode 100644 index 00000000000..497a2cd6381 --- /dev/null +++ b/tests/wpt/meta/indexeddb/__dir__.ini @@ -0,0 +1 @@ +prefs: ["dom_indexeddb_enabled:true"] \ No newline at end of file diff --git a/tests/wpt/meta/indexeddb/abort-in-initial-upgradeneeded.any.js.ini b/tests/wpt/meta/indexeddb/abort-in-initial-upgradeneeded.any.js.ini new file mode 100644 index 00000000000..e70c95f73f3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/abort-in-initial-upgradeneeded.any.js.ini @@ -0,0 +1,15 @@ +[abort-in-initial-upgradeneeded.any.html] + [An abort() in the initial onupgradeneeded sets version back to 0] + expected: FAIL + + +[abort-in-initial-upgradeneeded.any.sharedworker.html] + expected: ERROR + +[abort-in-initial-upgradeneeded.any.worker.html] + [An abort() in the initial onupgradeneeded sets version back to 0] + expected: FAIL + + +[abort-in-initial-upgradeneeded.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/back-forward-cache-open-connection.window.js.ini b/tests/wpt/meta/indexeddb/back-forward-cache-open-connection.window.js.ini new file mode 100644 index 00000000000..b136de0f3ce --- /dev/null +++ b/tests/wpt/meta/indexeddb/back-forward-cache-open-connection.window.js.ini @@ -0,0 +1,3 @@ +[back-forward-cache-open-connection.window.html] + [Testing BFCache support for page with open IndexedDB connection, and eviction behavior when receiving versionchange event.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/back-forward-cache-open-transaction.window.js.ini b/tests/wpt/meta/indexeddb/back-forward-cache-open-transaction.window.js.ini new file mode 100644 index 00000000000..3f94a404757 --- /dev/null +++ b/tests/wpt/meta/indexeddb/back-forward-cache-open-transaction.window.js.ini @@ -0,0 +1,4 @@ +[back-forward-cache-open-transaction.window.html] + expected: TIMEOUT + [BFCache support test for page with open IndexedDB transaction] + expected: TIMEOUT diff --git a/tests/wpt/meta/indexeddb/bindings-inject-keys-bypass.any.js.ini b/tests/wpt/meta/indexeddb/bindings-inject-keys-bypass.any.js.ini new file mode 100644 index 00000000000..ade12ad7149 --- /dev/null +++ b/tests/wpt/meta/indexeddb/bindings-inject-keys-bypass.any.js.ini @@ -0,0 +1,14 @@ +[bindings-inject-keys-bypass.any.serviceworker.html] + expected: ERROR + +[bindings-inject-keys-bypass.any.sharedworker.html] + expected: ERROR + +[bindings-inject-keys-bypass.any.worker.html] + [Returning keys to script should bypass prototype setters] + expected: FAIL + + +[bindings-inject-keys-bypass.any.html] + [Returning keys to script should bypass prototype setters] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/bindings-inject-values-bypass.any.js.ini b/tests/wpt/meta/indexeddb/bindings-inject-values-bypass.any.js.ini new file mode 100644 index 00000000000..10cb0957b66 --- /dev/null +++ b/tests/wpt/meta/indexeddb/bindings-inject-values-bypass.any.js.ini @@ -0,0 +1,21 @@ +[bindings-inject-values-bypass.any.html] + [Returning values to script should bypass prototype chain] + expected: FAIL + + [Returning values to script should bypass prototype setters] + expected: FAIL + + +[bindings-inject-values-bypass.any.worker.html] + [Returning values to script should bypass prototype chain] + expected: FAIL + + [Returning values to script should bypass prototype setters] + expected: FAIL + + +[bindings-inject-values-bypass.any.serviceworker.html] + expected: ERROR + +[bindings-inject-values-bypass.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/blob-composite-blob-reads.any.js.ini b/tests/wpt/meta/indexeddb/blob-composite-blob-reads.any.js.ini new file mode 100644 index 00000000000..c64b6988152 --- /dev/null +++ b/tests/wpt/meta/indexeddb/blob-composite-blob-reads.any.js.ini @@ -0,0 +1,14 @@ +[blob-composite-blob-reads.any.html] + [Composite Blob Handling: Many blobs: fetch-blob-url] + expected: FAIL + + [Composite Blob Handling: Many blobs: direct] + expected: FAIL + + +[blob-composite-blob-reads.any.worker.html] + [Composite Blob Handling: Many blobs: fetch-blob-url] + expected: FAIL + + [Composite Blob Handling: Many blobs: direct] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/blob-contenttype.any.js.ini b/tests/wpt/meta/indexeddb/blob-contenttype.any.js.ini new file mode 100644 index 00000000000..c78e6e14af8 --- /dev/null +++ b/tests/wpt/meta/indexeddb/blob-contenttype.any.js.ini @@ -0,0 +1,9 @@ +[blob-contenttype.any.html] + [Ensure that content type round trips when reading blob data] + expected: FAIL + + +[blob-contenttype.any.worker.html] + [Ensure that content type round trips when reading blob data] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/blob-delete-objectstore-db.any.js.ini b/tests/wpt/meta/indexeddb/blob-delete-objectstore-db.any.js.ini new file mode 100644 index 00000000000..e52a639d953 --- /dev/null +++ b/tests/wpt/meta/indexeddb/blob-delete-objectstore-db.any.js.ini @@ -0,0 +1,9 @@ +[blob-delete-objectstore-db.any.worker.html] + [Deleting an object store and a database containing blobs doesn't crash.] + expected: FAIL + + +[blob-delete-objectstore-db.any.html] + [Deleting an object store and a database containing blobs doesn't crash.] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/blob-valid-after-deletion.any.js.ini b/tests/wpt/meta/indexeddb/blob-valid-after-deletion.any.js.ini new file mode 100644 index 00000000000..a576d445bac --- /dev/null +++ b/tests/wpt/meta/indexeddb/blob-valid-after-deletion.any.js.ini @@ -0,0 +1,9 @@ +[blob-valid-after-deletion.any.worker.html] + [Blobs stay alive after their records are deleted.] + expected: FAIL + + +[blob-valid-after-deletion.any.html] + [Blobs stay alive after their records are deleted.] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/blob-valid-before-commit.any.js.ini b/tests/wpt/meta/indexeddb/blob-valid-before-commit.any.js.ini new file mode 100644 index 00000000000..51b1dcbdcbe --- /dev/null +++ b/tests/wpt/meta/indexeddb/blob-valid-before-commit.any.js.ini @@ -0,0 +1,9 @@ +[blob-valid-before-commit.any.worker.html] + [Blobs can be read back before their records are committed.] + expected: FAIL + + +[blob-valid-before-commit.any.html] + [Blobs can be read back before their records are committed.] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/clone-before-keypath-eval.any.js.ini b/tests/wpt/meta/indexeddb/clone-before-keypath-eval.any.js.ini new file mode 100644 index 00000000000..92bd3deccaa --- /dev/null +++ b/tests/wpt/meta/indexeddb/clone-before-keypath-eval.any.js.ini @@ -0,0 +1,39 @@ +[clone-before-keypath-eval.any.sharedworker.html] + expected: ERROR + +[clone-before-keypath-eval.any.html] + [Key generator and key path validity check operates on a clone] + expected: FAIL + + [Failing key path validity check operates on a clone] + expected: FAIL + + [Index key path evaluations operate on a clone] + expected: FAIL + + [Store and index key path evaluations operate on the same clone] + expected: FAIL + + [Cursor update checks and keypath evaluations operate on a clone] + expected: FAIL + + +[clone-before-keypath-eval.any.worker.html] + [Key generator and key path validity check operates on a clone] + expected: FAIL + + [Failing key path validity check operates on a clone] + expected: FAIL + + [Index key path evaluations operate on a clone] + expected: FAIL + + [Store and index key path evaluations operate on the same clone] + expected: FAIL + + [Cursor update checks and keypath evaluations operate on a clone] + expected: FAIL + + +[clone-before-keypath-eval.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/close-in-upgradeneeded.any.js.ini b/tests/wpt/meta/indexeddb/close-in-upgradeneeded.any.js.ini new file mode 100644 index 00000000000..4bbf422f5e2 --- /dev/null +++ b/tests/wpt/meta/indexeddb/close-in-upgradeneeded.any.js.ini @@ -0,0 +1,13 @@ +[close-in-upgradeneeded.any.sharedworker.html] + expected: ERROR + +[close-in-upgradeneeded.any.html] + [When db.close() is called in onupgradeneeded, the db is cleaned up on refresh] + expected: FAIL + + +[close-in-upgradeneeded.any.worker.html] + expected: CRASH + +[close-in-upgradeneeded.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/cursor-overloads.any.js.ini b/tests/wpt/meta/indexeddb/cursor-overloads.any.js.ini new file mode 100644 index 00000000000..d243f218ad0 --- /dev/null +++ b/tests/wpt/meta/indexeddb/cursor-overloads.any.js.ini @@ -0,0 +1,13 @@ +[cursor-overloads.any.sharedworker.html] + expected: ERROR + +[cursor-overloads.any.html] + [Validate the overloads of IDBObjectStore.openCursor(), IDBIndex.openCursor() and IDBIndex.openKeyCursor()] + expected: FAIL + + +[cursor-overloads.any.worker.html] + expected: CRASH + +[cursor-overloads.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/database-names-by-origin.html.ini b/tests/wpt/meta/indexeddb/database-names-by-origin.html.ini new file mode 100644 index 00000000000..e0b401f6896 --- /dev/null +++ b/tests/wpt/meta/indexeddb/database-names-by-origin.html.ini @@ -0,0 +1,13 @@ +[database-names-by-origin.html] + expected: TIMEOUT + [open database names don't leak to cross-origin iframe] + expected: TIMEOUT + + [open database names don't leak to cross-origin window] + expected: NOTRUN + + [closed database names don't leak to cross-origin iframe] + expected: NOTRUN + + [closed database names don't leak to cross-origin window] + expected: NOTRUN diff --git a/tests/wpt/meta/indexeddb/delete-range.any.js.ini b/tests/wpt/meta/indexeddb/delete-range.any.js.ini new file mode 100644 index 00000000000..c9b31b65e5a --- /dev/null +++ b/tests/wpt/meta/indexeddb/delete-range.any.js.ini @@ -0,0 +1,26 @@ +[delete-range.any.worker.html] + [Delete range] + expected: FAIL + + [Delete range 1] + expected: FAIL + + [Delete range 2] + expected: FAIL + + [Delete range 3] + expected: FAIL + + +[delete-range.any.html] + [Delete range] + expected: FAIL + + [Delete range 1] + expected: FAIL + + [Delete range 2] + expected: FAIL + + [Delete range 3] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/delete-request-queue.any.js.ini b/tests/wpt/meta/indexeddb/delete-request-queue.any.js.ini new file mode 100644 index 00000000000..a1781c9fe7b --- /dev/null +++ b/tests/wpt/meta/indexeddb/delete-request-queue.any.js.ini @@ -0,0 +1,15 @@ +[delete-request-queue.any.worker.html] + [Deletes are processed as a FIFO queue] + expected: FAIL + + +[delete-request-queue.any.html] + [Deletes are processed as a FIFO queue] + expected: FAIL + + +[delete-request-queue.any.serviceworker.html] + expected: ERROR + +[delete-request-queue.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/error-attributes.any.js.ini b/tests/wpt/meta/indexeddb/error-attributes.any.js.ini new file mode 100644 index 00000000000..037ab684424 --- /dev/null +++ b/tests/wpt/meta/indexeddb/error-attributes.any.js.ini @@ -0,0 +1,14 @@ +[error-attributes.any.worker.html] + [IDBRequest and IDBTransaction error properties should be DOMExceptions] + expected: FAIL + + +[error-attributes.any.sharedworker.html] + expected: ERROR + +[error-attributes.any.serviceworker.html] + expected: ERROR + +[error-attributes.any.html] + [IDBRequest and IDBTransaction error properties should be DOMExceptions] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/event-dispatch-active-flag.any.js.ini b/tests/wpt/meta/indexeddb/event-dispatch-active-flag.any.js.ini new file mode 100644 index 00000000000..facf154509a --- /dev/null +++ b/tests/wpt/meta/indexeddb/event-dispatch-active-flag.any.js.ini @@ -0,0 +1,33 @@ +[event-dispatch-active-flag.any.html] + [Active during success handlers] + expected: FAIL + + [Active during success listeners] + expected: FAIL + + [Active during error handlers] + expected: FAIL + + [Active during error listeners] + expected: FAIL + + +[event-dispatch-active-flag.any.serviceworker.html] + expected: ERROR + +[event-dispatch-active-flag.any.worker.html] + [Active during success handlers] + expected: FAIL + + [Active during success listeners] + expected: FAIL + + [Active during error handlers] + expected: FAIL + + [Active during error listeners] + expected: FAIL + + +[event-dispatch-active-flag.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/fire-error-event-exception.any.js.ini b/tests/wpt/meta/indexeddb/fire-error-event-exception.any.js.ini new file mode 100644 index 00000000000..3a8fec89aa6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/fire-error-event-exception.any.js.ini @@ -0,0 +1,111 @@ +[fire-error-event-exception.any.sharedworker.html] + expected: ERROR + +[fire-error-event-exception.any.worker.html] + [Exception in error event handler on request] + expected: FAIL + + [Exception in error event handler on request, with preventDefault] + expected: FAIL + + [Exception in error event listener on request] + expected: FAIL + + [Exception in error event listener ("handleEvent" lookup) on request] + expected: FAIL + + [Exception in error event listener (non-callable "handleEvent") on request] + expected: FAIL + + [Exception in second error event listener on request] + expected: FAIL + + [Exception in first error event listener on request, transaction active in second] + expected: FAIL + + [Exception in error event handler on transaction] + expected: FAIL + + [Exception in error event handler on transaction, with preventDefault] + expected: FAIL + + [Exception in error event listener on transaction] + expected: FAIL + + [Exception in second error event listener on transaction] + expected: FAIL + + [Exception in first error event listener on transaction, transaction active in second] + expected: FAIL + + [Exception in error event handler on connection] + expected: FAIL + + [Exception in error event handler on connection, with preventDefault] + expected: FAIL + + [Exception in error event listener on connection] + expected: FAIL + + [Exception in second error event listener on connection] + expected: FAIL + + [Exception in first error event listener on connection, transaction active in second] + expected: FAIL + + +[fire-error-event-exception.any.html] + [Exception in error event handler on request] + expected: FAIL + + [Exception in error event handler on request, with preventDefault] + expected: FAIL + + [Exception in error event listener on request] + expected: FAIL + + [Exception in error event listener ("handleEvent" lookup) on request] + expected: FAIL + + [Exception in error event listener (non-callable "handleEvent") on request] + expected: FAIL + + [Exception in second error event listener on request] + expected: FAIL + + [Exception in first error event listener on request, transaction active in second] + expected: FAIL + + [Exception in error event handler on transaction] + expected: FAIL + + [Exception in error event handler on transaction, with preventDefault] + expected: FAIL + + [Exception in error event listener on transaction] + expected: FAIL + + [Exception in second error event listener on transaction] + expected: FAIL + + [Exception in first error event listener on transaction, transaction active in second] + expected: FAIL + + [Exception in error event handler on connection] + expected: FAIL + + [Exception in error event handler on connection, with preventDefault] + expected: FAIL + + [Exception in error event listener on connection] + expected: FAIL + + [Exception in second error event listener on connection] + expected: FAIL + + [Exception in first error event listener on connection, transaction active in second] + expected: FAIL + + +[fire-error-event-exception.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/fire-success-event-exception.any.js.ini b/tests/wpt/meta/indexeddb/fire-success-event-exception.any.js.ini new file mode 100644 index 00000000000..93189f00405 --- /dev/null +++ b/tests/wpt/meta/indexeddb/fire-success-event-exception.any.js.ini @@ -0,0 +1,45 @@ +[fire-success-event-exception.any.sharedworker.html] + expected: ERROR + +[fire-success-event-exception.any.worker.html] + [Exception in success event handler on request] + expected: FAIL + + [Exception in success event listener on request] + expected: FAIL + + [Exception in success event listener ("handleEvent" lookup) on request] + expected: FAIL + + [Exception in success event listener (non-callable "handleEvent") on request] + expected: FAIL + + [Exception in second success event listener on request] + expected: FAIL + + [Exception in first success event listener, tx active in second] + expected: FAIL + + +[fire-success-event-exception.any.html] + [Exception in success event handler on request] + expected: FAIL + + [Exception in success event listener on request] + expected: FAIL + + [Exception in success event listener ("handleEvent" lookup) on request] + expected: FAIL + + [Exception in success event listener (non-callable "handleEvent") on request] + expected: FAIL + + [Exception in second success event listener on request] + expected: FAIL + + [Exception in first success event listener, tx active in second] + expected: FAIL + + +[fire-success-event-exception.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/fire-upgradeneeded-event-exception.any.js.ini b/tests/wpt/meta/indexeddb/fire-upgradeneeded-event-exception.any.js.ini new file mode 100644 index 00000000000..039962108ad --- /dev/null +++ b/tests/wpt/meta/indexeddb/fire-upgradeneeded-event-exception.any.js.ini @@ -0,0 +1,44 @@ +[fire-upgradeneeded-event-exception.any.html] + [Exception in upgradeneeded handler] + expected: FAIL + + [Exception in upgradeneeded listener] + expected: FAIL + + [Exception in upgradeneeded "handleEvent" lookup] + expected: FAIL + + [Exception in upgradeneeded due to non-callable "handleEvent"] + expected: FAIL + + [Exception in second upgradeneeded listener] + expected: FAIL + + [Exception in first upgradeneeded listener, tx active in second] + expected: FAIL + + +[fire-upgradeneeded-event-exception.any.sharedworker.html] + expected: ERROR + +[fire-upgradeneeded-event-exception.any.serviceworker.html] + expected: ERROR + +[fire-upgradeneeded-event-exception.any.worker.html] + [Exception in upgradeneeded handler] + expected: FAIL + + [Exception in upgradeneeded listener] + expected: FAIL + + [Exception in upgradeneeded "handleEvent" lookup] + expected: FAIL + + [Exception in upgradeneeded due to non-callable "handleEvent"] + expected: FAIL + + [Exception in second upgradeneeded listener] + expected: FAIL + + [Exception in first upgradeneeded listener, tx active in second] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/get-databases.any.js.ini b/tests/wpt/meta/indexeddb/get-databases.any.js.ini new file mode 100644 index 00000000000..09d923b1ccc --- /dev/null +++ b/tests/wpt/meta/indexeddb/get-databases.any.js.ini @@ -0,0 +1,32 @@ +[get-databases.any.html] + [Ensure that databases() returns a promise.] + expected: FAIL + + [Enumerate one database.] + expected: FAIL + + [Enumerate multiple databases.] + expected: FAIL + + [Make sure an empty list is returned for the case of no databases.] + expected: FAIL + + [Ensure that databases() doesn't pick up changes that haven't commited.] + expected: FAIL + + +[get-databases.any.worker.html] + [Ensure that databases() returns a promise.] + expected: FAIL + + [Enumerate one database.] + expected: FAIL + + [Enumerate multiple databases.] + expected: FAIL + + [Make sure an empty list is returned for the case of no databases.] + expected: FAIL + + [Ensure that databases() doesn't pick up changes that haven't commited.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/globalscope-indexedDB-SameObject.any.js.ini b/tests/wpt/meta/indexeddb/globalscope-indexedDB-SameObject.any.js.ini new file mode 100644 index 00000000000..0e08411e7ad --- /dev/null +++ b/tests/wpt/meta/indexeddb/globalscope-indexedDB-SameObject.any.js.ini @@ -0,0 +1,9 @@ +[globalscope-indexedDB-SameObject.any.sharedworker.html] + expected: ERROR + +[globalscope-indexedDB-SameObject.any.html] + +[globalscope-indexedDB-SameObject.any.worker.html] + +[globalscope-indexedDB-SameObject.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/historical.any.js.ini b/tests/wpt/meta/indexeddb/historical.any.js.ini new file mode 100644 index 00000000000..1349c976bee --- /dev/null +++ b/tests/wpt/meta/indexeddb/historical.any.js.ini @@ -0,0 +1,36 @@ +[historical.any.worker.html] + ["version" should not be supported on IDBVersionChangeEvent.] + expected: FAIL + + ["NEXT" should not be supported on IDBCursor.] + expected: FAIL + + ["NEXT_NO_DUPLICATE" should not be supported on IDBCursor.] + expected: FAIL + + ["PREV" should not be supported on IDBCursor.] + expected: FAIL + + ["PREV_NO_DUPLICATE" should not be supported on IDBCursor.] + expected: FAIL + + +[historical.any.sharedworker.html] + expected: ERROR + +[historical.any.html] + ["NEXT" should not be supported on IDBCursor.] + expected: FAIL + + ["NEXT_NO_DUPLICATE" should not be supported on IDBCursor.] + expected: FAIL + + ["PREV" should not be supported on IDBCursor.] + expected: FAIL + + ["PREV_NO_DUPLICATE" should not be supported on IDBCursor.] + expected: FAIL + + +[historical.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idb-binary-key-detached.htm.ini b/tests/wpt/meta/indexeddb/idb-binary-key-detached.htm.ini new file mode 100644 index 00000000000..5285613c42d --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb-binary-key-detached.htm.ini @@ -0,0 +1,12 @@ +[idb-binary-key-detached.htm] + [Detached TypedArray] + expected: FAIL + + [Detached ArrayBuffer] + expected: FAIL + + [Detached ArrayBuffers must throw DataError when used as a key] + expected: FAIL + + [Detached TypedArrays must throw DataError when used as a key] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idb-binary-key-roundtrip.any.js.ini b/tests/wpt/meta/indexeddb/idb-binary-key-roundtrip.any.js.ini new file mode 100644 index 00000000000..c154ef51245 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb-binary-key-roundtrip.any.js.ini @@ -0,0 +1,104 @@ +[idb-binary-key-roundtrip.any.worker.html] + [Binary keys can be supplied using the view type Uint8Array] + expected: FAIL + + [Binary keys can be supplied using the view type Uint8ClampedArray] + expected: FAIL + + [Binary keys can be supplied using the view type Int8Array] + expected: FAIL + + [Binary keys can be supplied using the view type Uint16Array] + expected: FAIL + + [Binary keys can be supplied using the view type Int16Array] + expected: FAIL + + [Binary keys can be supplied using the view type Uint32Array] + expected: FAIL + + [Binary keys can be supplied using the view type Int32Array] + expected: FAIL + + [Binary keys can be supplied using the view type Float16Array] + expected: FAIL + + [Binary keys can be supplied using the view type Float32Array] + expected: FAIL + + [Binary keys can be supplied using the view type Float64Array] + expected: FAIL + + [ArrayBuffer can be used to supply a binary key] + expected: FAIL + + [DataView can be used to supply a binary key] + expected: FAIL + + [DataView with explicit offset can be used to supply a binary key] + expected: FAIL + + [DataView with explicit offset and length can be used to supply a binary key] + expected: FAIL + + [Uint8Array with explicit offset can be used to supply a binary key] + expected: FAIL + + [Uint8Array with explicit offset and length can be used to supply a binary key] + expected: FAIL + + +[idb-binary-key-roundtrip.any.sharedworker.html] + expected: ERROR + +[idb-binary-key-roundtrip.any.serviceworker.html] + expected: ERROR + +[idb-binary-key-roundtrip.any.html] + [Binary keys can be supplied using the view type Uint8Array] + expected: FAIL + + [Binary keys can be supplied using the view type Uint8ClampedArray] + expected: FAIL + + [Binary keys can be supplied using the view type Int8Array] + expected: FAIL + + [Binary keys can be supplied using the view type Uint16Array] + expected: FAIL + + [Binary keys can be supplied using the view type Int16Array] + expected: FAIL + + [Binary keys can be supplied using the view type Uint32Array] + expected: FAIL + + [Binary keys can be supplied using the view type Int32Array] + expected: FAIL + + [Binary keys can be supplied using the view type Float16Array] + expected: FAIL + + [Binary keys can be supplied using the view type Float32Array] + expected: FAIL + + [Binary keys can be supplied using the view type Float64Array] + expected: FAIL + + [ArrayBuffer can be used to supply a binary key] + expected: FAIL + + [DataView can be used to supply a binary key] + expected: FAIL + + [DataView with explicit offset can be used to supply a binary key] + expected: FAIL + + [DataView with explicit offset and length can be used to supply a binary key] + expected: FAIL + + [Uint8Array with explicit offset can be used to supply a binary key] + expected: FAIL + + [Uint8Array with explicit offset and length can be used to supply a binary key] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idb-explicit-commit-throw.any.js.ini b/tests/wpt/meta/indexeddb/idb-explicit-commit-throw.any.js.ini new file mode 100644 index 00000000000..bfe98bc05d6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb-explicit-commit-throw.any.js.ini @@ -0,0 +1,9 @@ +[idb-explicit-commit-throw.any.worker.html] + [Any errors in callbacks that run after an explicit commit will not stop the commit from being processed.] + expected: FAIL + + +[idb-explicit-commit-throw.any.html] + [Any errors in callbacks that run after an explicit commit will not stop the commit from being processed.] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/idb-explicit-commit.any.js.ini b/tests/wpt/meta/indexeddb/idb-explicit-commit.any.js.ini new file mode 100644 index 00000000000..38378c1dd91 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb-explicit-commit.any.js.ini @@ -0,0 +1,75 @@ +[idb-explicit-commit.any.worker.html] + [commit() on a version change transaction does not cause errors.] + expected: FAIL + + [Puts issued after commit are not fulfilled.] + expected: FAIL + + [Explicitly committed data can be read back out.] + expected: FAIL + + [Calling abort on a committed transaction throws and does not prevent persisting the data.] + expected: FAIL + + [Calling commit on a committed transaction throws.] + expected: FAIL + + [Transactions that explicitly commit and have errors should abort.] + expected: FAIL + + [A committed transaction becomes inactive immediately.] + expected: FAIL + + [Transactions with same scope should stay in program order, even if one calls commit.] + expected: FAIL + + [Calling commit on an aborted transaction throws.] + expected: FAIL + + [Calling txn.commit() when txn is inactive should throw.] + expected: FAIL + + [Transactions that handle all errors properly should behave as expected when an explicit commit is called in an onerror handler.] + expected: FAIL + + [A committed transaction is inactive in future request callbacks.] + expected: FAIL + + +[idb-explicit-commit.any.html] + [commit() on a version change transaction does not cause errors.] + expected: FAIL + + [Puts issued after commit are not fulfilled.] + expected: FAIL + + [Explicitly committed data can be read back out.] + expected: FAIL + + [Calling abort on a committed transaction throws and does not prevent persisting the data.] + expected: FAIL + + [Calling commit on a committed transaction throws.] + expected: FAIL + + [Transactions that explicitly commit and have errors should abort.] + expected: FAIL + + [A committed transaction becomes inactive immediately.] + expected: FAIL + + [Transactions with same scope should stay in program order, even if one calls commit.] + expected: FAIL + + [Calling commit on an aborted transaction throws.] + expected: FAIL + + [Calling txn.commit() when txn is inactive should throw.] + expected: FAIL + + [Transactions that handle all errors properly should behave as expected when an explicit commit is called in an onerror handler.] + expected: FAIL + + [A committed transaction is inactive in future request callbacks.] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/idb-partitioned-basic.sub.html.ini b/tests/wpt/meta/indexeddb/idb-partitioned-basic.sub.html.ini new file mode 100644 index 00000000000..2afb0168b2f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb-partitioned-basic.sub.html.ini @@ -0,0 +1,4 @@ +[idb-partitioned-basic.sub.html] + expected: TIMEOUT + [Simple test for partitioned IndexedDB] + expected: TIMEOUT diff --git a/tests/wpt/meta/indexeddb/idb-partitioned-coverage.sub.html.ini b/tests/wpt/meta/indexeddb/idb-partitioned-coverage.sub.html.ini new file mode 100644 index 00000000000..925df45ce6b --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb-partitioned-coverage.sub.html.ini @@ -0,0 +1,49 @@ +[idb-partitioned-coverage.sub.html] + expected: ERROR + [Deletes are processed in order] + expected: FAIL + + [ - advance] + expected: FAIL + + [ - continue] + expected: FAIL + + [ - fresh advance still async] + expected: FAIL + + [ - fresh continue still async] + expected: FAIL + + [Single item get] + expected: FAIL + + [Empty object store] + expected: FAIL + + [Get all] + expected: FAIL + + [Get all with generated keys] + expected: FAIL + + [Get all with large values] + expected: FAIL + + [maxCount=10] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - forward iteration] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - reverse iteration] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - forward iteration with range] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - reverse iteration with range] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - invalid inputs] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idb-partitioned-persistence.sub.html.ini b/tests/wpt/meta/indexeddb/idb-partitioned-persistence.sub.html.ini new file mode 100644 index 00000000000..593db5fccfa --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb-partitioned-persistence.sub.html.ini @@ -0,0 +1,4 @@ +[idb-partitioned-persistence.sub.html] + expected: TIMEOUT + [Persistence test for partitioned IndexedDB] + expected: TIMEOUT diff --git a/tests/wpt/meta/indexeddb/idb_binary_key_conversion.any.js.ini b/tests/wpt/meta/indexeddb/idb_binary_key_conversion.any.js.ini new file mode 100644 index 00000000000..c6da536679f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb_binary_key_conversion.any.js.ini @@ -0,0 +1,39 @@ +[idb_binary_key_conversion.any.worker.html] + [Empty ArrayBuffer] + expected: FAIL + + [ArrayBuffer] + expected: FAIL + + [DataView] + expected: FAIL + + [TypedArray(Int8Array)] + expected: FAIL + + [Array of TypedArray(Int8Array)] + expected: FAIL + + +[idb_binary_key_conversion.any.html] + [Empty ArrayBuffer] + expected: FAIL + + [ArrayBuffer] + expected: FAIL + + [DataView] + expected: FAIL + + [TypedArray(Int8Array)] + expected: FAIL + + [Array of TypedArray(Int8Array)] + expected: FAIL + + +[idb_binary_key_conversion.any.serviceworker.html] + expected: ERROR + +[idb_binary_key_conversion.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idb_webworkers.htm.ini b/tests/wpt/meta/indexeddb/idb_webworkers.htm.ini new file mode 100644 index 00000000000..6d192f870c8 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idb_webworkers.htm.ini @@ -0,0 +1,4 @@ +[idb_webworkers.htm] + expected: ERROR + [IndexedDB inside of a WebWorker ] + expected: TIMEOUT diff --git a/tests/wpt/meta/indexeddb/idbcursor-advance-continue-async.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-advance-continue-async.any.js.ini new file mode 100644 index 00000000000..601f70aa41e --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-advance-continue-async.any.js.ini @@ -0,0 +1,32 @@ +[idbcursor-advance-continue-async.any.sharedworker.html] + expected: ERROR + +[idbcursor-advance-continue-async.any.worker.html] + [IDBCursor asyncness - advance] + expected: FAIL + + [IDBCursor asyncness - continue] + expected: FAIL + + [IDBCursor asyncness - fresh advance still async] + expected: FAIL + + [IDBCursor asyncness - fresh continue still async] + expected: FAIL + + +[idbcursor-advance-continue-async.any.serviceworker.html] + expected: ERROR + +[idbcursor-advance-continue-async.any.html] + [IDBCursor asyncness - advance] + expected: FAIL + + [IDBCursor asyncness - continue] + expected: FAIL + + [IDBCursor asyncness - fresh advance still async] + expected: FAIL + + [IDBCursor asyncness - fresh continue still async] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-advance-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-advance-exception-order.any.js.ini new file mode 100644 index 00000000000..fe6e5f6a3d1 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-advance-exception-order.any.js.ini @@ -0,0 +1,26 @@ +[idbcursor-advance-exception-order.any.serviceworker.html] + expected: ERROR + +[idbcursor-advance-exception-order.any.worker.html] + [IDBCursor.advance exception order: TypeError vs. TransactionInactiveError] + expected: FAIL + + [IDBCursor.advance exception order: TransactionInactiveError vs. InvalidStateError #1] + expected: FAIL + + [IDBCursor.advance exception order: TransactionInactiveError vs. InvalidStateError #2] + expected: FAIL + + +[idbcursor-advance-exception-order.any.sharedworker.html] + expected: ERROR + +[idbcursor-advance-exception-order.any.html] + [IDBCursor.advance exception order: TypeError vs. TransactionInactiveError] + expected: FAIL + + [IDBCursor.advance exception order: TransactionInactiveError vs. InvalidStateError #1] + expected: FAIL + + [IDBCursor.advance exception order: TransactionInactiveError vs. InvalidStateError #2] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-advance-invalid.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-advance-invalid.any.js.ini new file mode 100644 index 00000000000..e9e9528f1e2 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-advance-invalid.any.js.ini @@ -0,0 +1,45 @@ +[idbcursor-advance-invalid.any.worker.html] + [IDBCursor.advance() - invalid - attempt to call advance twice] + expected: FAIL + + [IDBCursor.advance() - invalid - pass something other than number] + expected: FAIL + + [IDBCursor.advance() - invalid - pass null/undefined] + expected: FAIL + + [IDBCursor.advance() - invalid - missing argument] + expected: FAIL + + [IDBCursor.advance() - invalid - pass negative numbers] + expected: FAIL + + [IDBCursor.advance() - invalid - got value not set on exception] + expected: FAIL + + +[idbcursor-advance-invalid.any.serviceworker.html] + expected: ERROR + +[idbcursor-advance-invalid.any.html] + [IDBCursor.advance() - invalid - attempt to call advance twice] + expected: FAIL + + [IDBCursor.advance() - invalid - pass something other than number] + expected: FAIL + + [IDBCursor.advance() - invalid - pass null/undefined] + expected: FAIL + + [IDBCursor.advance() - invalid - missing argument] + expected: FAIL + + [IDBCursor.advance() - invalid - pass negative numbers] + expected: FAIL + + [IDBCursor.advance() - invalid - got value not set on exception] + expected: FAIL + + +[idbcursor-advance-invalid.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor-advance.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-advance.any.js.ini new file mode 100644 index 00000000000..d15ad0fe2fa --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-advance.any.js.ini @@ -0,0 +1,44 @@ +[idbcursor-advance.any.html] + [IDBCursor.advance() - advances] + expected: FAIL + + [IDBCursor.advance() - advances backwards] + expected: FAIL + + [IDBCursor.advance() - skip far forward] + expected: FAIL + + [IDBCursor.advance() - within range] + expected: FAIL + + [IDBCursor.advance() - within single key range] + expected: FAIL + + [IDBCursor.advance() - within single key range, with several results] + expected: FAIL + + +[idbcursor-advance.any.sharedworker.html] + expected: ERROR + +[idbcursor-advance.any.serviceworker.html] + expected: ERROR + +[idbcursor-advance.any.worker.html] + [IDBCursor.advance() - advances] + expected: FAIL + + [IDBCursor.advance() - advances backwards] + expected: FAIL + + [IDBCursor.advance() - skip far forward] + expected: FAIL + + [IDBCursor.advance() - within range] + expected: FAIL + + [IDBCursor.advance() - within single key range] + expected: FAIL + + [IDBCursor.advance() - within single key range, with several results] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-continue-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-continue-exception-order.any.js.ini new file mode 100644 index 00000000000..5cb50badbc9 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-continue-exception-order.any.js.ini @@ -0,0 +1,26 @@ +[idbcursor-continue-exception-order.any.sharedworker.html] + expected: ERROR + +[idbcursor-continue-exception-order.any.html] + [IDBCursor.continue exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBCursor.continue exception order: TransactionInactiveError vs. InvalidStateError] + expected: FAIL + + [IDBCursor.continue exception order: InvalidStateError vs. DataError] + expected: FAIL + + +[idbcursor-continue-exception-order.any.serviceworker.html] + expected: ERROR + +[idbcursor-continue-exception-order.any.worker.html] + [IDBCursor.continue exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBCursor.continue exception order: TransactionInactiveError vs. InvalidStateError] + expected: FAIL + + [IDBCursor.continue exception order: InvalidStateError vs. DataError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-continue.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-continue.any.js.ini new file mode 100644 index 00000000000..dae2957aefe --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-continue.any.js.ini @@ -0,0 +1,45 @@ +[idbcursor-continue.any.worker.html] + [IDBCursor.continue() - continues] + expected: FAIL + + [IDBCursor.continue() - with given key] + expected: FAIL + + [IDBCursor.continue() - skip far forward] + expected: FAIL + + [IDBCursor.continue() - within range] + expected: FAIL + + [IDBCursor.continue() - within single key range] + expected: FAIL + + [IDBCursor.continue() - within single key range, with several results] + expected: FAIL + + +[idbcursor-continue.any.html] + [IDBCursor.continue() - continues] + expected: FAIL + + [IDBCursor.continue() - with given key] + expected: FAIL + + [IDBCursor.continue() - skip far forward] + expected: FAIL + + [IDBCursor.continue() - within range] + expected: FAIL + + [IDBCursor.continue() - within single key range] + expected: FAIL + + [IDBCursor.continue() - within single key range, with several results] + expected: FAIL + + +[idbcursor-continue.any.sharedworker.html] + expected: ERROR + +[idbcursor-continue.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey-exception-order.any.js.ini new file mode 100644 index 00000000000..f8d676d24af --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey-exception-order.any.js.ini @@ -0,0 +1,86 @@ +[idbcursor-continuePrimaryKey-exception-order.any.sharedworker.html] + expected: ERROR + +[idbcursor-continuePrimaryKey-exception-order.any.serviceworker.html] + expected: ERROR + +[idbcursor-continuePrimaryKey-exception-order.any.html] + [TransactionInactiveError v.s. InvalidStateError(deleted index)] + expected: FAIL + + [InvalidStateError(deleted source) v.s. InvalidAccessError(incorrect source)] + expected: FAIL + + [InvalidStateError(deleted source) v.s. InvalidAccessError(incorrect direction)] + expected: FAIL + + [InvalidAccessError(incorrect direction) v.s. InvalidStateError(iteration complete)] + expected: FAIL + + [InvalidAccessError(incorrect direction) v.s. InvalidStateError(iteration ongoing)] + expected: FAIL + + [InvalidAccessError(incorrect source) v.s. InvalidStateError(iteration ongoing)] + expected: FAIL + + [InvalidAccessError(incorrect source) v.s. InvalidStateError(iteration complete)] + expected: FAIL + + [InvalidStateError(iteration ongoing) v.s. DataError(unset key)] + expected: FAIL + + [InvalidStateError(iteration complete) v.s. DataError(unset key)] + expected: FAIL + + [DataError(unset key)] + expected: FAIL + + [DataError(unset primary key)] + expected: FAIL + + [DataError(keys are lower then current one) in 'next' direction] + expected: FAIL + + [DataError(keys are larger then current one) in 'prev' direction] + expected: FAIL + + +[idbcursor-continuePrimaryKey-exception-order.any.worker.html] + [TransactionInactiveError v.s. InvalidStateError(deleted index)] + expected: FAIL + + [InvalidStateError(deleted source) v.s. InvalidAccessError(incorrect source)] + expected: FAIL + + [InvalidStateError(deleted source) v.s. InvalidAccessError(incorrect direction)] + expected: FAIL + + [InvalidAccessError(incorrect direction) v.s. InvalidStateError(iteration complete)] + expected: FAIL + + [InvalidAccessError(incorrect direction) v.s. InvalidStateError(iteration ongoing)] + expected: FAIL + + [InvalidAccessError(incorrect source) v.s. InvalidStateError(iteration ongoing)] + expected: FAIL + + [InvalidAccessError(incorrect source) v.s. InvalidStateError(iteration complete)] + expected: FAIL + + [InvalidStateError(iteration ongoing) v.s. DataError(unset key)] + expected: FAIL + + [InvalidStateError(iteration complete) v.s. DataError(unset key)] + expected: FAIL + + [DataError(unset key)] + expected: FAIL + + [DataError(unset primary key)] + expected: FAIL + + [DataError(keys are lower then current one) in 'next' direction] + expected: FAIL + + [DataError(keys are larger then current one) in 'prev' direction] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey-exceptions.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey-exceptions.any.js.ini new file mode 100644 index 00000000000..a644775892c --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey-exceptions.any.js.ini @@ -0,0 +1,19 @@ +[idbcursor-continuePrimaryKey-exceptions.any.serviceworker.html] + expected: ERROR + +[idbcursor-continuePrimaryKey-exceptions.any.worker.html] + expected: CRASH + +[idbcursor-continuePrimaryKey-exceptions.any.html] + [IDBCursor continuePrimaryKey() on object store cursor] + expected: FAIL + + [IDBCursor continuePrimaryKey() on "nextunique" cursor] + expected: FAIL + + [IDBCursor continuePrimaryKey() on "prevunique" cursor] + expected: FAIL + + +[idbcursor-continuePrimaryKey-exceptions.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey.any.js.ini new file mode 100644 index 00000000000..092753216c5 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-continuePrimaryKey.any.js.ini @@ -0,0 +1,14 @@ +[idbcursor-continuePrimaryKey.any.sharedworker.html] + expected: ERROR + +[idbcursor-continuePrimaryKey.any.serviceworker.html] + expected: ERROR + +[idbcursor-continuePrimaryKey.any.worker.html] + [IndexedDB: IDBCursor method continuePrimaryKey()] + expected: FAIL + + +[idbcursor-continuePrimaryKey.any.html] + [IndexedDB: IDBCursor method continuePrimaryKey()] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-delete-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-delete-exception-order.any.js.ini new file mode 100644 index 00000000000..42c97f37854 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-delete-exception-order.any.js.ini @@ -0,0 +1,27 @@ +[idbcursor-delete-exception-order.any.worker.html] + [IDBCursor.delete exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBCursor.delete exception order: ReadOnlyError vs. InvalidStateError #1] + expected: FAIL + + [IDBCursor.delete exception order: ReadOnlyError vs. InvalidStateError #2] + expected: FAIL + + +[idbcursor-delete-exception-order.any.sharedworker.html] + expected: ERROR + +[idbcursor-delete-exception-order.any.html] + [IDBCursor.delete exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBCursor.delete exception order: ReadOnlyError vs. InvalidStateError #1] + expected: FAIL + + [IDBCursor.delete exception order: ReadOnlyError vs. InvalidStateError #2] + expected: FAIL + + +[idbcursor-delete-exception-order.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor-direction-index-keyrange.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-direction-index-keyrange.any.js.ini new file mode 100644 index 00000000000..c7658ba8981 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-direction-index-keyrange.any.js.ini @@ -0,0 +1,32 @@ +[idbcursor-direction-index-keyrange.any.serviceworker.html] + expected: ERROR + +[idbcursor-direction-index-keyrange.any.worker.html] + [IDBCursor direction - index with keyrange - next] + expected: FAIL + + [IDBCursor direction - index with keyrange - prev] + expected: FAIL + + [IDBCursor direction - index with keyrange - nextunique] + expected: FAIL + + [IDBCursor direction - index with keyrange - prevunique] + expected: FAIL + + +[idbcursor-direction-index-keyrange.any.sharedworker.html] + expected: ERROR + +[idbcursor-direction-index-keyrange.any.html] + [IDBCursor direction - index with keyrange - next] + expected: FAIL + + [IDBCursor direction - index with keyrange - prev] + expected: FAIL + + [IDBCursor direction - index with keyrange - nextunique] + expected: FAIL + + [IDBCursor direction - index with keyrange - prevunique] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-direction-index.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-direction-index.any.js.ini new file mode 100644 index 00000000000..b40ef37893a --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-direction-index.any.js.ini @@ -0,0 +1,32 @@ +[idbcursor-direction-index.any.serviceworker.html] + expected: ERROR + +[idbcursor-direction-index.any.sharedworker.html] + expected: ERROR + +[idbcursor-direction-index.any.html] + [IDBCursor direction - index - next] + expected: FAIL + + [IDBCursor direction - index - prev] + expected: FAIL + + [IDBCursor direction - index - nextunique] + expected: FAIL + + [IDBCursor direction - index - prevunique] + expected: FAIL + + +[idbcursor-direction-index.any.worker.html] + [IDBCursor direction - index - next] + expected: FAIL + + [IDBCursor direction - index - prev] + expected: FAIL + + [IDBCursor direction - index - nextunique] + expected: FAIL + + [IDBCursor direction - index - prevunique] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-direction-objectstore-keyrange.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-direction-objectstore-keyrange.any.js.ini new file mode 100644 index 00000000000..47b274c38f7 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-direction-objectstore-keyrange.any.js.ini @@ -0,0 +1,32 @@ +[idbcursor-direction-objectstore-keyrange.any.sharedworker.html] + expected: ERROR + +[idbcursor-direction-objectstore-keyrange.any.serviceworker.html] + expected: ERROR + +[idbcursor-direction-objectstore-keyrange.any.worker.html] + [IDBCursor direction - object store with keyrange - next] + expected: FAIL + + [IDBCursor direction - object store with keyrange - prev] + expected: FAIL + + [IDBCursor direction - object store with keyrange - nextunique] + expected: FAIL + + [IDBCursor direction - object store with keyrange - prevunique] + expected: FAIL + + +[idbcursor-direction-objectstore-keyrange.any.html] + [IDBCursor direction - object store with keyrange - next] + expected: FAIL + + [IDBCursor direction - object store with keyrange - prev] + expected: FAIL + + [IDBCursor direction - object store with keyrange - nextunique] + expected: FAIL + + [IDBCursor direction - object store with keyrange - prevunique] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-direction-objectstore.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-direction-objectstore.any.js.ini new file mode 100644 index 00000000000..ae8c4250788 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-direction-objectstore.any.js.ini @@ -0,0 +1,32 @@ +[idbcursor-direction-objectstore.any.sharedworker.html] + expected: ERROR + +[idbcursor-direction-objectstore.any.serviceworker.html] + expected: ERROR + +[idbcursor-direction-objectstore.any.html] + [IDBCursor direction - object store - next] + expected: FAIL + + [IDBCursor direction - object store - prev] + expected: FAIL + + [IDBCursor direction - object store - nextunique] + expected: FAIL + + [IDBCursor direction - object store - prevunique] + expected: FAIL + + +[idbcursor-direction-objectstore.any.worker.html] + [IDBCursor direction - object store - next] + expected: FAIL + + [IDBCursor direction - object store - prev] + expected: FAIL + + [IDBCursor direction - object store - nextunique] + expected: FAIL + + [IDBCursor direction - object store - prevunique] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-direction.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-direction.any.js.ini new file mode 100644 index 00000000000..94b9fbb1f91 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-direction.any.js.ini @@ -0,0 +1,26 @@ +[idbcursor-direction.any.serviceworker.html] + expected: ERROR + +[idbcursor-direction.any.worker.html] + expected: CRASH + +[idbcursor-direction.any.html] + expected: ERROR + [IDBCursor.direction - undefined] + expected: FAIL + + [IDBCursor.direction - next] + expected: NOTRUN + + [IDBCursor.direction - prev] + expected: NOTRUN + + [IDBCursor.direction - nextunique] + expected: NOTRUN + + [IDBCursor.direction - prevunique] + expected: NOTRUN + + +[idbcursor-direction.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor-iterating-update.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-iterating-update.any.js.ini new file mode 100644 index 00000000000..6374419a8a8 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-iterating-update.any.js.ini @@ -0,0 +1,20 @@ +[idbcursor-iterating-update.any.serviceworker.html] + expected: ERROR + +[idbcursor-iterating-update.any.sharedworker.html] + expected: ERROR + +[idbcursor-iterating-update.any.worker.html] + [Calling (cursor) => cursor.update({}) doesn't affect index iteration] + expected: FAIL + + [Calling (cursor) => cursor.delete() doesn't affect index iteration] + expected: FAIL + + +[idbcursor-iterating-update.any.html] + [Calling (cursor) => cursor.update({}) doesn't affect index iteration] + expected: FAIL + + [Calling (cursor) => cursor.delete() doesn't affect index iteration] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-key.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-key.any.js.ini new file mode 100644 index 00000000000..e7fa6fef889 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-key.any.js.ini @@ -0,0 +1,18 @@ +[idbcursor-key.any.serviceworker.html] + expected: ERROR + +[idbcursor-key.any.sharedworker.html] + expected: ERROR + +[idbcursor-key.any.worker.html] + expected: CRASH + +[idbcursor-key.any.html] + [IDBCursor.key] + expected: FAIL + + [IDBCursor.key 1] + expected: FAIL + + [IDBCursor.key 2] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-primarykey.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-primarykey.any.js.ini new file mode 100644 index 00000000000..277d1c75305 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-primarykey.any.js.ini @@ -0,0 +1,19 @@ +[idbcursor-primarykey.any.worker.html] + expected: CRASH + +[idbcursor-primarykey.any.serviceworker.html] + expected: ERROR + +[idbcursor-primarykey.any.html] + [IDBCursor.primaryKey] + expected: FAIL + + [IDBCursor.primaryKey 1] + expected: FAIL + + [IDBCursor.primaryKey 2] + expected: FAIL + + +[idbcursor-primarykey.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor-request-source.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-request-source.any.js.ini new file mode 100644 index 00000000000..52b6c11f961 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-request-source.any.js.ini @@ -0,0 +1,57 @@ +[idbcursor-request-source.any.serviceworker.html] + expected: ERROR + +[idbcursor-request-source.any.worker.html] + [IDBObjectStore::openCursor's request source must be the IDBObjectStore instance that opened the cursor] + expected: FAIL + + [IDBObjectStore::openKeyCursor's request source must be the IDBObjectStore instance that opened the cursor] + expected: FAIL + + [IDBIndex::openCursor's request source must be the IDBIndex instance that opened the cursor] + expected: FAIL + + [IDBIndex::openKeyCursor's request source must be the IDBIndex instance that opened the cursor] + expected: FAIL + + [The source of the request from IDBObjectStore::update() is the cursor itself] + expected: FAIL + + [The source of the request from IDBObjectStore::delete() is the cursor itself] + expected: FAIL + + [The source of the request from IDBIndex::update() is the cursor itself] + expected: FAIL + + [The source of the request from IDBIndex::delete() is the cursor itself] + expected: FAIL + + +[idbcursor-request-source.any.html] + [IDBObjectStore::openCursor's request source must be the IDBObjectStore instance that opened the cursor] + expected: FAIL + + [IDBObjectStore::openKeyCursor's request source must be the IDBObjectStore instance that opened the cursor] + expected: FAIL + + [IDBIndex::openCursor's request source must be the IDBIndex instance that opened the cursor] + expected: FAIL + + [IDBIndex::openKeyCursor's request source must be the IDBIndex instance that opened the cursor] + expected: FAIL + + [The source of the request from IDBObjectStore::update() is the cursor itself] + expected: FAIL + + [The source of the request from IDBObjectStore::delete() is the cursor itself] + expected: FAIL + + [The source of the request from IDBIndex::update() is the cursor itself] + expected: FAIL + + [The source of the request from IDBIndex::delete() is the cursor itself] + expected: FAIL + + +[idbcursor-request-source.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor-request.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-request.any.js.ini new file mode 100644 index 00000000000..81f2241a76f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-request.any.js.ini @@ -0,0 +1,27 @@ +[idbcursor-request.any.html] + [cursor.request from IDBIndex.openCursor] + expected: FAIL + + [cursor.request from IDBObjectStore.openKeyCursor] + expected: FAIL + + [cursor.request from IDBIndex.openKeyCursor] + expected: FAIL + + [cursor.request from IDBObjectStore.openCursor] + expected: FAIL + + +[idbcursor-request.any.worker.html] + [cursor.request from IDBIndex.openCursor] + expected: FAIL + + [cursor.request from IDBObjectStore.openKeyCursor] + expected: FAIL + + [cursor.request from IDBIndex.openKeyCursor] + expected: FAIL + + [cursor.request from IDBObjectStore.openCursor] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/idbcursor-reused.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-reused.any.js.ini new file mode 100644 index 00000000000..a045394771f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-reused.any.js.ini @@ -0,0 +1,12 @@ +[idbcursor-reused.any.serviceworker.html] + expected: ERROR + +[idbcursor-reused.any.sharedworker.html] + expected: ERROR + +[idbcursor-reused.any.worker.html] + expected: CRASH + +[idbcursor-reused.any.html] + [IDBCursor is reused] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-source.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-source.any.js.ini new file mode 100644 index 00000000000..478c2a396b7 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-source.any.js.ini @@ -0,0 +1,20 @@ +[idbcursor-source.any.html] + [IDBCursor.source - IDBObjectStore] + expected: FAIL + + [IDBCursor.source - IDBIndex] + expected: FAIL + + +[idbcursor-source.any.sharedworker.html] + expected: ERROR + +[idbcursor-source.any.serviceworker.html] + expected: ERROR + +[idbcursor-source.any.worker.html] + [IDBCursor.source - IDBObjectStore] + expected: FAIL + + [IDBCursor.source - IDBIndex] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor-update-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor-update-exception-order.any.js.ini new file mode 100644 index 00000000000..0317a74d7be --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor-update-exception-order.any.js.ini @@ -0,0 +1,32 @@ +[idbcursor-update-exception-order.any.sharedworker.html] + expected: ERROR + +[idbcursor-update-exception-order.any.html] + [IDBCursor.update exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBCursor.update exception order: ReadOnlyError vs. InvalidStateError #1] + expected: FAIL + + [IDBCursor.update exception order: ReadOnlyError vs. InvalidStateError #2] + expected: FAIL + + [IDBCursor.update exception order: InvalidStateError vs. DataError] + expected: FAIL + + +[idbcursor-update-exception-order.any.serviceworker.html] + expected: ERROR + +[idbcursor-update-exception-order.any.worker.html] + [IDBCursor.update exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBCursor.update exception order: ReadOnlyError vs. InvalidStateError #1] + expected: FAIL + + [IDBCursor.update exception order: ReadOnlyError vs. InvalidStateError #2] + expected: FAIL + + [IDBCursor.update exception order: InvalidStateError vs. DataError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbcursor_advance_index.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_advance_index.any.js.ini new file mode 100644 index 00000000000..d635963154e --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_advance_index.any.js.ini @@ -0,0 +1,34 @@ +[idbcursor_advance_index.any.html] + [index - iterate cursor number of times specified by count] + expected: FAIL + + [attempt to pass a count parameter that is not a number] + expected: FAIL + + [index - attempt to advance backwards] + expected: FAIL + + [index - iterate to the next record] + expected: FAIL + + [Calling advance() with count argument 0 should throw TypeError.] + expected: FAIL + + [Calling advance() should throws an exception TransactionInactiveError when the transaction is not active.] + expected: FAIL + + [Calling advance() should throw DOMException when the cursor is currently being iterated.] + expected: FAIL + + [If the cursor's source or effective object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + +[idbcursor_advance_index.any.serviceworker.html] + expected: ERROR + +[idbcursor_advance_index.any.sharedworker.html] + expected: ERROR + +[idbcursor_advance_index.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbcursor_advance_objectstore.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_advance_objectstore.any.js.ini new file mode 100644 index 00000000000..4a827a38e49 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_advance_objectstore.any.js.ini @@ -0,0 +1,25 @@ +[idbcursor_advance_objectstore.any.html] + [object store - iterate cursor number of times specified by count] + expected: FAIL + + [Calling advance() with count argument 0 should throw TypeError.] + expected: FAIL + + [Calling advance() should throws an exception TransactionInactiveError when the transaction is not active] + expected: FAIL + + [Calling advance() should throw DOMException when the cursor is currently being iterated.] + expected: FAIL + + [If the cursor's source or effective object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + +[idbcursor_advance_objectstore.any.serviceworker.html] + expected: ERROR + +[idbcursor_advance_objectstore.any.worker.html] + expected: CRASH + +[idbcursor_advance_objectstore.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor_continue_delete_objectstore.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_continue_delete_objectstore.any.js.ini new file mode 100644 index 00000000000..117f7febffd --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_continue_delete_objectstore.any.js.ini @@ -0,0 +1,13 @@ +[idbcursor_continue_delete_objectstore.any.html] + [Object store - remove a record from the object store while iterating cursor] + expected: FAIL + + +[idbcursor_continue_delete_objectstore.any.sharedworker.html] + expected: ERROR + +[idbcursor_continue_delete_objectstore.any.serviceworker.html] + expected: ERROR + +[idbcursor_continue_delete_objectstore.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbcursor_continue_index.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_continue_index.any.js.ini new file mode 100644 index 00000000000..e0de666374c --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_continue_index.any.js.ini @@ -0,0 +1,40 @@ +[idbcursor_continue_index.any.serviceworker.html] + expected: ERROR + +[idbcursor_continue_index.any.sharedworker.html] + expected: ERROR + +[idbcursor_continue_index.any.html] + [Iterate to the next record] + expected: FAIL + + [Attempt to pass a key parameter that is not a valid key] + expected: FAIL + + [Attempt to iterate to the previous record when the direction is set for the next record] + expected: FAIL + + [Attempt to iterate to the next record when the direction is set for the previous record] + expected: FAIL + + [Iterate using 'prevunique'] + expected: FAIL + + [Iterate using nextunique] + expected: FAIL + + [Calling continue() should throw an exception TransactionInactiveError when the transaction is not active.] + expected: FAIL + + [If the cursor's source or effective object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + [Delete next element, and iterate to it] + expected: FAIL + + [Add next element, and iterate to it] + expected: FAIL + + +[idbcursor_continue_index.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbcursor_continue_invalid.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_continue_invalid.any.js.ini new file mode 100644 index 00000000000..d733ef48e2d --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_continue_invalid.any.js.ini @@ -0,0 +1,13 @@ +[idbcursor_continue_invalid.any.html] + [Attempt to call continue two times] + expected: FAIL + + +[idbcursor_continue_invalid.any.sharedworker.html] + expected: ERROR + +[idbcursor_continue_invalid.any.serviceworker.html] + expected: ERROR + +[idbcursor_continue_invalid.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbcursor_continue_objectstore.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_continue_objectstore.any.js.ini new file mode 100644 index 00000000000..22cee52ed99 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_continue_objectstore.any.js.ini @@ -0,0 +1,35 @@ +[idbcursor_continue_objectstore.any.worker.html] + expected: CRASH + +[idbcursor_continue_objectstore.any.serviceworker.html] + expected: ERROR + +[idbcursor_continue_objectstore.any.html] + expected: ERROR + [Iterate to the next record] + expected: FAIL + + [Attempt to pass a key parameter is not a valid key] + expected: FAIL + + [Attempt to iterate to the previous record when the direction is set for the next record] + expected: FAIL + + [Attempt to iterate to the next record when the direction is set for the next record] + expected: FAIL + + [Calling continue() should throws an exception TransactionInactiveError when the transaction is not active.] + expected: FAIL + + [If the cursor's source or effective object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + [Delete next element, and iterate to it] + expected: FAIL + + [Add next element, and iterate to it] + expected: TIMEOUT + + +[idbcursor_continue_objectstore.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor_delete_index.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_delete_index.any.js.ini new file mode 100644 index 00000000000..7c8a215fb4c --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_delete_index.any.js.ini @@ -0,0 +1,25 @@ +[idbcursor_delete_index.any.worker.html] + expected: CRASH + +[idbcursor_delete_index.any.html] + [Remove a record from the object store] + expected: FAIL + + [Attempt to remove a record in a read-only transaction] + expected: FAIL + + [Attempt to remove a record in an inactive transaction] + expected: FAIL + + [If the cursor's source or effective object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + [Throw InvalidStateError when the cursor is being iterated] + expected: FAIL + + +[idbcursor_delete_index.any.sharedworker.html] + expected: ERROR + +[idbcursor_delete_index.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor_delete_objectstore.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_delete_objectstore.any.js.ini new file mode 100644 index 00000000000..a51039ccdeb --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_delete_objectstore.any.js.ini @@ -0,0 +1,25 @@ +[idbcursor_delete_objectstore.any.serviceworker.html] + expected: ERROR + +[idbcursor_delete_objectstore.any.worker.html] + expected: CRASH + +[idbcursor_delete_objectstore.any.html] + [Remove a record from the object store ] + expected: FAIL + + [Attempt to remove a record in a read-only transaction] + expected: FAIL + + [Index - attempt to remove a record in an inactive transaction] + expected: FAIL + + [If the cursor's source or effective object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + [Throw InvalidStateError when the cursor is being iterated] + expected: FAIL + + +[idbcursor_delete_objectstore.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbcursor_iterating.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_iterating.any.js.ini new file mode 100644 index 00000000000..7fda2ced69c --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_iterating.any.js.ini @@ -0,0 +1,14 @@ +[idbcursor_iterating.any.sharedworker.html] + expected: ERROR + +[idbcursor_iterating.any.html] + expected: ERROR + [Iterate and Delete elements] + expected: FAIL + + +[idbcursor_iterating.any.serviceworker.html] + expected: ERROR + +[idbcursor_iterating.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbcursor_update_index.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_update_index.any.js.ini new file mode 100644 index 00000000000..1619d7cc9ab --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_update_index.any.js.ini @@ -0,0 +1,37 @@ +[idbcursor_update_index.any.serviceworker.html] + expected: ERROR + +[idbcursor_update_index.any.sharedworker.html] + expected: ERROR + +[idbcursor_update_index.any.html] + [Modify a record in the object store ] + expected: FAIL + + [Attempt to modify a record in a read-only transaction] + expected: FAIL + + [Attempt to modify a record in an inactive transaction] + expected: FAIL + + [Attempt to modify a record after the cursor's source or effective object store has been deleted. The implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + [Throw DataCloneError] + expected: FAIL + + [No argument] + expected: FAIL + + [Throw DataError] + expected: FAIL + + [Throw InvalidStateError when the cursor is being iterated] + expected: FAIL + + [Modify records during cursor iteration and verify updated records] + expected: FAIL + + +[idbcursor_update_index.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbcursor_update_objectstore.any.js.ini b/tests/wpt/meta/indexeddb/idbcursor_update_objectstore.any.js.ini new file mode 100644 index 00000000000..bee8e8f202d --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbcursor_update_objectstore.any.js.ini @@ -0,0 +1,37 @@ +[idbcursor_update_objectstore.any.sharedworker.html] + expected: ERROR + +[idbcursor_update_objectstore.any.worker.html] + expected: CRASH + +[idbcursor_update_objectstore.any.html] + [Modify a record in the object store ] + expected: FAIL + + [Attempt to modify a record in a read-only transaction] + expected: FAIL + + [Object store - attempt to modify a record in an inactive transaction] + expected: FAIL + + [Index - modify a record in the object store ] + expected: FAIL + + [Attempt to modify a record after the cursor's source or effective object store has been deleted. The implementation MUST throw a DOMException of type InvalidStateError] + expected: FAIL + + [Throw DataCloneError] + expected: FAIL + + [No argument] + expected: FAIL + + [Throw DataError] + expected: FAIL + + [Throw InvalidStateError when the cursor is being iterated] + expected: FAIL + + +[idbcursor_update_objectstore.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbdatabase-createObjectStore-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbdatabase-createObjectStore-exception-order.any.js.ini new file mode 100644 index 00000000000..94350ba5c6d --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbdatabase-createObjectStore-exception-order.any.js.ini @@ -0,0 +1,32 @@ +[idbdatabase-createObjectStore-exception-order.any.sharedworker.html] + expected: ERROR + +[idbdatabase-createObjectStore-exception-order.any.html] + [IDBDatabase.createObjectStore exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBDatabase.createObjectStore exception order: TransactionInactiveError vs. SyntaxError] + expected: FAIL + + [IDBDatabase.createObjectStore exception order: SyntaxError vs. ConstraintError] + expected: FAIL + + [IDBDatabase.createObjectStore exception order: ConstraintError vs. InvalidAccessError] + expected: FAIL + + +[idbdatabase-createObjectStore-exception-order.any.serviceworker.html] + expected: ERROR + +[idbdatabase-createObjectStore-exception-order.any.worker.html] + [IDBDatabase.createObjectStore exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBDatabase.createObjectStore exception order: TransactionInactiveError vs. SyntaxError] + expected: FAIL + + [IDBDatabase.createObjectStore exception order: SyntaxError vs. ConstraintError] + expected: FAIL + + [IDBDatabase.createObjectStore exception order: ConstraintError vs. InvalidAccessError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbdatabase-deleteObjectStore-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbdatabase-deleteObjectStore-exception-order.any.js.ini new file mode 100644 index 00000000000..3362443657f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbdatabase-deleteObjectStore-exception-order.any.js.ini @@ -0,0 +1,20 @@ +[idbdatabase-deleteObjectStore-exception-order.any.serviceworker.html] + expected: ERROR + +[idbdatabase-deleteObjectStore-exception-order.any.sharedworker.html] + expected: ERROR + +[idbdatabase-deleteObjectStore-exception-order.any.html] + [IDBDatabase.deleteObjectStore exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBDatabase.deleteObjectStore exception order: TransactionInactiveError vs. NotFoundError] + expected: FAIL + + +[idbdatabase-deleteObjectStore-exception-order.any.worker.html] + [IDBDatabase.deleteObjectStore exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBDatabase.deleteObjectStore exception order: TransactionInactiveError vs. NotFoundError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbdatabase-transaction-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbdatabase-transaction-exception-order.any.js.ini new file mode 100644 index 00000000000..da871725541 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbdatabase-transaction-exception-order.any.js.ini @@ -0,0 +1,32 @@ +[idbdatabase-transaction-exception-order.any.serviceworker.html] + expected: ERROR + +[idbdatabase-transaction-exception-order.any.sharedworker.html] + expected: ERROR + +[idbdatabase-transaction-exception-order.any.html] + [IDBDatabase.transaction exception order: InvalidStateError vs. NotFoundError] + expected: FAIL + + [IDBDatabase.transaction exception order: InvalidStateError vs. InvalidAccessError] + expected: FAIL + + [IDBDatabase.transaction throws exception on invalid mode] + expected: FAIL + + [IDBDatabase.transaction exception order: NotFoundError vs. TypeError] + expected: FAIL + + +[idbdatabase-transaction-exception-order.any.worker.html] + [IDBDatabase.transaction exception order: InvalidStateError vs. NotFoundError] + expected: FAIL + + [IDBDatabase.transaction exception order: InvalidStateError vs. InvalidAccessError] + expected: FAIL + + [IDBDatabase.transaction throws exception on invalid mode] + expected: FAIL + + [IDBDatabase.transaction exception order: NotFoundError vs. TypeError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbdatabase_close.any.js.ini b/tests/wpt/meta/indexeddb/idbdatabase_close.any.js.ini new file mode 100644 index 00000000000..9e4de002e48 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbdatabase_close.any.js.ini @@ -0,0 +1,16 @@ +[idbdatabase_close.any.worker.html] + expected: CRASH + +[idbdatabase_close.any.serviceworker.html] + expected: ERROR + +[idbdatabase_close.any.html] + [Unblock the version change transaction created by an open database request] + expected: FAIL + + [Unblock the delete database request.] + expected: FAIL + + +[idbdatabase_close.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbdatabase_createObjectStore.any.js.ini b/tests/wpt/meta/indexeddb/idbdatabase_createObjectStore.any.js.ini new file mode 100644 index 00000000000..0f4a535abfc --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbdatabase_createObjectStore.any.js.ini @@ -0,0 +1,90 @@ +[idbdatabase_createObjectStore.any.worker.html] + expected: CRASH + +[idbdatabase_createObjectStore.any.serviceworker.html] + expected: ERROR + +[idbdatabase_createObjectStore.any.sharedworker.html] + expected: ERROR + +[idbdatabase_createObjectStore.any.html] + [Both with empty name] + expected: FAIL + + [Returns an instance of IDBObjectStore] + expected: FAIL + + [Create 1000 object stores, add one item and delete] + expected: FAIL + + [Empty name] + expected: FAIL + + [Attempting to create an existing object store with a different keyPath throw ConstraintError ] + expected: FAIL + + [Object store 'name' and 'keyPath' properties are correctly set ] + expected: FAIL + + [Attempt to create an object store outside of a version change transaction ] + expected: FAIL + + [Attempt to create an object store that already exists ] + expected: FAIL + + [Object store's name appears in database's list ] + expected: FAIL + + [Attempt to create an object store with an invalid key path ] + expected: FAIL + + [Create an object store with an unknown optional parameter ] + expected: FAIL + + [autoInc true] + expected: FAIL + + [autoInc true, keyPath null] + expected: FAIL + + [autoInc true, keyPath undefined] + expected: FAIL + + [autoInc true, keyPath string] + expected: FAIL + + [autoInc false, keyPath empty] + expected: FAIL + + [autoInc false, keyPath array] + expected: FAIL + + [autoInc false, keyPath string] + expected: FAIL + + [keyPath empty] + expected: FAIL + + [keyPath array] + expected: FAIL + + [keyPath string] + expected: FAIL + + [keyPath null] + expected: FAIL + + [keyPath undefined] + expected: FAIL + + [autoInc and empty keyPath] + expected: FAIL + + [autoInc and keyPath array] + expected: FAIL + + [autoInc and keyPath array 2] + expected: FAIL + + [autoInc and keyPath object] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbdatabase_deleteObjectStore.any.js.ini b/tests/wpt/meta/indexeddb/idbdatabase_deleteObjectStore.any.js.ini new file mode 100644 index 00000000000..99ebe9f6211 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbdatabase_deleteObjectStore.any.js.ini @@ -0,0 +1,18 @@ +[idbdatabase_deleteObjectStore.any.serviceworker.html] + expected: ERROR + +[idbdatabase_deleteObjectStore.any.worker.html] + expected: CRASH + +[idbdatabase_deleteObjectStore.any.sharedworker.html] + expected: ERROR + +[idbdatabase_deleteObjectStore.any.html] + [Deleted object store's name should be removed from database's list. Attempting to use a deleted IDBObjectStore should throw an InvalidStateError] + expected: FAIL + + [Attempting to remove an object store that does not exist should throw a NotFoundError] + expected: FAIL + + [Attempting to access an index that was deleted as part of object store deletion and then recreated using the same object store name should throw a NotFoundError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbdatabase_transaction.any.js.ini b/tests/wpt/meta/indexeddb/idbdatabase_transaction.any.js.ini new file mode 100644 index 00000000000..d420b2dd646 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbdatabase_transaction.any.js.ini @@ -0,0 +1,24 @@ +[idbdatabase_transaction.any.serviceworker.html] + expected: ERROR + +[idbdatabase_transaction.any.worker.html] + expected: CRASH + +[idbdatabase_transaction.any.sharedworker.html] + expected: ERROR + +[idbdatabase_transaction.any.html] + [Attempt to open a transaction with invalid scope] + expected: FAIL + + [Opening a transaction defaults to a read-only mode] + expected: FAIL + + [Attempt to open a transaction from closed database connection] + expected: FAIL + + [Attempt to open a transaction with invalid mode] + expected: FAIL + + [If storeNames is an empty list, the implementation must throw a DOMException of type InvalidAccessError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbfactory-databases-opaque-origin.html.ini b/tests/wpt/meta/indexeddb/idbfactory-databases-opaque-origin.html.ini new file mode 100644 index 00000000000..6fc7996207e --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-databases-opaque-origin.html.ini @@ -0,0 +1,13 @@ +[idbfactory-databases-opaque-origin.html] + expected: TIMEOUT + [IDBFactory.databases() in non-sandboxed iframe should not reject] + expected: FAIL + + [IDBFactory.databases() in sandboxed iframe should reject] + expected: TIMEOUT + + [IDBFactory.databases() in data URL dedicated worker should throw SecurityError] + expected: NOTRUN + + [IDBFactory.databases() in data URL shared worker should throw SecurityError] + expected: NOTRUN diff --git a/tests/wpt/meta/indexeddb/idbfactory-deleteDatabase-opaque-origin.html.ini b/tests/wpt/meta/indexeddb/idbfactory-deleteDatabase-opaque-origin.html.ini new file mode 100644 index 00000000000..4a3e62da344 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-deleteDatabase-opaque-origin.html.ini @@ -0,0 +1,10 @@ +[idbfactory-deleteDatabase-opaque-origin.html] + expected: TIMEOUT + [IDBFactory.deleteDatabase() in sandboxed iframe should throw SecurityError] + expected: TIMEOUT + + [IDBFactory.deleteDatabase() in data URL dedicated worker should throw SecurityError] + expected: NOTRUN + + [IDBFactory.deleteDatabase() in data URL shared worker should throw SecurityError] + expected: NOTRUN diff --git a/tests/wpt/meta/indexeddb/idbfactory-deleteDatabase-request-success.any.js.ini b/tests/wpt/meta/indexeddb/idbfactory-deleteDatabase-request-success.any.js.ini new file mode 100644 index 00000000000..799a4655975 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-deleteDatabase-request-success.any.js.ini @@ -0,0 +1,14 @@ +[idbfactory-deleteDatabase-request-success.any.serviceworker.html] + expected: ERROR + +[idbfactory-deleteDatabase-request-success.any.worker.html] + [IDBFactory deleteDatabase() request properties on success] + expected: FAIL + + +[idbfactory-deleteDatabase-request-success.any.sharedworker.html] + expected: ERROR + +[idbfactory-deleteDatabase-request-success.any.html] + [IDBFactory deleteDatabase() request properties on success] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbfactory-open-error-properties.any.js.ini b/tests/wpt/meta/indexeddb/idbfactory-open-error-properties.any.js.ini new file mode 100644 index 00000000000..8997940faea --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-open-error-properties.any.js.ini @@ -0,0 +1,13 @@ +[idbfactory-open-error-properties.any.html] + [Properties of error event from failed open()] + expected: FAIL + + +[idbfactory-open-error-properties.any.serviceworker.html] + expected: ERROR + +[idbfactory-open-error-properties.any.worker.html] + expected: CRASH + +[idbfactory-open-error-properties.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbfactory-open-opaque-origin.html.ini b/tests/wpt/meta/indexeddb/idbfactory-open-opaque-origin.html.ini new file mode 100644 index 00000000000..9eb8dc523dc --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-open-opaque-origin.html.ini @@ -0,0 +1,10 @@ +[idbfactory-open-opaque-origin.html] + expected: TIMEOUT + [IDBFactory.open() in sandboxed iframe should throw SecurityError] + expected: TIMEOUT + + [IDBFactory.open() in data URL dedicated workers should throw SecurityError] + expected: NOTRUN + + [IDBFactory.open() in data URL shared workers should throw SecurityError] + expected: NOTRUN diff --git a/tests/wpt/meta/indexeddb/idbfactory-open-request-error.any.js.ini b/tests/wpt/meta/indexeddb/idbfactory-open-request-error.any.js.ini new file mode 100644 index 00000000000..baeb69c16e4 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-open-request-error.any.js.ini @@ -0,0 +1,15 @@ +[idbfactory-open-request-error.any.worker.html] + [Properties of IDBOpenDBRequest during failed IDBFactory open()] + expected: FAIL + + +[idbfactory-open-request-error.any.sharedworker.html] + expected: ERROR + +[idbfactory-open-request-error.any.html] + [Properties of IDBOpenDBRequest during failed IDBFactory open()] + expected: FAIL + + +[idbfactory-open-request-error.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbfactory-open-request-success.any.js.ini b/tests/wpt/meta/indexeddb/idbfactory-open-request-success.any.js.ini new file mode 100644 index 00000000000..700401af9e6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-open-request-success.any.js.ini @@ -0,0 +1,15 @@ +[idbfactory-open-request-success.any.html] + [Properties of IDBOpenDBRequest during successful IDBFactory open()] + expected: FAIL + + +[idbfactory-open-request-success.any.serviceworker.html] + expected: ERROR + +[idbfactory-open-request-success.any.worker.html] + [Properties of IDBOpenDBRequest during successful IDBFactory open()] + expected: FAIL + + +[idbfactory-open-request-success.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbfactory-origin-isolation.html.ini b/tests/wpt/meta/indexeddb/idbfactory-origin-isolation.html.ini new file mode 100644 index 00000000000..f739a10befa --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory-origin-isolation.html.ini @@ -0,0 +1,3 @@ +[idbfactory-origin-isolation.html] + [Test to make sure that origins have separate locking schemes] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbfactory_cmp.any.js.ini b/tests/wpt/meta/indexeddb/idbfactory_cmp.any.js.ini new file mode 100644 index 00000000000..2d519aaac76 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory_cmp.any.js.ini @@ -0,0 +1,74 @@ +[idbfactory_cmp.any.serviceworker.html] + expected: ERROR + +[idbfactory_cmp.any.worker.html] + [IDBFactory.cmp() - compared keys return correct value] + expected: FAIL + + [IDBFactory.cmp() - null] + expected: FAIL + + [IDBFactory.cmp() - NaN] + expected: FAIL + + [Array vs. Binary] + expected: FAIL + + [Binary vs. String] + expected: FAIL + + [String vs. Date] + expected: FAIL + + [Date vs. Number] + expected: FAIL + + [Compare in unsigned octet values (in the range [0, 255\])] + expected: FAIL + + [Compare values of the same length] + expected: FAIL + + [Compare values of different lengths] + expected: FAIL + + [Compare when values in the range of their minimal length are the same] + expected: FAIL + + +[idbfactory_cmp.any.sharedworker.html] + expected: ERROR + +[idbfactory_cmp.any.html] + [IDBFactory.cmp() - compared keys return correct value] + expected: FAIL + + [IDBFactory.cmp() - null] + expected: FAIL + + [IDBFactory.cmp() - NaN] + expected: FAIL + + [Array vs. Binary] + expected: FAIL + + [Binary vs. String] + expected: FAIL + + [String vs. Date] + expected: FAIL + + [Date vs. Number] + expected: FAIL + + [Compare in unsigned octet values (in the range [0, 255\])] + expected: FAIL + + [Compare values of the same length] + expected: FAIL + + [Compare values of different lengths] + expected: FAIL + + [Compare when values in the range of their minimal length are the same] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbfactory_deleteDatabase.any.js.ini b/tests/wpt/meta/indexeddb/idbfactory_deleteDatabase.any.js.ini new file mode 100644 index 00000000000..293236541f0 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory_deleteDatabase.any.js.ini @@ -0,0 +1,33 @@ +[idbfactory_deleteDatabase.any.serviceworker.html] + expected: ERROR + +[idbfactory_deleteDatabase.any.html] + [deleteDatabase() request should have no source] + expected: FAIL + + [Result of the deleteDatabase() request is set to undefined.] + expected: FAIL + + [The deleteDatabase() request's success event is an IDBVersionChangeEvent.] + expected: FAIL + + [Delete an existing database - Test events opening a second database when one connection is open already] + expected: FAIL + + +[idbfactory_deleteDatabase.any.worker.html] + [deleteDatabase() request should have no source] + expected: FAIL + + [Result of the deleteDatabase() request is set to undefined.] + expected: FAIL + + [The deleteDatabase() request's success event is an IDBVersionChangeEvent.] + expected: FAIL + + [Delete an existing database - Test events opening a second database when one connection is open already] + expected: FAIL + + +[idbfactory_deleteDatabase.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbfactory_open.any.js.ini b/tests/wpt/meta/indexeddb/idbfactory_open.any.js.ini new file mode 100644 index 00000000000..86b4695e815 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbfactory_open.any.js.ini @@ -0,0 +1,46 @@ +[idbfactory_open.any.serviceworker.html] + expected: ERROR + +[idbfactory_open.any.html] + [IDBFactory.open() - database 'name' and 'version' are correctly set] + expected: FAIL + + [IDBFactory.open() - no version opens current database] + expected: FAIL + + [IDBFactory.open() - new database has default version] + expected: FAIL + + [IDBFactory.open() - new database is empty] + expected: FAIL + + [IDBFactory.open() - open database with a lower version than current] + expected: FAIL + + [IDBFactory.open() - open database with a higher version than current] + expected: FAIL + + [IDBFactory.open() - error in version change transaction aborts open] + expected: FAIL + + [Calling open() with version argument 1.5 should not throw.] + expected: FAIL + + [Calling open() with version argument 9007199254740991 should not throw.] + expected: FAIL + + [Calling open() with version argument undefined should not throw.] + expected: FAIL + + [IDBFactory.open() - error in upgradeneeded resets db] + expected: FAIL + + [IDBFactory.open() - second open's transaction is available to get objectStores] + expected: FAIL + + +[idbfactory_open.any.sharedworker.html] + expected: ERROR + +[idbfactory_open.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbindex-cross-realm-methods.html.ini b/tests/wpt/meta/indexeddb/idbindex-cross-realm-methods.html.ini new file mode 100644 index 00000000000..e0076b52a46 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-cross-realm-methods.html.ini @@ -0,0 +1,2 @@ +[idbindex-cross-realm-methods.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex-getAll-enforcerange.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-getAll-enforcerange.any.js.ini new file mode 100644 index 00000000000..117fb96e394 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-getAll-enforcerange.any.js.ini @@ -0,0 +1,15 @@ +[idbindex-getAll-enforcerange.any.sharedworker.html] + expected: ERROR + +[idbindex-getAll-enforcerange.any.worker.html] + [IDBIndex.getAll() should enforce valid range constraints.] + expected: FAIL + + +[idbindex-getAll-enforcerange.any.html] + [IDBIndex.getAll() should enforce valid range constraints.] + expected: FAIL + + +[idbindex-getAll-enforcerange.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex-getAllKeys-enforcerange.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-getAllKeys-enforcerange.any.js.ini new file mode 100644 index 00000000000..b32e0d369dc --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-getAllKeys-enforcerange.any.js.ini @@ -0,0 +1,14 @@ +[idbindex-getAllKeys-enforcerange.any.serviceworker.html] + expected: ERROR + +[idbindex-getAllKeys-enforcerange.any.worker.html] + [IDBIndex.getAllKeys() should enforce valid range constraints.] + expected: FAIL + + +[idbindex-getAllKeys-enforcerange.any.sharedworker.html] + expected: ERROR + +[idbindex-getAllKeys-enforcerange.any.html] + [IDBIndex.getAllKeys() should enforce valid range constraints.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex-multientry.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-multientry.any.js.ini new file mode 100644 index 00000000000..5f8a21a7589 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-multientry.any.js.ini @@ -0,0 +1,18 @@ +[idbindex-multientry.any.worker.html] + expected: CRASH + +[idbindex-multientry.any.serviceworker.html] + expected: ERROR + +[idbindex-multientry.any.sharedworker.html] + expected: ERROR + +[idbindex-multientry.any.html] + [Array keyPath with multiEntry] + expected: FAIL + + [A 1000 entry multiEntry array] + expected: FAIL + + [Adding keys] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex-objectStore-SameObject.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-objectStore-SameObject.any.js.ini new file mode 100644 index 00000000000..1ac3dd05d1b --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-objectStore-SameObject.any.js.ini @@ -0,0 +1,14 @@ +[idbindex-objectStore-SameObject.any.worker.html] + [IDBIndex.objectStore should return same object each time.] + expected: FAIL + + +[idbindex-objectStore-SameObject.any.serviceworker.html] + expected: ERROR + +[idbindex-objectStore-SameObject.any.sharedworker.html] + expected: ERROR + +[idbindex-objectStore-SameObject.any.html] + [IDBIndex.objectStore should return same object each time.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex-query-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-query-exception-order.any.js.ini new file mode 100644 index 00000000000..331afb4a9bf --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-query-exception-order.any.js.ini @@ -0,0 +1,81 @@ +[idbindex-query-exception-order.any.sharedworker.html] + expected: ERROR + +[idbindex-query-exception-order.any.html] + [IDBIndex.get exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.get exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.getAll exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.getAll exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.getAllKeys exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.getAllKeys exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.count exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.count exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.openCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.openCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.openKeyCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.openKeyCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + +[idbindex-query-exception-order.any.worker.html] + [IDBIndex.get exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.get exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.getAll exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.getAll exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.getAllKeys exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.getAllKeys exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.count exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.count exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.openCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.openCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBIndex.openKeyCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBIndex.openKeyCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + +[idbindex-query-exception-order.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex-rename-abort.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-rename-abort.any.js.ini new file mode 100644 index 00000000000..84c7836b40f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-rename-abort.any.js.ini @@ -0,0 +1,20 @@ +[idbindex-rename-abort.any.worker.html] + [IndexedDB index rename in aborted transaction] + expected: FAIL + + [IndexedDB index creation and rename in an aborted transaction] + expected: FAIL + + +[idbindex-rename-abort.any.sharedworker.html] + expected: ERROR + +[idbindex-rename-abort.any.serviceworker.html] + expected: ERROR + +[idbindex-rename-abort.any.html] + [IndexedDB index rename in aborted transaction] + expected: FAIL + + [IndexedDB index creation and rename in an aborted transaction] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex-rename-errors.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-rename-errors.any.js.ini new file mode 100644 index 00000000000..eaee7353032 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-rename-errors.any.js.ini @@ -0,0 +1,45 @@ +[idbindex-rename-errors.any.serviceworker.html] + expected: ERROR + +[idbindex-rename-errors.any.html] + [IndexedDB deleted index rename throws] + expected: FAIL + + [IndexedDB index rename throws in a readonly transaction] + expected: FAIL + + [IndexedDB index rename throws in a readwrite transaction] + expected: FAIL + + [IndexedDB index rename throws in an inactive transaction] + expected: FAIL + + [IndexedDB index rename to the name of another index throws] + expected: FAIL + + [IndexedDB index rename handles exceptions when stringifying names] + expected: FAIL + + +[idbindex-rename-errors.any.worker.html] + [IndexedDB deleted index rename throws] + expected: FAIL + + [IndexedDB index rename throws in a readonly transaction] + expected: FAIL + + [IndexedDB index rename throws in a readwrite transaction] + expected: FAIL + + [IndexedDB index rename throws in an inactive transaction] + expected: FAIL + + [IndexedDB index rename to the name of another index throws] + expected: FAIL + + [IndexedDB index rename handles exceptions when stringifying names] + expected: FAIL + + +[idbindex-rename-errors.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex-rename.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-rename.any.js.ini new file mode 100644 index 00000000000..897b124915b --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-rename.any.js.ini @@ -0,0 +1,62 @@ +[idbindex-rename.any.serviceworker.html] + expected: ERROR + +[idbindex-rename.any.html] + [IndexedDB index rename in new transaction] + expected: FAIL + + [IndexedDB index rename in the transaction where it is created] + expected: FAIL + + [IndexedDB index rename to the same name succeeds] + expected: FAIL + + [IndexedDB index rename to the name of a deleted index succeeds] + expected: FAIL + + [IndexedDB index swapping via renames succeeds] + expected: FAIL + + [IndexedDB index rename stringifies non-string names] + expected: FAIL + + [IndexedDB index can be renamed to ""] + expected: FAIL + + [IndexedDB index can be renamed to "\\u0000"] + expected: FAIL + + [IndexedDB index can be renamed to "\\uDC00\\uD800"] + expected: FAIL + + +[idbindex-rename.any.sharedworker.html] + expected: ERROR + +[idbindex-rename.any.worker.html] + [IndexedDB index rename in new transaction] + expected: FAIL + + [IndexedDB index rename in the transaction where it is created] + expected: FAIL + + [IndexedDB index rename to the same name succeeds] + expected: FAIL + + [IndexedDB index rename to the name of a deleted index succeeds] + expected: FAIL + + [IndexedDB index swapping via renames succeeds] + expected: FAIL + + [IndexedDB index rename stringifies non-string names] + expected: FAIL + + [IndexedDB index can be renamed to ""] + expected: FAIL + + [IndexedDB index can be renamed to "\\u0000"] + expected: FAIL + + [IndexedDB index can be renamed to "\\uDC00\\uD800"] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex-request-source.any.js.ini b/tests/wpt/meta/indexeddb/idbindex-request-source.any.js.ini new file mode 100644 index 00000000000..ad3e362c989 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex-request-source.any.js.ini @@ -0,0 +1,51 @@ +[idbindex-request-source.any.html] + [The source of the request from index => index.get(0) is the index itself] + expected: FAIL + + [The source of the request from index => index.getKey(0) is the index itself] + expected: FAIL + + [The source of the request from index => index.getAll() is the index itself] + expected: FAIL + + [The source of the request from index => index.getAllKeys() is the index itself] + expected: FAIL + + [The source of the request from index => index.count() is the index itself] + expected: FAIL + + [The source of the request from index => index.openCursor() is the index itself] + expected: FAIL + + [The source of the request from index => index.openKeyCursor() is the index itself] + expected: FAIL + + +[idbindex-request-source.any.worker.html] + [The source of the request from index => index.get(0) is the index itself] + expected: FAIL + + [The source of the request from index => index.getKey(0) is the index itself] + expected: FAIL + + [The source of the request from index => index.getAll() is the index itself] + expected: FAIL + + [The source of the request from index => index.getAllKeys() is the index itself] + expected: FAIL + + [The source of the request from index => index.count() is the index itself] + expected: FAIL + + [The source of the request from index => index.openCursor() is the index itself] + expected: FAIL + + [The source of the request from index => index.openKeyCursor() is the index itself] + expected: FAIL + + +[idbindex-request-source.any.serviceworker.html] + expected: ERROR + +[idbindex-request-source.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex_count.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_count.any.js.ini new file mode 100644 index 00000000000..01ece0e5014 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_count.any.js.ini @@ -0,0 +1,21 @@ +[idbindex_count.any.worker.html] + expected: CRASH + +[idbindex_count.any.sharedworker.html] + expected: ERROR + +[idbindex_count.any.serviceworker.html] + expected: ERROR + +[idbindex_count.any.html] + [count() returns the number of records in the index] + expected: FAIL + + [count() returns the number of records that have keys within the range] + expected: FAIL + + [count() returns the number of records that have keys with the key] + expected: FAIL + + [count() throws DataError when using invalid key] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex_get.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_get.any.js.ini new file mode 100644 index 00000000000..f64b4b3f2a2 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_get.any.js.ini @@ -0,0 +1,34 @@ +[idbindex_get.any.serviceworker.html] + expected: ERROR + +[idbindex_get.any.sharedworker.html] + expected: ERROR + +[idbindex_get.any.html] + [get() returns the record] + expected: FAIL + + [get() returns the record where the index contains duplicate values] + expected: FAIL + + [get() attempts to retrieve a record that does not exist] + expected: FAIL + + [get() returns the record with the first key in the range] + expected: FAIL + + [get() throws DataError when using invalid key] + expected: FAIL + + [get() throws InvalidStateError when the index is deleted] + expected: FAIL + + [get() throws TransactionInactiveError on aborted transaction] + expected: FAIL + + [get() throws InvalidStateError on index deleted by aborted upgrade] + expected: FAIL + + +[idbindex_get.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbindex_getAll.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_getAll.any.js.ini new file mode 100644 index 00000000000..7bf18f8d5e8 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_getAll.any.js.ini @@ -0,0 +1,47 @@ +[idbindex_getAll.any.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Empty object store] + expected: FAIL + + [Get all] + expected: FAIL + + [Get all with generated keys] + expected: FAIL + + [Get all with large values] + expected: FAIL + + [maxCount=10] + expected: FAIL + + +[idbindex_getAll.any.worker.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Empty object store] + expected: FAIL + + [Get all] + expected: FAIL + + [Get all with generated keys] + expected: FAIL + + [Get all with large values] + expected: FAIL + + [maxCount=10] + expected: FAIL + + +[idbindex_getAll.any.sharedworker.html] + expected: ERROR + +[idbindex_getAll.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex_getAllKeys.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_getAllKeys.any.js.ini new file mode 100644 index 00000000000..f47483f1eb2 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_getAllKeys.any.js.ini @@ -0,0 +1,41 @@ +[idbindex_getAllKeys.any.serviceworker.html] + expected: ERROR + +[idbindex_getAllKeys.any.worker.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Empty object store] + expected: FAIL + + [Get all keys] + expected: FAIL + + [Get all generated keys] + expected: FAIL + + [maxCount=10] + expected: FAIL + + +[idbindex_getAllKeys.any.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Empty object store] + expected: FAIL + + [Get all keys] + expected: FAIL + + [Get all generated keys] + expected: FAIL + + [maxCount=10] + expected: FAIL + + +[idbindex_getAllKeys.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex_getAllRecords.tentative.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_getAllRecords.tentative.any.js.ini new file mode 100644 index 00000000000..a59f7543f19 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_getAllRecords.tentative.any.js.ini @@ -0,0 +1,46 @@ +[idbindex_getAllRecords.tentative.any.sharedworker.html] + expected: ERROR + +[idbindex_getAllRecords.tentative.any.worker.html] + expected: ERROR + [Single item] + expected: FAIL + + [Empty index] + expected: FAIL + + [Get all records] + expected: FAIL + + [Get all records with empty options] + expected: FAIL + + [Get all records with large value] + expected: FAIL + + [Count] + expected: FAIL + + +[idbindex_getAllRecords.tentative.any.serviceworker.html] + expected: ERROR + +[idbindex_getAllRecords.tentative.any.html] + expected: ERROR + [Single item] + expected: FAIL + + [Empty index] + expected: FAIL + + [Get all records] + expected: FAIL + + [Get all records with empty options] + expected: FAIL + + [Get all records with large value] + expected: FAIL + + [Count] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex_getKey.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_getKey.any.js.ini new file mode 100644 index 00000000000..7e7548e0387 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_getKey.any.js.ini @@ -0,0 +1,34 @@ +[idbindex_getKey.any.html] + [getKey() returns the record's primary key] + expected: FAIL + + [getKey() returns the record's primary key where the index contains duplicate values] + expected: FAIL + + [getKey() attempt to retrieve the primary key of a record that doesn't exist] + expected: FAIL + + [getKey() returns the key of the first record within the range] + expected: FAIL + + [getKey() throws DataError when using invalid key] + expected: FAIL + + [getKey() throws InvalidStateError when the index is deleted] + expected: FAIL + + [getKey() throws TransactionInactiveError on aborted transaction] + expected: FAIL + + [getKey() throws InvalidStateError on index deleted by aborted upgrade] + expected: FAIL + + +[idbindex_getKey.any.serviceworker.html] + expected: ERROR + +[idbindex_getKey.any.worker.html] + expected: CRASH + +[idbindex_getKey.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex_indexNames.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_indexNames.any.js.ini new file mode 100644 index 00000000000..38cb5762d1a --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_indexNames.any.js.ini @@ -0,0 +1,13 @@ +[idbindex_indexNames.any.html] + [Verify IDBObjectStore.indexNames property] + expected: FAIL + + +[idbindex_indexNames.any.worker.html] + expected: CRASH + +[idbindex_indexNames.any.serviceworker.html] + expected: ERROR + +[idbindex_indexNames.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex_keyPath.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_keyPath.any.js.ini new file mode 100644 index 00000000000..4c3e3e60640 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_keyPath.any.js.ini @@ -0,0 +1,20 @@ +[idbindex_keyPath.any.worker.html] + [IDBIndex's keyPath attribute returns the same object.] + expected: FAIL + + [IDBIndex's keyPath array with a single value] + expected: FAIL + + [IDBIndex's keyPath array with multiple values] + expected: FAIL + + +[idbindex_keyPath.any.html] + [IDBIndex's keyPath attribute returns the same object.] + expected: FAIL + + [IDBIndex's keyPath array with a single value] + expected: FAIL + + [IDBIndex's keyPath array with multiple values] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbindex_openCursor.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_openCursor.any.js.ini new file mode 100644 index 00000000000..2630aff066f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_openCursor.any.js.ini @@ -0,0 +1,19 @@ +[idbindex_openCursor.any.sharedworker.html] + expected: ERROR + +[idbindex_openCursor.any.worker.html] + expected: CRASH + +[idbindex_openCursor.any.html] + [If the index is deleted, throw InvalidStateError] + expected: FAIL + + [If the transaction has been aborted, throw TransactionInactiveError] + expected: FAIL + + [If the index is deleted by an aborted upgrade, throw InvalidStateError] + expected: FAIL + + +[idbindex_openCursor.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex_openKeyCursor.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_openKeyCursor.any.js.ini new file mode 100644 index 00000000000..5b906474c42 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_openKeyCursor.any.js.ini @@ -0,0 +1,22 @@ +[idbindex_openKeyCursor.any.worker.html] + expected: CRASH + +[idbindex_openKeyCursor.any.html] + [Throw DataError when using a invalid key] + expected: FAIL + + [Throw InvalidStateError when the index is deleted] + expected: FAIL + + [Throw TransactionInactiveError on aborted transaction] + expected: FAIL + + [Throw InvalidStateError on index deleted by aborted upgrade] + expected: FAIL + + +[idbindex_openKeyCursor.any.sharedworker.html] + expected: ERROR + +[idbindex_openKeyCursor.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbindex_reverse_cursor.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_reverse_cursor.any.js.ini new file mode 100644 index 00000000000..8f8df44c466 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_reverse_cursor.any.js.ini @@ -0,0 +1,15 @@ +[idbindex_reverse_cursor.any.html] + [Reverse cursor sees update from separate transactions.] + expected: FAIL + + [Reverse cursor sees in-transaction update.] + expected: FAIL + + +[idbindex_reverse_cursor.any.worker.html] + [Reverse cursor sees update from separate transactions.] + expected: FAIL + + [Reverse cursor sees in-transaction update.] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/idbindex_tombstones.any.js.ini b/tests/wpt/meta/indexeddb/idbindex_tombstones.any.js.ini new file mode 100644 index 00000000000..8cf477dc390 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbindex_tombstones.any.js.ini @@ -0,0 +1,26 @@ +[idbindex_tombstones.any.worker.html] + [Forward iteration over an index in a readonly transaction] + expected: FAIL + + [Backward iteration over an index in a readonly transaction] + expected: FAIL + + [Forward iteration over an index in a readwrite transaction] + expected: FAIL + + [Backward iteration over an index in a readwrite transaction] + expected: FAIL + + +[idbindex_tombstones.any.html] + [Forward iteration over an index in a readonly transaction] + expected: FAIL + + [Backward iteration over an index in a readonly transaction] + expected: FAIL + + [Forward iteration over an index in a readwrite transaction] + expected: FAIL + + [Backward iteration over an index in a readwrite transaction] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbkeyrange-includes.any.js.ini b/tests/wpt/meta/indexeddb/idbkeyrange-includes.any.js.ini new file mode 100644 index 00000000000..cff7de8bb31 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbkeyrange-includes.any.js.ini @@ -0,0 +1,75 @@ +[idbkeyrange-includes.any.worker.html] + [IDBKeyRange.includes() with invalid input] + expected: FAIL + + [IDBKeyRange.includes() with a closed range] + expected: FAIL + + [IDBKeyRange.includes() with an open range] + expected: FAIL + + [IDBKeyRange.includes() with a lower-open upper-closed range] + expected: FAIL + + [IDBKeyRange.includes() with a lower-closed upper-open range] + expected: FAIL + + [IDBKeyRange.includes() with an only range] + expected: FAIL + + [IDBKeyRange.includes() with an closed lower-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with an open lower-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with an closed upper-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with an open upper-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with non-numeric keys] + expected: FAIL + + +[idbkeyrange-includes.any.sharedworker.html] + expected: ERROR + +[idbkeyrange-includes.any.html] + [IDBKeyRange.includes() with invalid input] + expected: FAIL + + [IDBKeyRange.includes() with a closed range] + expected: FAIL + + [IDBKeyRange.includes() with an open range] + expected: FAIL + + [IDBKeyRange.includes() with a lower-open upper-closed range] + expected: FAIL + + [IDBKeyRange.includes() with a lower-closed upper-open range] + expected: FAIL + + [IDBKeyRange.includes() with an only range] + expected: FAIL + + [IDBKeyRange.includes() with an closed lower-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with an open lower-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with an closed upper-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with an open upper-bounded range] + expected: FAIL + + [IDBKeyRange.includes() with non-numeric keys] + expected: FAIL + + +[idbkeyrange-includes.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbkeyrange.any.js.ini b/tests/wpt/meta/indexeddb/idbkeyrange.any.js.ini new file mode 100644 index 00000000000..e5899468fce --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbkeyrange.any.js.ini @@ -0,0 +1,68 @@ +[idbkeyrange.any.serviceworker.html] + expected: ERROR + +[idbkeyrange.any.worker.html] + [IDBKeyRange.only() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.only() - throws on invalid keys] + expected: FAIL + + [IDBKeyRange.lowerBound() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.lowerBound() - 'open' parameter has correct default set] + expected: FAIL + + [IDBKeyRange.lowerBound() - throws on invalid keys] + expected: FAIL + + [IDBKeyRange.upperBound() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.upperBound() - 'open' parameter has correct default set] + expected: FAIL + + [IDBKeyRange.upperBound() - throws on invalid keys] + expected: FAIL + + [IDBKeyRange.bound() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.bound() - 'lowerOpen' and 'upperOpen' parameters have correct defaults set] + expected: FAIL + + +[idbkeyrange.any.sharedworker.html] + expected: ERROR + +[idbkeyrange.any.html] + [IDBKeyRange.only() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.only() - throws on invalid keys] + expected: FAIL + + [IDBKeyRange.lowerBound() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.lowerBound() - 'open' parameter has correct default set] + expected: FAIL + + [IDBKeyRange.lowerBound() - throws on invalid keys] + expected: FAIL + + [IDBKeyRange.upperBound() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.upperBound() - 'open' parameter has correct default set] + expected: FAIL + + [IDBKeyRange.upperBound() - throws on invalid keys] + expected: FAIL + + [IDBKeyRange.bound() - returns an IDBKeyRange and the properties are set correctly] + expected: FAIL + + [IDBKeyRange.bound() - 'lowerOpen' and 'upperOpen' parameters have correct defaults set] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbkeyrange_incorrect.any.js.ini b/tests/wpt/meta/indexeddb/idbkeyrange_incorrect.any.js.ini new file mode 100644 index 00000000000..c851cef80ce --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbkeyrange_incorrect.any.js.ini @@ -0,0 +1,44 @@ +[idbkeyrange_incorrect.any.sharedworker.html] + expected: ERROR + +[idbkeyrange_incorrect.any.serviceworker.html] + expected: ERROR + +[idbkeyrange_incorrect.any.worker.html] + [IDBKeyRange.bound() - bound requires more than 0 arguments.] + expected: FAIL + + [IDBKeyRange.bound(null, null) - null parameters are incorrect.] + expected: FAIL + + [IDBKeyRange.bound(1, null / null, 1) - null parameter is incorrect.] + expected: FAIL + + [IDBKeyRange.bound(lower, upper / lower > upper) - lower' is greater than 'upper'.] + expected: FAIL + + [IDBKeyRange.bound(DOMString/Date/Array, 1) - A DOMString, Date and Array are greater than a float.] + expected: FAIL + + [IDBKeyRange.bound(true, 1) - boolean is not a valid key type.] + expected: FAIL + + +[idbkeyrange_incorrect.any.html] + [IDBKeyRange.bound() - bound requires more than 0 arguments.] + expected: FAIL + + [IDBKeyRange.bound(null, null) - null parameters are incorrect.] + expected: FAIL + + [IDBKeyRange.bound(1, null / null, 1) - null parameter is incorrect.] + expected: FAIL + + [IDBKeyRange.bound(lower, upper / lower > upper) - lower' is greater than 'upper'.] + expected: FAIL + + [IDBKeyRange.bound(DOMString/Date/Array, 1) - A DOMString, Date and Array are greater than a float.] + expected: FAIL + + [IDBKeyRange.bound(true, 1) - boolean is not a valid key type.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-add-put-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-add-put-exception-order.any.js.ini new file mode 100644 index 00000000000..bc092c26a61 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-add-put-exception-order.any.js.ini @@ -0,0 +1,45 @@ +[idbobjectstore-add-put-exception-order.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-add-put-exception-order.any.worker.html] + [IDBObjectStore.put exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.put exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBObjectStore.put exception order: ReadOnlyError vs. DataError] + expected: FAIL + + [IDBObjectStore.add exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.add exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBObjectStore.add exception order: ReadOnlyError vs. DataError] + expected: FAIL + + +[idbobjectstore-add-put-exception-order.any.html] + [IDBObjectStore.put exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.put exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBObjectStore.put exception order: ReadOnlyError vs. DataError] + expected: FAIL + + [IDBObjectStore.add exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.add exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBObjectStore.add exception order: ReadOnlyError vs. DataError] + expected: FAIL + + +[idbobjectstore-add-put-exception-order.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-clear-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-clear-exception-order.any.js.ini new file mode 100644 index 00000000000..ff5475303b1 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-clear-exception-order.any.js.ini @@ -0,0 +1,21 @@ +[idbobjectstore-clear-exception-order.any.worker.html] + [IDBObjectStore.clear exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.clear exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + +[idbobjectstore-clear-exception-order.any.html] + [IDBObjectStore.clear exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.clear exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + +[idbobjectstore-clear-exception-order.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-clear-exception-order.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-cross-realm-methods.html.ini b/tests/wpt/meta/indexeddb/idbobjectstore-cross-realm-methods.html.ini new file mode 100644 index 00000000000..0c15738705b --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-cross-realm-methods.html.ini @@ -0,0 +1,2 @@ +[idbobjectstore-cross-realm-methods.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-delete-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-delete-exception-order.any.js.ini new file mode 100644 index 00000000000..7b33a0df755 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-delete-exception-order.any.js.ini @@ -0,0 +1,26 @@ +[idbobjectstore-delete-exception-order.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-delete-exception-order.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-delete-exception-order.any.html] + [IDBObjectStore.delete exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.delete exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBObjectStore.delete exception order: ReadOnlyError vs. DataError] + expected: FAIL + + +[idbobjectstore-delete-exception-order.any.worker.html] + [IDBObjectStore.delete exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.delete exception order: TransactionInactiveError vs. ReadOnlyError] + expected: FAIL + + [IDBObjectStore.delete exception order: ReadOnlyError vs. DataError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-deleteIndex-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-deleteIndex-exception-order.any.js.ini new file mode 100644 index 00000000000..5ef759f02e3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-deleteIndex-exception-order.any.js.ini @@ -0,0 +1,27 @@ +[idbobjectstore-deleteIndex-exception-order.any.worker.html] + [IDBObjectStore.deleteIndex exception order: InvalidStateError #1 vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.deleteIndex exception order: InvalidStateError #2 vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.deleteIndex exception order: TransactionInactiveError vs. NotFoundError] + expected: FAIL + + +[idbobjectstore-deleteIndex-exception-order.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-deleteIndex-exception-order.any.html] + [IDBObjectStore.deleteIndex exception order: InvalidStateError #1 vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.deleteIndex exception order: InvalidStateError #2 vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.deleteIndex exception order: TransactionInactiveError vs. NotFoundError] + expected: FAIL + + +[idbobjectstore-deleteIndex-exception-order.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-getAll-enforcerange.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-getAll-enforcerange.any.js.ini new file mode 100644 index 00000000000..0c6e9231888 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-getAll-enforcerange.any.js.ini @@ -0,0 +1,15 @@ +[idbobjectstore-getAll-enforcerange.any.html] + [IDBObjectStore.getAll() uses [EnforceRange\]] + expected: FAIL + + +[idbobjectstore-getAll-enforcerange.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-getAll-enforcerange.any.worker.html] + [IDBObjectStore.getAll() uses [EnforceRange\]] + expected: FAIL + + +[idbobjectstore-getAll-enforcerange.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-getAllKeys-enforcerange.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-getAllKeys-enforcerange.any.js.ini new file mode 100644 index 00000000000..9fac0458320 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-getAllKeys-enforcerange.any.js.ini @@ -0,0 +1,14 @@ +[idbobjectstore-getAllKeys-enforcerange.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-getAllKeys-enforcerange.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-getAllKeys-enforcerange.any.html] + [IDBObjectStore.getAllKeys() uses [EnforceRange\]] + expected: FAIL + + +[idbobjectstore-getAllKeys-enforcerange.any.worker.html] + [IDBObjectStore.getAllKeys() uses [EnforceRange\]] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-index-finished.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-index-finished.any.js.ini new file mode 100644 index 00000000000..d2a2dd5976f --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-index-finished.any.js.ini @@ -0,0 +1,14 @@ +[idbobjectstore-index-finished.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-index-finished.any.worker.html] + [IDBObjectStore index() behavior when transaction is finished] + expected: FAIL + + +[idbobjectstore-index-finished.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-index-finished.any.html] + [IDBObjectStore index() behavior when transaction is finished] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-query-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-query-exception-order.any.js.ini new file mode 100644 index 00000000000..5c640488f07 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-query-exception-order.any.js.ini @@ -0,0 +1,80 @@ +[idbobjectstore-query-exception-order.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-query-exception-order.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-query-exception-order.any.html] + [IDBObjectStore.get exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.get exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.getAll exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.getAll exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.getAllKeys exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.getAllKeys exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.count exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.count exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.openCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.openCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.openKeyCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.openKeyCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + +[idbobjectstore-query-exception-order.any.worker.html] + [IDBObjectStore.get exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.get exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.getAll exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.getAll exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.getAllKeys exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.getAllKeys exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.count exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.count exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.openCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.openCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL + + [IDBObjectStore.openKeyCursor exception order: InvalidStateError vs. TransactionInactiveError] + expected: FAIL + + [IDBObjectStore.openKeyCursor exception order: TransactionInactiveError vs. DataError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-rename-abort.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-rename-abort.any.js.ini new file mode 100644 index 00000000000..4cccc41c006 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-rename-abort.any.js.ini @@ -0,0 +1,21 @@ +[idbobjectstore-rename-abort.any.worker.html] + [IndexedDB object store rename in aborted transaction] + expected: FAIL + + [IndexedDB object store creation and rename in an aborted transaction] + expected: FAIL + + +[idbobjectstore-rename-abort.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-rename-abort.any.html] + [IndexedDB object store rename in aborted transaction] + expected: FAIL + + [IndexedDB object store creation and rename in an aborted transaction] + expected: FAIL + + +[idbobjectstore-rename-abort.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-rename-errors.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-rename-errors.any.js.ini new file mode 100644 index 00000000000..17b7ab4a866 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-rename-errors.any.js.ini @@ -0,0 +1,44 @@ +[idbobjectstore-rename-errors.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-rename-errors.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-rename-errors.any.html] + [IndexedDB deleted object store rename throws] + expected: FAIL + + [IndexedDB object store rename throws in a readonly transaction] + expected: FAIL + + [IndexedDB object store rename throws in a readwrite transaction] + expected: FAIL + + [IndexedDB object store rename throws in an inactive transaction] + expected: FAIL + + [IndexedDB object store rename to the name of another store throws] + expected: FAIL + + [IndexedDB object store rename handles exceptions when stringifying names] + expected: FAIL + + +[idbobjectstore-rename-errors.any.worker.html] + [IndexedDB deleted object store rename throws] + expected: FAIL + + [IndexedDB object store rename throws in a readonly transaction] + expected: FAIL + + [IndexedDB object store rename throws in a readwrite transaction] + expected: FAIL + + [IndexedDB object store rename throws in an inactive transaction] + expected: FAIL + + [IndexedDB object store rename to the name of another store throws] + expected: FAIL + + [IndexedDB object store rename handles exceptions when stringifying names] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-rename-store.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-rename-store.any.js.ini new file mode 100644 index 00000000000..1b1d93774bd --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-rename-store.any.js.ini @@ -0,0 +1,75 @@ +[idbobjectstore-rename-store.any.html] + [IndexedDB object store rename in new transaction] + expected: FAIL + + [IndexedDB object store rename in the transaction where it is created] + expected: FAIL + + [IndexedDB object store rename covers index] + expected: FAIL + + [IndexedDB object store rename covers key generator] + expected: FAIL + + [IndexedDB object store rename to the same name succeeds] + expected: FAIL + + [IndexedDB object store rename to the name of a deleted store succeeds] + expected: FAIL + + [IndexedDB object store swapping via renames succeeds] + expected: FAIL + + [IndexedDB object store rename stringifies non-string names] + expected: FAIL + + [IndexedDB object store can be renamed to ""] + expected: FAIL + + [IndexedDB object store can be renamed to "\\u0000"] + expected: FAIL + + [IndexedDB object store can be renamed to "\\uDC00\\uD800"] + expected: FAIL + + +[idbobjectstore-rename-store.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-rename-store.any.worker.html] + [IndexedDB object store rename in new transaction] + expected: FAIL + + [IndexedDB object store rename in the transaction where it is created] + expected: FAIL + + [IndexedDB object store rename covers index] + expected: FAIL + + [IndexedDB object store rename covers key generator] + expected: FAIL + + [IndexedDB object store rename to the same name succeeds] + expected: FAIL + + [IndexedDB object store rename to the name of a deleted store succeeds] + expected: FAIL + + [IndexedDB object store swapping via renames succeeds] + expected: FAIL + + [IndexedDB object store rename stringifies non-string names] + expected: FAIL + + [IndexedDB object store can be renamed to ""] + expected: FAIL + + [IndexedDB object store can be renamed to "\\u0000"] + expected: FAIL + + [IndexedDB object store can be renamed to "\\uDC00\\uD800"] + expected: FAIL + + +[idbobjectstore-rename-store.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-request-source.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-request-source.any.js.ini new file mode 100644 index 00000000000..eaffe286fbf --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-request-source.any.js.ini @@ -0,0 +1,74 @@ +[idbobjectstore-request-source.any.worker.html] + [The source of the request from store => store.put(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.add(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.delete(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.clear() is the object store itself] + expected: FAIL + + [The source of the request from store => store.get(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.getKey(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.getAll() is the object store itself] + expected: FAIL + + [The source of the request from store => store.getAllKeys() is the object store itself] + expected: FAIL + + [The source of the request from store => store.count() is the object store itself] + expected: FAIL + + [The source of the request from store => store.openCursor() is the object store itself] + expected: FAIL + + [The source of the request from store => store.openKeyCursor() is the object store itself] + expected: FAIL + + +[idbobjectstore-request-source.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-request-source.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-request-source.any.html] + [The source of the request from store => store.put(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.add(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.delete(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.clear() is the object store itself] + expected: FAIL + + [The source of the request from store => store.get(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.getKey(0) is the object store itself] + expected: FAIL + + [The source of the request from store => store.getAll() is the object store itself] + expected: FAIL + + [The source of the request from store => store.getAllKeys() is the object store itself] + expected: FAIL + + [The source of the request from store => store.count() is the object store itself] + expected: FAIL + + [The source of the request from store => store.openCursor() is the object store itself] + expected: FAIL + + [The source of the request from store => store.openKeyCursor() is the object store itself] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore-transaction-SameObject.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore-transaction-SameObject.any.js.ini new file mode 100644 index 00000000000..bb1460af820 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore-transaction-SameObject.any.js.ini @@ -0,0 +1,14 @@ +[idbobjectstore-transaction-SameObject.any.serviceworker.html] + expected: ERROR + +[idbobjectstore-transaction-SameObject.any.sharedworker.html] + expected: ERROR + +[idbobjectstore-transaction-SameObject.any.worker.html] + [IDBObjectStore.transaction [SameObject\]] + expected: FAIL + + +[idbobjectstore-transaction-SameObject.any.html] + [IDBObjectStore.transaction [SameObject\]] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_add.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_add.any.js.ini new file mode 100644 index 00000000000..5d5e78c6d85 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_add.any.js.ini @@ -0,0 +1,57 @@ +[idbobjectstore_add.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_add.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_add.any.worker.html] + expected: CRASH + +[idbobjectstore_add.any.html] + [add() with an inline key] + expected: FAIL + + [add() with an out-of-line key] + expected: FAIL + + [add() record with same key already exists] + expected: FAIL + + [add() where an index has unique:true specified] + expected: FAIL + + [add() object store's key path is an object attribute] + expected: FAIL + + [add() autoIncrement and inline keys] + expected: FAIL + + [add() autoIncrement and out-of-line keys] + expected: FAIL + + [Object store has autoIncrement:true and the key path is an object attribute] + expected: FAIL + + [Attempt to 'add()' a record that does not meet the constraints of an object store's inline key requirements] + expected: FAIL + + [Attempt to call 'add()' without a key parameter when the object store uses out-of-line keys] + expected: FAIL + + [Attempt to 'add()' a record where the record's key does not meet the constraints of a valid key] + expected: FAIL + + [Attempt to 'add()' a record where the record's in-line key is not defined] + expected: FAIL + + [Attempt to 'add()' a record where the out of line key provided does not meet the constraints of a valid key] + expected: FAIL + + [add() a record where a value being indexed does not meet the constraints of a valid key] + expected: FAIL + + [If the transaction this IDBObjectStore belongs to has its mode set to readonly, throw ReadOnlyError] + expected: FAIL + + [If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_clear.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_clear.any.js.ini new file mode 100644 index 00000000000..6b25674e50e --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_clear.any.js.ini @@ -0,0 +1,21 @@ +[idbobjectstore_clear.any.worker.html] + expected: CRASH + +[idbobjectstore_clear.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_clear.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_clear.any.html] + [Verify clear removes all records ] + expected: FAIL + + [Clear removes all records from an index ] + expected: FAIL + + [If the transaction this IDBObjectStore belongs to has its mode set to readonly, throw ReadOnlyError ] + expected: FAIL + + [If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError ] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_count.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_count.any.js.ini new file mode 100644 index 00000000000..4937c8c612b --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_count.any.js.ini @@ -0,0 +1,22 @@ +[idbobjectstore_count.any.html] + [Returns the number of records in the object store ] + expected: FAIL + + [Returns the number of records that have keys within the range ] + expected: FAIL + + [Returns the number of records that have keys with the key] + expected: FAIL + + [If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError ] + expected: FAIL + + +[idbobjectstore_count.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_count.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_count.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_createIndex.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_createIndex.any.js.ini new file mode 100644 index 00000000000..c4b979d1afe --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_createIndex.any.js.ini @@ -0,0 +1,73 @@ +[idbobjectstore_createIndex.any.html] + [Returns an IDBIndex and the properties are set correctly] + expected: FAIL + + [Attempt to create an index that requires unique values on an object store already contains duplicates] + expected: FAIL + + [The index is usable right after being made] + expected: FAIL + + [Event ordering for a later deleted index] + expected: FAIL + + [Empty keyPath] + expected: FAIL + + [Event order when unique constraint is triggered] + expected: FAIL + + [Event ordering for ConstraintError on request] + expected: FAIL + + [Index can be valid keys] + expected: FAIL + + [IDBObjectStore.createIndex() - empty name] + expected: FAIL + + [If an index with the name name already exists in this object store, the implementation must throw a DOMException of type ConstraintError] + expected: FAIL + + [If keyPath is not a valid key path, the implementation must throw a DOMException of type SyntaxError] + expected: FAIL + + [If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError] + expected: FAIL + + [Operate out versionchange throw InvalidStateError] + expected: FAIL + + [InvalidStateError(Incorrect mode) vs. TransactionInactiveError. Mode check should precede state check of the transaction.] + expected: FAIL + + [InvalidStateError(Deleted ObjectStore) vs. TransactionInactiveError. Deletion check should precede transaction-state check.] + expected: FAIL + + [TransactionInactiveError vs. ConstraintError. Transaction-state check should precede index name check.] + expected: FAIL + + [ConstraintError vs. SyntaxError. Index name check should precede syntax check of the key path] + expected: FAIL + + [SyntaxError vs. InvalidAccessError. Syntax check should precede multiEntry check of the key path.] + expected: FAIL + + [Explicit Primary Key] + expected: FAIL + + [Auto-Increment Primary Key] + expected: FAIL + + [Auto-Increment Primary Key - invalid key values elsewhere] + expected: FAIL + + +[idbobjectstore_createIndex.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_createIndex.any.worker.html] + expected: CRASH + +[idbobjectstore_createIndex.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_delete.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_delete.any.js.ini new file mode 100644 index 00000000000..868b8e97c71 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_delete.any.js.ini @@ -0,0 +1,31 @@ +[idbobjectstore_delete.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_delete.any.html] + [delete() removes record (inline keys)] + expected: FAIL + + [delete() key doesn't match any records] + expected: FAIL + + [Object store's key path is an object attribute] + expected: FAIL + + [delete() removes record (out-of-line keys)] + expected: FAIL + + [delete() removes all of the records in the range] + expected: FAIL + + [If the transaction this IDBObjectStore belongs to has its mode set to readonly, throw ReadOnlyError] + expected: FAIL + + [If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError] + expected: FAIL + + +[idbobjectstore_delete.any.worker.html] + expected: CRASH + +[idbobjectstore_delete.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_deleteIndex.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_deleteIndex.any.js.ini new file mode 100644 index 00000000000..741203ba91b --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_deleteIndex.any.js.ini @@ -0,0 +1,13 @@ +[idbobjectstore_deleteIndex.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_deleteIndex.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_deleteIndex.any.html] + [IDBObjectStore.deleteIndex() removes the index] + expected: FAIL + + +[idbobjectstore_deleteIndex.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_get.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_get.any.js.ini new file mode 100644 index 00000000000..7a99b88dbaa --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_get.any.js.ini @@ -0,0 +1,31 @@ +[idbobjectstore_get.any.worker.html] + expected: CRASH + +[idbobjectstore_get.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_get.any.html] + [Key is a number] + expected: FAIL + + [Key is a string] + expected: FAIL + + [Key is a date] + expected: FAIL + + [Attempts to retrieve a record that doesn't exist] + expected: FAIL + + [Returns the record with the first key in the range] + expected: FAIL + + [When a transaction is aborted, throw TransactionInactiveError] + expected: FAIL + + [When an invalid key is used, throw DataError] + expected: FAIL + + +[idbobjectstore_get.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_getAll.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_getAll.any.js.ini new file mode 100644 index 00000000000..3e90206321c --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_getAll.any.js.ini @@ -0,0 +1,47 @@ +[idbobjectstore_getAll.any.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Single item get (generated key)] + expected: FAIL + + [getAll on empty object store] + expected: FAIL + + [Get all values] + expected: FAIL + + [Get all with large values] + expected: FAIL + + [Test maxCount] + expected: FAIL + + +[idbobjectstore_getAll.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_getAll.any.worker.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Single item get (generated key)] + expected: FAIL + + [getAll on empty object store] + expected: FAIL + + [Get all values] + expected: FAIL + + [Get all with large values] + expected: FAIL + + [Test maxCount] + expected: FAIL + + +[idbobjectstore_getAll.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_getAllKeys.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_getAllKeys.any.js.ini new file mode 100644 index 00000000000..4b7c07703e3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_getAllKeys.any.js.ini @@ -0,0 +1,41 @@ +[idbobjectstore_getAllKeys.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_getAllKeys.any.worker.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Single item get (generated key)] + expected: FAIL + + [getAllKeys on empty object store] + expected: FAIL + + [Get all keys] + expected: FAIL + + [Test maxCount] + expected: FAIL + + +[idbobjectstore_getAllKeys.any.html] + expected: ERROR + [Single item get] + expected: FAIL + + [Single item get (generated key)] + expected: FAIL + + [getAllKeys on empty object store] + expected: FAIL + + [Get all keys] + expected: FAIL + + [Test maxCount] + expected: FAIL + + +[idbobjectstore_getAllKeys.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_getAllRecords.tentative.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_getAllRecords.tentative.any.js.ini new file mode 100644 index 00000000000..97b22e1af59 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_getAllRecords.tentative.any.js.ini @@ -0,0 +1,52 @@ +[idbobjectstore_getAllRecords.tentative.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_getAllRecords.tentative.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_getAllRecords.tentative.any.worker.html] + expected: ERROR + [Single item] + expected: FAIL + + [Single item with generated key] + expected: FAIL + + [Empty object store] + expected: FAIL + + [Get all records] + expected: FAIL + + [Get all records with empty options] + expected: FAIL + + [Get all records with large values] + expected: FAIL + + [Count] + expected: FAIL + + +[idbobjectstore_getAllRecords.tentative.any.html] + expected: ERROR + [Single item] + expected: FAIL + + [Single item with generated key] + expected: FAIL + + [Empty object store] + expected: FAIL + + [Get all records] + expected: FAIL + + [Get all records with empty options] + expected: FAIL + + [Get all records with large values] + expected: FAIL + + [Count] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_getKey.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_getKey.any.js.ini new file mode 100644 index 00000000000..95b78bd081a --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_getKey.any.js.ini @@ -0,0 +1,104 @@ +[idbobjectstore_getKey.any.worker.html] + [IDBObjectStore.getKey() - invalid parameters] + expected: FAIL + + [IDBObjectStore.getKey() - basic - key] + expected: FAIL + + [IDBObjectStore.getKey() - basic - range] + expected: FAIL + + [IDBObjectStore.getKey() - basic - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - basic - range - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key path - key] + expected: FAIL + + [IDBObjectStore.getKey() - key path - range] + expected: FAIL + + [IDBObjectStore.getKey() - key path - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key path - range - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - key] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - range] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - range - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - key] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - range] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - range - no match] + expected: FAIL + + +[idbobjectstore_getKey.any.html] + [IDBObjectStore.getKey() - invalid parameters] + expected: FAIL + + [IDBObjectStore.getKey() - basic - key] + expected: FAIL + + [IDBObjectStore.getKey() - basic - range] + expected: FAIL + + [IDBObjectStore.getKey() - basic - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - basic - range - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key path - key] + expected: FAIL + + [IDBObjectStore.getKey() - key path - range] + expected: FAIL + + [IDBObjectStore.getKey() - key path - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key path - range - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - key] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - range] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator - range - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - key] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - range] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - key - no match] + expected: FAIL + + [IDBObjectStore.getKey() - key generator and key path - range - no match] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_index.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_index.any.js.ini new file mode 100644 index 00000000000..46ef3ca61a2 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_index.any.js.ini @@ -0,0 +1,12 @@ +[idbobjectstore_index.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_index.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_index.any.worker.html] + expected: CRASH + +[idbobjectstore_index.any.html] + [IDBObjectStore.index() - returns an index] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_keyPath.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_keyPath.any.js.ini new file mode 100644 index 00000000000..6e0d1b64b5e --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_keyPath.any.js.ini @@ -0,0 +1,9 @@ +[idbobjectstore_keyPath.any.html] + [IDBObjectStore's keyPath attribute returns the same object.] + expected: FAIL + + +[idbobjectstore_keyPath.any.worker.html] + [IDBObjectStore's keyPath attribute returns the same object.] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_openCursor.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_openCursor.any.js.ini new file mode 100644 index 00000000000..e2ae17a2d5c --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_openCursor.any.js.ini @@ -0,0 +1,13 @@ +[idbobjectstore_openCursor.any.html] + [IDBObjectStore.openCursor() - iterate through 100 objects] + expected: FAIL + + +[idbobjectstore_openCursor.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_openCursor.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_openCursor.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_openCursor_invalid.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_openCursor_invalid.any.js.ini new file mode 100644 index 00000000000..8550d5f9cba --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_openCursor_invalid.any.js.ini @@ -0,0 +1,15 @@ +[idbobjectstore_openCursor_invalid.any.html] + [IDBObjectStore.openCursor() - invalid - pass something other than number] + expected: FAIL + + +[idbobjectstore_openCursor_invalid.any.worker.html] + [IDBObjectStore.openCursor() - invalid - pass something other than number] + expected: FAIL + + +[idbobjectstore_openCursor_invalid.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_openCursor_invalid.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_openKeyCursor.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_openKeyCursor.any.js.ini new file mode 100644 index 00000000000..4f16de8d0f9 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_openKeyCursor.any.js.ini @@ -0,0 +1,39 @@ +[idbobjectstore_openKeyCursor.any.worker.html] + [IDBObjectStore.openKeyCursor() - forward iteration] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - reverse iteration] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - forward iteration with range] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - reverse iteration with range] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - invalid inputs] + expected: FAIL + + +[idbobjectstore_openKeyCursor.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_openKeyCursor.any.html] + [IDBObjectStore.openKeyCursor() - forward iteration] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - reverse iteration] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - forward iteration with range] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - reverse iteration with range] + expected: FAIL + + [IDBObjectStore.openKeyCursor() - invalid inputs] + expected: FAIL + + +[idbobjectstore_openKeyCursor.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbobjectstore_put.any.js.ini b/tests/wpt/meta/indexeddb/idbobjectstore_put.any.js.ini new file mode 100644 index 00000000000..edca1262608 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbobjectstore_put.any.js.ini @@ -0,0 +1,58 @@ +[idbobjectstore_put.any.html] + [put() with an inline key] + expected: FAIL + + [put() with an out-of-line key] + expected: FAIL + + [put() record with key already exists] + expected: FAIL + + [put() where an index has unique:true specified] + expected: FAIL + + [Object store's key path is an object attribute] + expected: FAIL + + [autoIncrement and inline keys] + expected: FAIL + + [autoIncrement and out-of-line keys] + expected: FAIL + + [Object store has autoIncrement:true and the key path is an object attribute] + expected: FAIL + + [Attempt to put() a record that does not meet the constraints of an object store's inline key requirements] + expected: FAIL + + [Attempt to call put() without an key parameter when the object store uses out-of-line keys] + expected: FAIL + + [Attempt to put() a record where the record's key does not meet the constraints of a valid key] + expected: FAIL + + [Attempt to put() a record where the record's in-line key is not defined] + expected: FAIL + + [Attempt to put() a record where the out of line key provided does not meet the constraints of a valid key] + expected: FAIL + + [put() a record where a value being indexed does not meet the constraints of a valid key] + expected: FAIL + + [If the transaction this IDBObjectStore belongs to has its mode set to readonly, throw ReadOnlyError] + expected: FAIL + + [If the object store has been deleted, the implementation must throw a DOMException of type InvalidStateError] + expected: FAIL + + +[idbobjectstore_put.any.sharedworker.html] + expected: ERROR + +[idbobjectstore_put.any.serviceworker.html] + expected: ERROR + +[idbobjectstore_put.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbrequest-onupgradeneeded.any.js.ini b/tests/wpt/meta/indexeddb/idbrequest-onupgradeneeded.any.js.ini new file mode 100644 index 00000000000..b08dfbada1c --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbrequest-onupgradeneeded.any.js.ini @@ -0,0 +1,33 @@ +[idbrequest-onupgradeneeded.any.html] + [indexedDB.delete called from upgradeneeded handler] + expected: FAIL + + [Abort transaction before deleting database in upgradeneeded handler] + expected: FAIL + + [Abort transaction after deleting database in upgradeneeded event handler] + expected: FAIL + + [transaction oncomplete ordering relative to open request onsuccess] + expected: FAIL + + +[idbrequest-onupgradeneeded.any.serviceworker.html] + expected: ERROR + +[idbrequest-onupgradeneeded.any.worker.html] + [indexedDB.delete called from upgradeneeded handler] + expected: FAIL + + [Abort transaction before deleting database in upgradeneeded handler] + expected: FAIL + + [Abort transaction after deleting database in upgradeneeded event handler] + expected: FAIL + + [transaction oncomplete ordering relative to open request onsuccess] + expected: FAIL + + +[idbrequest-onupgradeneeded.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbrequest_error.any.js.ini b/tests/wpt/meta/indexeddb/idbrequest_error.any.js.ini new file mode 100644 index 00000000000..0ebfd82ab8e --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbrequest_error.any.js.ini @@ -0,0 +1,12 @@ +[idbrequest_error.any.serviceworker.html] + expected: ERROR + +[idbrequest_error.any.worker.html] + expected: CRASH + +[idbrequest_error.any.sharedworker.html] + expected: ERROR + +[idbrequest_error.any.html] + [IDBRequest.error throws if ready state is pending] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbrequest_result.any.js.ini b/tests/wpt/meta/indexeddb/idbrequest_result.any.js.ini new file mode 100644 index 00000000000..39459e95cf5 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbrequest_result.any.js.ini @@ -0,0 +1,13 @@ +[idbrequest_result.any.html] + [IDBRequest.result throws if ready state is pending] + expected: FAIL + + +[idbrequest_result.any.serviceworker.html] + expected: ERROR + +[idbrequest_result.any.sharedworker.html] + expected: ERROR + +[idbrequest_result.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/idbtransaction-db-SameObject.any.js.ini b/tests/wpt/meta/indexeddb/idbtransaction-db-SameObject.any.js.ini new file mode 100644 index 00000000000..c51c80894dd --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbtransaction-db-SameObject.any.js.ini @@ -0,0 +1,15 @@ +[idbtransaction-db-SameObject.any.html] + [IDBTransaction.db [SameObject\]] + expected: FAIL + + +[idbtransaction-db-SameObject.any.serviceworker.html] + expected: ERROR + +[idbtransaction-db-SameObject.any.worker.html] + [IDBTransaction.db [SameObject\]] + expected: FAIL + + +[idbtransaction-db-SameObject.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbtransaction-objectStore-exception-order.any.js.ini b/tests/wpt/meta/indexeddb/idbtransaction-objectStore-exception-order.any.js.ini new file mode 100644 index 00000000000..ac9cf330e96 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbtransaction-objectStore-exception-order.any.js.ini @@ -0,0 +1,15 @@ +[idbtransaction-objectStore-exception-order.any.html] + [IDBTransaction.objectStore exception order: InvalidStateError vs. NotFoundError] + expected: FAIL + + +[idbtransaction-objectStore-exception-order.any.worker.html] + [IDBTransaction.objectStore exception order: InvalidStateError vs. NotFoundError] + expected: FAIL + + +[idbtransaction-objectStore-exception-order.any.sharedworker.html] + expected: ERROR + +[idbtransaction-objectStore-exception-order.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbtransaction-objectStore-finished.any.js.ini b/tests/wpt/meta/indexeddb/idbtransaction-objectStore-finished.any.js.ini new file mode 100644 index 00000000000..18909281ee6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbtransaction-objectStore-finished.any.js.ini @@ -0,0 +1,14 @@ +[idbtransaction-objectStore-finished.any.serviceworker.html] + expected: ERROR + +[idbtransaction-objectStore-finished.any.sharedworker.html] + expected: ERROR + +[idbtransaction-objectStore-finished.any.worker.html] + [IDBTransaction objectStore() behavior when transaction is finished] + expected: FAIL + + +[idbtransaction-objectStore-finished.any.html] + [IDBTransaction objectStore() behavior when transaction is finished] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbtransaction-oncomplete.any.js.ini b/tests/wpt/meta/indexeddb/idbtransaction-oncomplete.any.js.ini new file mode 100644 index 00000000000..03766404992 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbtransaction-oncomplete.any.js.ini @@ -0,0 +1,12 @@ +[idbtransaction-oncomplete.any.sharedworker.html] + expected: ERROR + +[idbtransaction-oncomplete.any.serviceworker.html] + expected: ERROR + +[idbtransaction-oncomplete.any.worker.html] + expected: CRASH + +[idbtransaction-oncomplete.any.html] + [IDBTransaction - complete event] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbtransaction.any.js.ini b/tests/wpt/meta/indexeddb/idbtransaction.any.js.ini new file mode 100644 index 00000000000..30c65af2968 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbtransaction.any.js.ini @@ -0,0 +1,11 @@ +[idbtransaction.any.sharedworker.html] + expected: ERROR + +[idbtransaction.any.serviceworker.html] + expected: ERROR + +[idbtransaction.any.worker.html] + expected: CRASH + +[idbtransaction.any.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/idbtransaction_abort.any.js.ini b/tests/wpt/meta/indexeddb/idbtransaction_abort.any.js.ini new file mode 100644 index 00000000000..f5f20401d35 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbtransaction_abort.any.js.ini @@ -0,0 +1,18 @@ +[idbtransaction_abort.any.sharedworker.html] + expected: ERROR + +[idbtransaction_abort.any.serviceworker.html] + expected: ERROR + +[idbtransaction_abort.any.worker.html] + expected: CRASH + +[idbtransaction_abort.any.html] + [Abort event should fire during transaction] + expected: FAIL + + [Abort during auto-committing should throw InvalidStateError.] + expected: FAIL + + [Abort on completed transaction should throw InvalidStateError.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbtransaction_objectStoreNames.any.js.ini b/tests/wpt/meta/indexeddb/idbtransaction_objectStoreNames.any.js.ini new file mode 100644 index 00000000000..88c392fa6ab --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbtransaction_objectStoreNames.any.js.ini @@ -0,0 +1,56 @@ +[idbtransaction_objectStoreNames.any.serviceworker.html] + expected: ERROR + +[idbtransaction_objectStoreNames.any.sharedworker.html] + expected: ERROR + +[idbtransaction_objectStoreNames.any.html] + [IDBTransaction.objectStoreNames - during upgrade transaction] + expected: FAIL + + [IDBTransaction.objectStoreNames - value after close] + expected: FAIL + + [IDBTransaction.objectStoreNames - transaction scope] + expected: FAIL + + [IDBTransaction.objectStoreNames - value after commit] + expected: FAIL + + [IDBTransaction.objectStoreNames - value after abort] + expected: FAIL + + [IDBTransaction.objectStoreNames - sorting] + expected: FAIL + + [IDBTransaction.objectStoreNames - no duplicates] + expected: FAIL + + [IDBTransaction.objectStoreNames - unusual names] + expected: FAIL + + +[idbtransaction_objectStoreNames.any.worker.html] + [IDBTransaction.objectStoreNames - during upgrade transaction] + expected: FAIL + + [IDBTransaction.objectStoreNames - value after close] + expected: FAIL + + [IDBTransaction.objectStoreNames - transaction scope] + expected: FAIL + + [IDBTransaction.objectStoreNames - value after commit] + expected: FAIL + + [IDBTransaction.objectStoreNames - value after abort] + expected: FAIL + + [IDBTransaction.objectStoreNames - sorting] + expected: FAIL + + [IDBTransaction.objectStoreNames - no duplicates] + expected: FAIL + + [IDBTransaction.objectStoreNames - unusual names] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idbversionchangeevent.any.js.ini b/tests/wpt/meta/indexeddb/idbversionchangeevent.any.js.ini new file mode 100644 index 00000000000..4c1a13cd665 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idbversionchangeevent.any.js.ini @@ -0,0 +1,14 @@ +[idbversionchangeevent.any.sharedworker.html] + expected: ERROR + +[idbversionchangeevent.any.html] + [IDBVersionChangeEvent fired in upgradeneeded, versionchange and deleteDatabase] + expected: FAIL + + +[idbversionchangeevent.any.serviceworker.html] + expected: ERROR + +[idbversionchangeevent.any.worker.html] + [IDBVersionChangeEvent fired in upgradeneeded, versionchange and deleteDatabase] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/idlharness.any.js.ini b/tests/wpt/meta/indexeddb/idlharness.any.js.ini new file mode 100644 index 00000000000..c1b13ea6f42 --- /dev/null +++ b/tests/wpt/meta/indexeddb/idlharness.any.js.ini @@ -0,0 +1,530 @@ +[idlharness.any.worker.html] + [IDBIndex interface: operation getKey(any)] + expected: FAIL + + [IDBIndex interface: attribute multiEntry] + expected: FAIL + + [IDBIndex interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBIndex interface: operation openKeyCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBCursor interface: operation continue(any)] + expected: FAIL + + [IDBCursor interface: operation advance(unsigned long)] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBCursor interface: attribute request] + expected: FAIL + + [IDBCursorWithValue interface object name] + expected: FAIL + + [IDBKeyRange interface: operation lowerBound(any, boolean)] + expected: FAIL + + [IDBObjectStore interface: operation openCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface object] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBCursor interface: existence and properties of interface object] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface object] + expected: FAIL + + [IDBIndex interface: attribute unique] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBIndex interface: operation get(any)] + expected: FAIL + + [IDBCursor interface: attribute key] + expected: FAIL + + [IDBObjectStore interface: operation index(DOMString)] + expected: FAIL + + [IDBKeyRange interface: operation only(any)] + expected: FAIL + + [IDBKeyRange interface: attribute lower] + expected: FAIL + + [IDBIndex interface: operation getAllKeys(any, unsigned long)] + expected: FAIL + + [IDBKeyRange interface object name] + expected: FAIL + + [IDBFactory interface: operation databases()] + expected: FAIL + + [IDBCursor interface: operation update(any)] + expected: FAIL + + [IDBIndex interface: attribute keyPath] + expected: FAIL + + [IDBKeyRange interface: operation upperBound(any, boolean)] + expected: FAIL + + [IDBCursor interface: attribute source] + expected: FAIL + + [IDBIndex interface: operation count(any)] + expected: FAIL + + [IDBCursor interface: attribute direction] + expected: FAIL + + [IDBCursor interface object length] + expected: FAIL + + [IDBCursor interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBKeyRange interface object length] + expected: FAIL + + [IDBCursor interface: attribute primaryKey] + expected: FAIL + + [IDBObjectStore interface: operation openKeyCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBIndex interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBIndex interface object length] + expected: FAIL + + [IDBIndex interface object name] + expected: FAIL + + [IDBCursor interface: operation delete()] + expected: FAIL + + [IDBIndex interface: operation getAll(any, unsigned long)] + expected: FAIL + + [idl_test setup] + expected: FAIL + + [IDBCursor interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBCursor interface: operation continuePrimaryKey(any, any)] + expected: FAIL + + [IDBCursor interface object name] + expected: FAIL + + [IDBIndex interface: existence and properties of interface object] + expected: FAIL + + [IDBCursor interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBIndex interface: operation openCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBKeyRange interface: attribute upper] + expected: FAIL + + [IDBIndex interface: attribute objectStore] + expected: FAIL + + [IDBCursorWithValue interface object length] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBObjectStore interface: operation createIndex(DOMString, [object Object\],[object Object\], IDBIndexParameters)] + expected: FAIL + + [IDBKeyRange interface: attribute lowerOpen] + expected: FAIL + + [IDBObjectStore interface: operation deleteIndex(DOMString)] + expected: FAIL + + [IDBKeyRange interface: operation bound(any, any, boolean, boolean)] + expected: FAIL + + [IDBIndex interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBCursorWithValue interface: attribute value] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBKeyRange interface: operation includes(any)] + expected: FAIL + + [IDBIndex interface: attribute name] + expected: FAIL + + [IDBKeyRange interface: attribute upperOpen] + expected: FAIL + + [IDBVersionChangeEvent interface: existence and properties of interface object] + expected: FAIL + + [IDBVersionChangeEvent interface object length] + expected: FAIL + + [IDBVersionChangeEvent interface object name] + expected: FAIL + + [IDBVersionChangeEvent interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBVersionChangeEvent interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBVersionChangeEvent interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBVersionChangeEvent interface: attribute oldVersion] + expected: FAIL + + [IDBVersionChangeEvent interface: attribute newVersion] + expected: FAIL + + [IDBFactory interface: operation cmp(any, any)] + expected: FAIL + + [IDBObjectStore interface: attribute keyPath] + expected: FAIL + + [IDBObjectStore interface: attribute indexNames] + expected: FAIL + + [IDBObjectStore interface: attribute transaction] + expected: FAIL + + [IDBObjectStore interface: operation getKey(any)] + expected: FAIL + + [IDBObjectStore interface: operation getAll(optional any, optional unsigned long)] + expected: FAIL + + [IDBObjectStore interface: operation getAllKeys(optional any, optional unsigned long)] + expected: FAIL + + [IDBObjectStore interface: operation openCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBObjectStore interface: operation openKeyCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBObjectStore interface: operation createIndex(DOMString, (DOMString or sequence), optional IDBIndexParameters)] + expected: FAIL + + [IDBIndex interface: operation getAll(optional any, optional unsigned long)] + expected: FAIL + + [IDBIndex interface: operation getAllKeys(optional any, optional unsigned long)] + expected: FAIL + + [IDBIndex interface: operation count(optional any)] + expected: FAIL + + [IDBIndex interface: operation openCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBIndex interface: operation openKeyCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBKeyRange interface: operation lowerBound(any, optional boolean)] + expected: FAIL + + [IDBKeyRange interface: operation upperBound(any, optional boolean)] + expected: FAIL + + [IDBKeyRange interface: operation bound(any, any, optional boolean, optional boolean)] + expected: FAIL + + [IDBCursor interface: operation continue(optional any)] + expected: FAIL + + [IDBTransaction interface: attribute durability] + expected: FAIL + + +[idlharness.any.sharedworker.html] + expected: ERROR + +[idlharness.any.serviceworker.html] + expected: ERROR + +[idlharness.any.html] + [IDBIndex interface: operation getKey(any)] + expected: FAIL + + [IDBIndex interface: attribute multiEntry] + expected: FAIL + + [IDBIndex interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBIndex interface: operation openKeyCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBCursor interface: operation continue(any)] + expected: FAIL + + [IDBCursor interface: operation advance(unsigned long)] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBCursor interface: attribute request] + expected: FAIL + + [IDBCursorWithValue interface object name] + expected: FAIL + + [IDBKeyRange interface: operation lowerBound(any, boolean)] + expected: FAIL + + [IDBObjectStore interface: operation openCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface object] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBCursor interface: existence and properties of interface object] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface object] + expected: FAIL + + [IDBIndex interface: attribute unique] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBIndex interface: operation get(any)] + expected: FAIL + + [IDBCursor interface: attribute key] + expected: FAIL + + [IDBObjectStore interface: operation index(DOMString)] + expected: FAIL + + [IDBKeyRange interface: operation only(any)] + expected: FAIL + + [IDBKeyRange interface: attribute lower] + expected: FAIL + + [IDBIndex interface: operation getAllKeys(any, unsigned long)] + expected: FAIL + + [IDBKeyRange interface object name] + expected: FAIL + + [IDBFactory interface: operation databases()] + expected: FAIL + + [IDBCursor interface: operation update(any)] + expected: FAIL + + [IDBIndex interface: attribute keyPath] + expected: FAIL + + [IDBKeyRange interface: operation upperBound(any, boolean)] + expected: FAIL + + [IDBCursor interface: attribute source] + expected: FAIL + + [IDBIndex interface: operation count(any)] + expected: FAIL + + [IDBCursor interface: attribute direction] + expected: FAIL + + [IDBCursor interface object length] + expected: FAIL + + [IDBCursor interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBKeyRange interface object length] + expected: FAIL + + [IDBCursor interface: attribute primaryKey] + expected: FAIL + + [IDBObjectStore interface: operation openKeyCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBIndex interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBIndex interface object length] + expected: FAIL + + [IDBIndex interface object name] + expected: FAIL + + [IDBCursor interface: operation delete()] + expected: FAIL + + [IDBIndex interface: operation getAll(any, unsigned long)] + expected: FAIL + + [idl_test setup] + expected: FAIL + + [IDBCursor interface: existence and properties of interface prototype object] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBCursor interface: operation continuePrimaryKey(any, any)] + expected: FAIL + + [IDBCursor interface object name] + expected: FAIL + + [IDBIndex interface: existence and properties of interface object] + expected: FAIL + + [IDBCursor interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBIndex interface: operation openCursor(any, IDBCursorDirection)] + expected: FAIL + + [IDBKeyRange interface: attribute upper] + expected: FAIL + + [IDBIndex interface: attribute objectStore] + expected: FAIL + + [IDBCursorWithValue interface object length] + expected: FAIL + + [IDBKeyRange interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [IDBObjectStore interface: operation createIndex(DOMString, [object Object\],[object Object\], IDBIndexParameters)] + expected: FAIL + + [IDBKeyRange interface: attribute lowerOpen] + expected: FAIL + + [IDBObjectStore interface: operation deleteIndex(DOMString)] + expected: FAIL + + [IDBKeyRange interface: operation bound(any, any, boolean, boolean)] + expected: FAIL + + [IDBIndex interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBCursorWithValue interface: attribute value] + expected: FAIL + + [IDBCursorWithValue interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [IDBKeyRange interface: operation includes(any)] + expected: FAIL + + [IDBIndex interface: attribute name] + expected: FAIL + + [IDBKeyRange interface: attribute upperOpen] + expected: FAIL + + [IDBFactory interface: operation cmp(any, any)] + expected: FAIL + + [IDBObjectStore interface: attribute keyPath] + expected: FAIL + + [IDBObjectStore interface: attribute indexNames] + expected: FAIL + + [IDBObjectStore interface: attribute transaction] + expected: FAIL + + [IDBObjectStore interface: operation getKey(any)] + expected: FAIL + + [IDBObjectStore interface: operation getAll(optional any, optional unsigned long)] + expected: FAIL + + [IDBObjectStore interface: operation getAllKeys(optional any, optional unsigned long)] + expected: FAIL + + [IDBObjectStore interface: operation openCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBObjectStore interface: operation openKeyCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBObjectStore interface: operation createIndex(DOMString, (DOMString or sequence), optional IDBIndexParameters)] + expected: FAIL + + [IDBIndex interface: operation getAll(optional any, optional unsigned long)] + expected: FAIL + + [IDBIndex interface: operation getAllKeys(optional any, optional unsigned long)] + expected: FAIL + + [IDBIndex interface: operation count(optional any)] + expected: FAIL + + [IDBIndex interface: operation openCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBIndex interface: operation openKeyCursor(optional any, optional IDBCursorDirection)] + expected: FAIL + + [IDBKeyRange interface: operation lowerBound(any, optional boolean)] + expected: FAIL + + [IDBKeyRange interface: operation upperBound(any, optional boolean)] + expected: FAIL + + [IDBKeyRange interface: operation bound(any, any, optional boolean, optional boolean)] + expected: FAIL + + [IDBCursor interface: operation continue(optional any)] + expected: FAIL + + [IDBTransaction interface: attribute durability] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/index_sort_order.any.js.ini b/tests/wpt/meta/indexeddb/index_sort_order.any.js.ini new file mode 100644 index 00000000000..dd329f8e6ee --- /dev/null +++ b/tests/wpt/meta/indexeddb/index_sort_order.any.js.ini @@ -0,0 +1,13 @@ +[index_sort_order.any.worker.html] + expected: CRASH + +[index_sort_order.any.sharedworker.html] + expected: ERROR + +[index_sort_order.any.html] + [Verify IDBIndex key sort order is 'number < Date < DOMString'] + expected: FAIL + + +[index_sort_order.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/interleaved-cursors-large.any.js.ini b/tests/wpt/meta/indexeddb/interleaved-cursors-large.any.js.ini new file mode 100644 index 00000000000..86dd19b00b9 --- /dev/null +++ b/tests/wpt/meta/indexeddb/interleaved-cursors-large.any.js.ini @@ -0,0 +1,15 @@ +[interleaved-cursors-large.any.worker.html] + [250 cursors] + expected: FAIL + + +[interleaved-cursors-large.any.html] + [250 cursors] + expected: FAIL + + +[interleaved-cursors-large.any.sharedworker.html] + expected: ERROR + +[interleaved-cursors-large.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/interleaved-cursors-small.any.js.ini b/tests/wpt/meta/indexeddb/interleaved-cursors-small.any.js.ini new file mode 100644 index 00000000000..b43e39975d9 --- /dev/null +++ b/tests/wpt/meta/indexeddb/interleaved-cursors-small.any.js.ini @@ -0,0 +1,27 @@ +[interleaved-cursors-small.any.html] + [1 cursors] + expected: FAIL + + [10 cursors] + expected: FAIL + + [100 cursors] + expected: FAIL + + +[interleaved-cursors-small.any.serviceworker.html] + expected: ERROR + +[interleaved-cursors-small.any.worker.html] + [1 cursors] + expected: FAIL + + [10 cursors] + expected: FAIL + + [100 cursors] + expected: FAIL + + +[interleaved-cursors-small.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/key-conversion-exceptions.any.js.ini b/tests/wpt/meta/indexeddb/key-conversion-exceptions.any.js.ini new file mode 100644 index 00000000000..c40825f03fe --- /dev/null +++ b/tests/wpt/meta/indexeddb/key-conversion-exceptions.any.js.ini @@ -0,0 +1,159 @@ +[key-conversion-exceptions.any.html] + [IDBFactory cmp() static with throwing/invalid keys] + expected: FAIL + + [IDBCursor continue() method with throwing/invalid keys] + expected: FAIL + + [IndexedDB: Exceptions thrown during key conversion] + expected: FAIL + + [IDBCursor update() method with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange only() static with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange lowerBound() static with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange upperBound() static with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange bound() static with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore add() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore put() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore delete() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore get() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore getKey() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore getAll() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore getAllKeys() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore count() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore openCursor() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore openKeyCursor() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex get() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex getKey() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex getAll() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex getAllKeys() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex count() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex openCursor() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex openKeyCursor() method with throwing/invalid keys] + expected: FAIL + + +[key-conversion-exceptions.any.sharedworker.html] + expected: ERROR + +[key-conversion-exceptions.any.worker.html] + [IDBFactory cmp() static with throwing/invalid keys] + expected: FAIL + + [IDBCursor continue() method with throwing/invalid keys] + expected: FAIL + + [IndexedDB: Exceptions thrown during key conversion] + expected: FAIL + + [IDBCursor update() method with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange only() static with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange lowerBound() static with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange upperBound() static with throwing/invalid keys] + expected: FAIL + + [IDBKeyRange bound() static with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore add() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore put() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore delete() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore get() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore getKey() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore getAll() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore getAllKeys() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore count() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore openCursor() method with throwing/invalid keys] + expected: FAIL + + [IDBObjectStore openKeyCursor() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex get() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex getKey() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex getAll() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex getAllKeys() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex count() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex openCursor() method with throwing/invalid keys] + expected: FAIL + + [IDBIndex openKeyCursor() method with throwing/invalid keys] + expected: FAIL + + +[key-conversion-exceptions.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/key_invalid.any.js.ini b/tests/wpt/meta/indexeddb/key_invalid.any.js.ini new file mode 100644 index 00000000000..5ee3933542f --- /dev/null +++ b/tests/wpt/meta/indexeddb/key_invalid.any.js.ini @@ -0,0 +1,115 @@ +[key_invalid.any.sharedworker.html] + expected: ERROR + +[key_invalid.any.html] + [Invalid key - true] + expected: FAIL + + [Invalid key - false] + expected: FAIL + + [Invalid key - null] + expected: FAIL + + [Invalid key - NaN] + expected: FAIL + + [Invalid key - undefined] + expected: FAIL + + [Invalid key - undefined2] + expected: FAIL + + [Invalid key - function() {}] + expected: FAIL + + [Invalid key - {}] + expected: FAIL + + [Invalid key - { obj: 1 }] + expected: FAIL + + [Invalid key - Math] + expected: FAIL + + [Invalid key - self] + expected: FAIL + + [Invalid key - {length:0,constructor:Array}] + expected: FAIL + + [Invalid key - Array clone’s instance] + expected: FAIL + + [Invalid key - Array (object)] + expected: FAIL + + [Invalid key - String (object)] + expected: FAIL + + [Invalid key - new String()] + expected: FAIL + + [Invalid key - new Number()] + expected: FAIL + + [Invalid key - new Boolean()] + expected: FAIL + + [Invalid key - [{}\]] + expected: FAIL + + [Invalid key - [[\], [\], [\], [[ Date \]\]\]] + expected: FAIL + + [Invalid key - [undefined\]] + expected: FAIL + + [Invalid key - [,1\]] + expected: FAIL + + [Invalid key - document.getElementsByTagName("script")] + expected: FAIL + + [Invalid key - new Date(NaN)] + expected: FAIL + + [Invalid key - new Date(Infinity)] + expected: FAIL + + [Invalid key - /foo/] + expected: FAIL + + [Invalid key - new RegExp()] + expected: FAIL + + [Invalid key - sparse array] + expected: FAIL + + [Invalid key - sparse array 2] + expected: FAIL + + [Invalid key - [[1\], [3\], [7\], [[ sparse array \]\]\]] + expected: FAIL + + [Invalid key - [1,2,3,,\]] + expected: FAIL + + [Invalid key - array directly contains self] + expected: FAIL + + [Invalid key - array indirectly contains self] + expected: FAIL + + [Invalid key - array member contains self] + expected: FAIL + + [Invalid key - proxy of an array] + expected: FAIL + + +[key_invalid.any.serviceworker.html] + expected: ERROR + +[key_invalid.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/key_valid.any.js.ini b/tests/wpt/meta/indexeddb/key_valid.any.js.ini new file mode 100644 index 00000000000..0ebb38099c2 --- /dev/null +++ b/tests/wpt/meta/indexeddb/key_valid.any.js.ini @@ -0,0 +1,64 @@ +[key_valid.any.html] + [Valid key - new Date()] + expected: FAIL + + [Valid key - new Date(0)] + expected: FAIL + + [Valid key - [\]] + expected: FAIL + + [Valid key - new Array()] + expected: FAIL + + [Valid key - ["undefined"\]] + expected: FAIL + + [Valid key - Infinity] + expected: FAIL + + [Valid key - -Infinity] + expected: FAIL + + [Valid key - 0] + expected: FAIL + + [Valid key - 1.5] + expected: FAIL + + [Valid key - 3e38] + expected: FAIL + + [Valid key - 3e-38] + expected: FAIL + + [Valid key - "foo"] + expected: FAIL + + [Valid key - "\\n"] + expected: FAIL + + [Valid key - ""] + expected: FAIL + + [Valid key - "\\""] + expected: FAIL + + [Valid key - "\\u1234"] + expected: FAIL + + [Valid key - "\\u0000"] + expected: FAIL + + [Valid key - "NaN"] + expected: FAIL + + +[key_valid.any.sharedworker.html] + expected: ERROR + +[key_valid.any.serviceworker.html] + expected: ERROR + +[key_valid.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/keygenerator.any.js.ini b/tests/wpt/meta/indexeddb/keygenerator.any.js.ini new file mode 100644 index 00000000000..1ec4d6f697a --- /dev/null +++ b/tests/wpt/meta/indexeddb/keygenerator.any.js.ini @@ -0,0 +1,73 @@ +[keygenerator.any.worker.html] + expected: CRASH + +[keygenerator.any.html] + [Keygenerator - starts at one, and increments by one] + expected: FAIL + + [Keygenerator - increments by one from last set key] + expected: FAIL + + [Keygenerator - don't increment when new key is not bigger than current] + expected: FAIL + + [Keygenerator ConstraintError when using same id as already generated] + expected: FAIL + + [Key generator vs. explicit key 53 bits] + expected: FAIL + + [Key generator vs. explicit key greater than 53 bits, less than 64 bits] + expected: FAIL + + [Key generator vs. explicit key greater than 53 bits, less than 64 bits (negative)] + expected: FAIL + + [Key generator vs. explicit key 63 bits] + expected: FAIL + + [Key generator vs. explicit key 63 bits (negative)] + expected: FAIL + + [Key generator vs. explicit key 64 bits] + expected: FAIL + + [Key generator vs. explicit key 64 bits (negative)] + expected: FAIL + + [Key generator vs. explicit key greater than 64 bits, but still finite] + expected: FAIL + + [Key generator vs. explicit key greater than 64 bits, but still finite (negative)] + expected: FAIL + + [Key generator vs. explicit key equal to Infinity] + expected: FAIL + + [Key generator vs. explicit key equal to -Infinity] + expected: FAIL + + [Key is injected into value - single segment path] + expected: FAIL + + [Key is injected into value - multi-segment path] + expected: FAIL + + [Key is injected into value - multi-segment path, partially populated] + expected: FAIL + + [put() throws if key cannot be injected - single segment path] + expected: FAIL + + [put() throws if key cannot be injected - multi-segment path] + expected: FAIL + + [Keygenerator overflow] + expected: FAIL + + +[keygenerator.any.serviceworker.html] + expected: ERROR + +[keygenerator.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/keyorder.any.js.ini b/tests/wpt/meta/indexeddb/keyorder.any.js.ini new file mode 100644 index 00000000000..0f1c125a657 --- /dev/null +++ b/tests/wpt/meta/indexeddb/keyorder.any.js.ini @@ -0,0 +1,82 @@ +[keyorder.any.serviceworker.html] + expected: ERROR + +[keyorder.any.worker.html] + expected: CRASH + +[keyorder.any.html] + [Database readback sort - String < Array] + expected: FAIL + + [IDBKey.cmp sort - String < Array] + expected: FAIL + + [Database readback sort - float < String] + expected: FAIL + + [IDBKey.cmp sort - float < String] + expected: FAIL + + [Database readback sort - float < Date] + expected: FAIL + + [IDBKey.cmp sort - float < Date] + expected: FAIL + + [Database readback sort - float < Date < String < Array] + expected: FAIL + + [IDBKey.cmp sort - float < Date < String < Array] + expected: FAIL + + [Database readback sort - Date(1 sec ago) < Date(now) < Date(1 minute in future)] + expected: FAIL + + [IDBKey.cmp sort - Date(1 sec ago) < Date(now) < Date(1 minute in future)] + expected: FAIL + + [Database readback sort - -1.1 < 1 < 1.01337 < 1.013373 < 2] + expected: FAIL + + [IDBKey.cmp sort - -1.1 < 1 < 1.01337 < 1.013373 < 2] + expected: FAIL + + [Database readback sort - -Infinity < -0.01 < 0 < Infinity] + expected: FAIL + + [IDBKey.cmp sort - -Infinity < -0.01 < 0 < Infinity] + expected: FAIL + + [Database readback sort - "" < "a" < "ab" < "b" < "ba"] + expected: FAIL + + [IDBKey.cmp sort - "" < "a" < "ab" < "b" < "ba"] + expected: FAIL + + [Database readback sort - Arrays] + expected: FAIL + + [IDBKey.cmp sort - Arrays] + expected: FAIL + + [Database readback sort - Array.length: 10,000 < Array.length: 10,001] + expected: FAIL + + [IDBKey.cmp sort - Array.length: 10,000 < Array.length: 10,001] + expected: FAIL + + [Database readback sort - Infinity inside arrays] + expected: FAIL + + [IDBKey.cmp sort - Infinity inside arrays] + expected: FAIL + + [Database readback sort - Test different stuff at once] + expected: FAIL + + [IDBKey.cmp sort - Test different stuff at once] + expected: FAIL + + +[keyorder.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/keypath-exceptions.any.js.ini b/tests/wpt/meta/indexeddb/keypath-exceptions.any.js.ini new file mode 100644 index 00000000000..3380625a350 --- /dev/null +++ b/tests/wpt/meta/indexeddb/keypath-exceptions.any.js.ini @@ -0,0 +1,45 @@ +[keypath-exceptions.any.serviceworker.html] + expected: ERROR + +[keypath-exceptions.any.html] + [The last element of keypath is validated] + expected: FAIL + + [Key path evaluation: Exceptions from non-enumerable getters] + expected: FAIL + + [Key path evaluation: Exceptions from enumerable getters] + expected: FAIL + + [Key path evaluation: Exceptions from non-enumerable getters on prototype] + expected: FAIL + + [Key path evaluation: Exceptions from enumerable getters on prototype] + expected: FAIL + + [Array key conversion should not invoke prototype getters] + expected: FAIL + + +[keypath-exceptions.any.worker.html] + [The last element of keypath is validated] + expected: FAIL + + [Key path evaluation: Exceptions from non-enumerable getters] + expected: FAIL + + [Key path evaluation: Exceptions from enumerable getters] + expected: FAIL + + [Key path evaluation: Exceptions from non-enumerable getters on prototype] + expected: FAIL + + [Key path evaluation: Exceptions from enumerable getters on prototype] + expected: FAIL + + [Array key conversion should not invoke prototype getters] + expected: FAIL + + +[keypath-exceptions.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/keypath-special-identifiers.any.js.ini b/tests/wpt/meta/indexeddb/keypath-special-identifiers.any.js.ini new file mode 100644 index 00000000000..d6dc0cbe73f --- /dev/null +++ b/tests/wpt/meta/indexeddb/keypath-special-identifiers.any.js.ini @@ -0,0 +1,44 @@ +[keypath-special-identifiers.any.sharedworker.html] + expected: ERROR + +[keypath-special-identifiers.any.serviceworker.html] + expected: ERROR + +[keypath-special-identifiers.any.worker.html] + [Type: String, identifier: length] + expected: FAIL + + [Type: Array, identifier: length] + expected: FAIL + + [Type: Blob, identifier: size] + expected: FAIL + + [Type: Blob, identifier: type] + expected: FAIL + + [Type: File, identifier: name] + expected: FAIL + + [Type: File, identifier: lastModified] + expected: FAIL + + +[keypath-special-identifiers.any.html] + [Type: String, identifier: length] + expected: FAIL + + [Type: Array, identifier: length] + expected: FAIL + + [Type: Blob, identifier: size] + expected: FAIL + + [Type: Blob, identifier: type] + expected: FAIL + + [Type: File, identifier: name] + expected: FAIL + + [Type: File, identifier: lastModified] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/keypath.any.js.ini b/tests/wpt/meta/indexeddb/keypath.any.js.ini new file mode 100644 index 00000000000..305b49a0666 --- /dev/null +++ b/tests/wpt/meta/indexeddb/keypath.any.js.ini @@ -0,0 +1,70 @@ +[keypath.any.html] + [undefined - my.key] + expected: FAIL + + [undefined - my.køi] + expected: FAIL + + [undefined - my.key_ya] + expected: FAIL + + [undefined - public.key$ya] + expected: FAIL + + [undefined - true.$] + expected: FAIL + + [undefined - my._] + expected: FAIL + + [undefined - delete.a7] + expected: FAIL + + [undefined - p.p.p.p.p.p.p.p.p.p.p.p.p.p] + expected: FAIL + + [undefined - str.length] + expected: FAIL + + [undefined - arr.length] + expected: FAIL + + [undefined - length] + expected: FAIL + + [undefined - '' uses value as key] + expected: FAIL + + [undefined - [''\] uses value as [key\]] + expected: FAIL + + [undefined - ['x', 'y'\]] + expected: FAIL + + [undefined - [['x'\], 'y'\] (stringifies)] + expected: FAIL + + [undefined - ['x', {toString->'y'}\] (stringifies)] + expected: FAIL + + [undefined - name,type] + expected: FAIL + + [undefined - name,type.name] + expected: FAIL + + [undefined - list with 1 field] + expected: FAIL + + [undefined - array loop -> stringify becomes [''\]] + expected: FAIL + + +[keypath.any.sharedworker.html] + expected: ERROR + +[keypath.any.serviceworker.html] + expected: ERROR + +[keypath.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/keypath_invalid.any.js.ini b/tests/wpt/meta/indexeddb/keypath_invalid.any.js.ini new file mode 100644 index 00000000000..a8666cfc386 --- /dev/null +++ b/tests/wpt/meta/indexeddb/keypath_invalid.any.js.ini @@ -0,0 +1,82 @@ +[keypath_invalid.any.worker.html] + expected: CRASH + +[keypath_invalid.any.sharedworker.html] + expected: ERROR + +[keypath_invalid.any.html] + [Invalid keyPath - "j a"] + expected: FAIL + + [Invalid keyPath - ".yo"] + expected: FAIL + + [Invalid keyPath - "yo,lo"] + expected: FAIL + + [Invalid keyPath - [\]] + expected: FAIL + + [Invalid keyPath - ["array with space"\]] + expected: FAIL + + [Invalid keyPath - multidimensional array (invalid toString)] + expected: FAIL + + [Invalid keyPath - "3m"] + expected: FAIL + + [Invalid keyPath - {toString->3m}] + expected: FAIL + + [Invalid keyPath - "my.1337"] + expected: FAIL + + [Invalid keyPath - "..yo"] + expected: FAIL + + [Invalid keyPath - "y..o"] + expected: FAIL + + [Invalid keyPath - "y.o."] + expected: FAIL + + [Invalid keyPath - "y.o.."] + expected: FAIL + + [Invalid keyPath - "m.*"] + expected: FAIL + + [Invalid keyPath - "\\"m\\""] + expected: FAIL + + [Invalid keyPath - "m%"] + expected: FAIL + + [Invalid keyPath - "m/"] + expected: FAIL + + [Invalid keyPath - "m/a"] + expected: FAIL + + [Invalid keyPath - "m&"] + expected: FAIL + + [Invalid keyPath - "m!"] + expected: FAIL + + [Invalid keyPath - "*"] + expected: FAIL + + [Invalid keyPath - "*.*"] + expected: FAIL + + [Invalid keyPath - "^m"] + expected: FAIL + + [Invalid keyPath - "/m/"] + expected: FAIL + + +[keypath_invalid.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/keypath_maxsize.any.js.ini b/tests/wpt/meta/indexeddb/keypath_maxsize.any.js.ini new file mode 100644 index 00000000000..8a12c08bd1e --- /dev/null +++ b/tests/wpt/meta/indexeddb/keypath_maxsize.any.js.ini @@ -0,0 +1,18 @@ +[keypath_maxsize.any.sharedworker.html] + expected: ERROR + +[keypath_maxsize.any.worker.html] + expected: CRASH + +[keypath_maxsize.any.serviceworker.html] + expected: ERROR + +[keypath_maxsize.any.html] + [undefined - ~260 chars] + expected: FAIL + + [undefined - ~530 chars] + expected: FAIL + + [undefined - ~1050 chars] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/large-requests-abort.any.js.ini b/tests/wpt/meta/indexeddb/large-requests-abort.any.js.ini new file mode 100644 index 00000000000..852e0959ebc --- /dev/null +++ b/tests/wpt/meta/indexeddb/large-requests-abort.any.js.ini @@ -0,0 +1,33 @@ +[large-requests-abort.any.html] + [small values] + expected: FAIL + + [large values] + expected: FAIL + + [large value followed by small values] + expected: FAIL + + [large values mixed with small values] + expected: FAIL + + +[large-requests-abort.any.worker.html] + [small values] + expected: FAIL + + [large values] + expected: FAIL + + [large value followed by small values] + expected: FAIL + + [large values mixed with small values] + expected: FAIL + + +[large-requests-abort.any.serviceworker.html] + expected: ERROR + +[large-requests-abort.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/list_ordering.any.js.ini b/tests/wpt/meta/indexeddb/list_ordering.any.js.ini new file mode 100644 index 00000000000..71896616442 --- /dev/null +++ b/tests/wpt/meta/indexeddb/list_ordering.any.js.ini @@ -0,0 +1,19 @@ +[list_ordering.any.html] + [Validate ObjectStoreNames and indexNames list order - numbers] + expected: FAIL + + [Validate ObjectStoreNames and indexNames list order - numbers 'overflow'] + expected: FAIL + + [Validate ObjectStoreNames and indexNames list order - lexigraphical string sort] + expected: FAIL + + +[list_ordering.any.serviceworker.html] + expected: ERROR + +[list_ordering.any.sharedworker.html] + expected: ERROR + +[list_ordering.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/name-scopes.any.js.ini b/tests/wpt/meta/indexeddb/name-scopes.any.js.ini new file mode 100644 index 00000000000..b1c5401dc8f --- /dev/null +++ b/tests/wpt/meta/indexeddb/name-scopes.any.js.ini @@ -0,0 +1,20 @@ +[name-scopes.any.sharedworker.html] + expected: ERROR + +[name-scopes.any.serviceworker.html] + expected: ERROR + +[name-scopes.any.html] + [Non-unique index keys] + expected: FAIL + + [Unique index keys] + expected: FAIL + + +[name-scopes.any.worker.html] + [Non-unique index keys] + expected: FAIL + + [Unique index keys] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/nested-cloning-basic.any.js.ini b/tests/wpt/meta/indexeddb/nested-cloning-basic.any.js.ini new file mode 100644 index 00000000000..1f20580b2c2 --- /dev/null +++ b/tests/wpt/meta/indexeddb/nested-cloning-basic.any.js.ini @@ -0,0 +1,20 @@ +[nested-cloning-basic.any.serviceworker.html] + expected: ERROR + +[nested-cloning-basic.any.sharedworker.html] + expected: ERROR + +[nested-cloning-basic.any.worker.html] + [small typed array] + expected: FAIL + + [blob] + expected: FAIL + + +[nested-cloning-basic.any.html] + [small typed array] + expected: FAIL + + [blob] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/nested-cloning-large-multiple.any.js.ini b/tests/wpt/meta/indexeddb/nested-cloning-large-multiple.any.js.ini new file mode 100644 index 00000000000..24de0cf28e6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/nested-cloning-large-multiple.any.js.ini @@ -0,0 +1,21 @@ +[nested-cloning-large-multiple.any.worker.html] + [multiple requests of objects with blobs and large typed arrays] + expected: FAIL + + [multiple requests of objects with blobs and large typed arrays with key generator] + expected: FAIL + + +[nested-cloning-large-multiple.any.serviceworker.html] + expected: ERROR + +[nested-cloning-large-multiple.any.html] + [multiple requests of objects with blobs and large typed arrays] + expected: FAIL + + [multiple requests of objects with blobs and large typed arrays with key generator] + expected: FAIL + + +[nested-cloning-large-multiple.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/nested-cloning-large.any.js.ini b/tests/wpt/meta/indexeddb/nested-cloning-large.any.js.ini new file mode 100644 index 00000000000..67b01472377 --- /dev/null +++ b/tests/wpt/meta/indexeddb/nested-cloning-large.any.js.ini @@ -0,0 +1,51 @@ +[nested-cloning-large.any.worker.html] + [large typed array] + expected: FAIL + + [blob with large typed array] + expected: FAIL + + [blob with large typed array with key generator] + expected: FAIL + + [array of blobs and large typed arrays] + expected: FAIL + + [array of blobs and large typed arrays with key generator] + expected: FAIL + + [object with blobs and large typed arrays] + expected: FAIL + + [object with blobs and large typed arrays with key generator] + expected: FAIL + + +[nested-cloning-large.any.html] + [large typed array] + expected: FAIL + + [blob with large typed array] + expected: FAIL + + [blob with large typed array with key generator] + expected: FAIL + + [array of blobs and large typed arrays] + expected: FAIL + + [array of blobs and large typed arrays with key generator] + expected: FAIL + + [object with blobs and large typed arrays] + expected: FAIL + + [object with blobs and large typed arrays with key generator] + expected: FAIL + + +[nested-cloning-large.any.sharedworker.html] + expected: ERROR + +[nested-cloning-large.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/nested-cloning-small.any.js.ini b/tests/wpt/meta/indexeddb/nested-cloning-small.any.js.ini new file mode 100644 index 00000000000..0692a90862c --- /dev/null +++ b/tests/wpt/meta/indexeddb/nested-cloning-small.any.js.ini @@ -0,0 +1,44 @@ +[nested-cloning-small.any.sharedworker.html] + expected: ERROR + +[nested-cloning-small.any.serviceworker.html] + expected: ERROR + +[nested-cloning-small.any.html] + [blob with small typed array] + expected: FAIL + + [blob with small typed array with key generator] + expected: FAIL + + [blob array] + expected: FAIL + + [blob array with key generator] + expected: FAIL + + [array of blobs and small typed arrays] + expected: FAIL + + [array of blobs and small typed arrays with key generator] + expected: FAIL + + +[nested-cloning-small.any.worker.html] + [blob with small typed array] + expected: FAIL + + [blob with small typed array with key generator] + expected: FAIL + + [blob array] + expected: FAIL + + [blob array with key generator] + expected: FAIL + + [array of blobs and small typed arrays] + expected: FAIL + + [array of blobs and small typed arrays with key generator] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/objectstore_keyorder.any.js.ini b/tests/wpt/meta/indexeddb/objectstore_keyorder.any.js.ini new file mode 100644 index 00000000000..e0ffd340cc3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/objectstore_keyorder.any.js.ini @@ -0,0 +1,12 @@ +[objectstore_keyorder.any.serviceworker.html] + expected: ERROR + +[objectstore_keyorder.any.sharedworker.html] + expected: ERROR + +[objectstore_keyorder.any.worker.html] + expected: CRASH + +[objectstore_keyorder.any.html] + [Verify key sort order in an object store is 'number < Date < DOMString' ] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/open-request-queue.any.js.ini b/tests/wpt/meta/indexeddb/open-request-queue.any.js.ini new file mode 100644 index 00000000000..01c657933fb --- /dev/null +++ b/tests/wpt/meta/indexeddb/open-request-queue.any.js.ini @@ -0,0 +1,14 @@ +[open-request-queue.any.sharedworker.html] + expected: ERROR + +[open-request-queue.any.html] + [IndexedDB: open and delete requests are processed as a FIFO queue] + expected: FAIL + + +[open-request-queue.any.serviceworker.html] + expected: ERROR + +[open-request-queue.any.worker.html] + [IndexedDB: open and delete requests are processed as a FIFO queue] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/parallel-cursors-upgrade.any.js.ini b/tests/wpt/meta/indexeddb/parallel-cursors-upgrade.any.js.ini new file mode 100644 index 00000000000..6a4d535bdfe --- /dev/null +++ b/tests/wpt/meta/indexeddb/parallel-cursors-upgrade.any.js.ini @@ -0,0 +1,32 @@ +[parallel-cursors-upgrade.any.serviceworker.html] + expected: ERROR + +[parallel-cursors-upgrade.any.worker.html] + [2 cursors] + expected: FAIL + + [20 cursors] + expected: FAIL + + [200 cursors] + expected: FAIL + + [2000 cursors] + expected: FAIL + + +[parallel-cursors-upgrade.any.sharedworker.html] + expected: ERROR + +[parallel-cursors-upgrade.any.html] + [2 cursors] + expected: FAIL + + [20 cursors] + expected: FAIL + + [200 cursors] + expected: FAIL + + [2000 cursors] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/reading-autoincrement-indexes-cursors.any.js.ini b/tests/wpt/meta/indexeddb/reading-autoincrement-indexes-cursors.any.js.ini new file mode 100644 index 00000000000..89d08a3f392 --- /dev/null +++ b/tests/wpt/meta/indexeddb/reading-autoincrement-indexes-cursors.any.js.ini @@ -0,0 +1,32 @@ +[reading-autoincrement-indexes-cursors.any.serviceworker.html] + expected: ERROR + +[reading-autoincrement-indexes-cursors.any.sharedworker.html] + expected: ERROR + +[reading-autoincrement-indexes-cursors.any.html] + [IDBIndex.openCursor() iterates over an index on the autoincrement key] + expected: FAIL + + [IDBIndex.openKeyCursor() iterates over an index on the autoincrement key] + expected: FAIL + + [IDBIndex.openCursor() iterates over an index not covering the autoincrement key] + expected: FAIL + + [IDBIndex.openKeyCursor() iterates over an index not covering the autoincrement key] + expected: FAIL + + +[reading-autoincrement-indexes-cursors.any.worker.html] + [IDBIndex.openCursor() iterates over an index on the autoincrement key] + expected: FAIL + + [IDBIndex.openKeyCursor() iterates over an index on the autoincrement key] + expected: FAIL + + [IDBIndex.openCursor() iterates over an index not covering the autoincrement key] + expected: FAIL + + [IDBIndex.openKeyCursor() iterates over an index not covering the autoincrement key] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/reading-autoincrement-indexes.any.js.ini b/tests/wpt/meta/indexeddb/reading-autoincrement-indexes.any.js.ini new file mode 100644 index 00000000000..9f9c60c6c55 --- /dev/null +++ b/tests/wpt/meta/indexeddb/reading-autoincrement-indexes.any.js.ini @@ -0,0 +1,44 @@ +[reading-autoincrement-indexes.any.serviceworker.html] + expected: ERROR + +[reading-autoincrement-indexes.any.sharedworker.html] + expected: ERROR + +[reading-autoincrement-indexes.any.html] + [IDBIndex.getAll() for an index on the autoincrement key] + expected: FAIL + + [IDBIndex.getAllKeys() for an index on the autoincrement key] + expected: FAIL + + [IDBIndex.get() for an index on the autoincrement key] + expected: FAIL + + [IDBIndex.getAll() for an index not covering the autoincrement key] + expected: FAIL + + [IDBIndex.getAllKeys() returns correct result for an index not covering the autoincrement key] + expected: FAIL + + [IDBIndex.get() for an index not covering the autoincrement key] + expected: FAIL + + +[reading-autoincrement-indexes.any.worker.html] + [IDBIndex.getAll() for an index on the autoincrement key] + expected: FAIL + + [IDBIndex.getAllKeys() for an index on the autoincrement key] + expected: FAIL + + [IDBIndex.get() for an index on the autoincrement key] + expected: FAIL + + [IDBIndex.getAll() for an index not covering the autoincrement key] + expected: FAIL + + [IDBIndex.getAllKeys() returns correct result for an index not covering the autoincrement key] + expected: FAIL + + [IDBIndex.get() for an index not covering the autoincrement key] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/reading-autoincrement-store-cursors.any.js.ini b/tests/wpt/meta/indexeddb/reading-autoincrement-store-cursors.any.js.ini new file mode 100644 index 00000000000..5ef52e0f2e0 --- /dev/null +++ b/tests/wpt/meta/indexeddb/reading-autoincrement-store-cursors.any.js.ini @@ -0,0 +1,20 @@ +[reading-autoincrement-store-cursors.any.serviceworker.html] + expected: ERROR + +[reading-autoincrement-store-cursors.any.sharedworker.html] + expected: ERROR + +[reading-autoincrement-store-cursors.any.worker.html] + [IDBObjectStore.openCursor() iterates over an autoincrement store] + expected: FAIL + + [IDBObjectStore.openKeyCursor() iterates over an autoincrement store] + expected: FAIL + + +[reading-autoincrement-store-cursors.any.html] + [IDBObjectStore.openCursor() iterates over an autoincrement store] + expected: FAIL + + [IDBObjectStore.openKeyCursor() iterates over an autoincrement store] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/reading-autoincrement-store.any.js.ini b/tests/wpt/meta/indexeddb/reading-autoincrement-store.any.js.ini new file mode 100644 index 00000000000..6fc42647d13 --- /dev/null +++ b/tests/wpt/meta/indexeddb/reading-autoincrement-store.any.js.ini @@ -0,0 +1,27 @@ +[reading-autoincrement-store.any.sharedworker.html] + expected: ERROR + +[reading-autoincrement-store.any.worker.html] + [IDBObjectStore.getAll() for an autoincrement store] + expected: FAIL + + [IDBObjectStore.getAllKeys() for an autoincrement store] + expected: FAIL + + [IDBObjectStore.get() for an autoincrement store] + expected: FAIL + + +[reading-autoincrement-store.any.html] + [IDBObjectStore.getAll() for an autoincrement store] + expected: FAIL + + [IDBObjectStore.getAllKeys() for an autoincrement store] + expected: FAIL + + [IDBObjectStore.get() for an autoincrement store] + expected: FAIL + + +[reading-autoincrement-store.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/request-abort-ordering.any.js.ini b/tests/wpt/meta/indexeddb/request-abort-ordering.any.js.ini new file mode 100644 index 00000000000..a8f70580453 --- /dev/null +++ b/tests/wpt/meta/indexeddb/request-abort-ordering.any.js.ini @@ -0,0 +1,15 @@ +[request-abort-ordering.any.worker.html] + [IndexedDB: request abort events are delivered in order] + expected: FAIL + + +[request-abort-ordering.any.html] + [IndexedDB: request abort events are delivered in order] + expected: FAIL + + +[request-abort-ordering.any.sharedworker.html] + expected: ERROR + +[request-abort-ordering.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/request-event-ordering-large-mixed-with-small-values.any.js.ini b/tests/wpt/meta/indexeddb/request-event-ordering-large-mixed-with-small-values.any.js.ini new file mode 100644 index 00000000000..b7436e25d32 --- /dev/null +++ b/tests/wpt/meta/indexeddb/request-event-ordering-large-mixed-with-small-values.any.js.ini @@ -0,0 +1,15 @@ +[request-event-ordering-large-mixed-with-small-values.any.serviceworker.html] + expected: ERROR + +[request-event-ordering-large-mixed-with-small-values.any.html] + [large values mixed with small values] + expected: FAIL + + +[request-event-ordering-large-mixed-with-small-values.any.worker.html] + [large values mixed with small values] + expected: FAIL + + +[request-event-ordering-large-mixed-with-small-values.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/request-event-ordering-large-then-small-values.any.js.ini b/tests/wpt/meta/indexeddb/request-event-ordering-large-then-small-values.any.js.ini new file mode 100644 index 00000000000..55766996469 --- /dev/null +++ b/tests/wpt/meta/indexeddb/request-event-ordering-large-then-small-values.any.js.ini @@ -0,0 +1,15 @@ +[request-event-ordering-large-then-small-values.any.worker.html] + [large value followed by small values] + expected: FAIL + + +[request-event-ordering-large-then-small-values.any.html] + [large value followed by small values] + expected: FAIL + + +[request-event-ordering-large-then-small-values.any.sharedworker.html] + expected: ERROR + +[request-event-ordering-large-then-small-values.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/request-event-ordering-large-values.any.js.ini b/tests/wpt/meta/indexeddb/request-event-ordering-large-values.any.js.ini new file mode 100644 index 00000000000..798233f26e3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/request-event-ordering-large-values.any.js.ini @@ -0,0 +1,14 @@ +[request-event-ordering-large-values.any.worker.html] + [large values] + expected: FAIL + + +[request-event-ordering-large-values.any.sharedworker.html] + expected: ERROR + +[request-event-ordering-large-values.any.serviceworker.html] + expected: ERROR + +[request-event-ordering-large-values.any.html] + [large values] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/request-event-ordering-small-values.any.js.ini b/tests/wpt/meta/indexeddb/request-event-ordering-small-values.any.js.ini new file mode 100644 index 00000000000..aba76f2b576 --- /dev/null +++ b/tests/wpt/meta/indexeddb/request-event-ordering-small-values.any.js.ini @@ -0,0 +1,15 @@ +[request-event-ordering-small-values.any.html] + [small values] + expected: FAIL + + +[request-event-ordering-small-values.any.worker.html] + [small values] + expected: FAIL + + +[request-event-ordering-small-values.any.sharedworker.html] + expected: ERROR + +[request-event-ordering-small-values.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/request_bubble-and-capture.any.js.ini b/tests/wpt/meta/indexeddb/request_bubble-and-capture.any.js.ini new file mode 100644 index 00000000000..086fc0cadc3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/request_bubble-and-capture.any.js.ini @@ -0,0 +1,13 @@ +[request_bubble-and-capture.any.sharedworker.html] + expected: ERROR + +[request_bubble-and-capture.any.html] + [IndexedDB Request Event Propagation: Bubbling and Capturing] + expected: FAIL + + +[request_bubble-and-capture.any.serviceworker.html] + expected: ERROR + +[request_bubble-and-capture.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/serialize-sharedarraybuffer-throws.https.html.ini b/tests/wpt/meta/indexeddb/serialize-sharedarraybuffer-throws.https.html.ini new file mode 100644 index 00000000000..5c56bc30072 --- /dev/null +++ b/tests/wpt/meta/indexeddb/serialize-sharedarraybuffer-throws.https.html.ini @@ -0,0 +1,3 @@ +[serialize-sharedarraybuffer-throws.https.html] + [IndexedDB: Attempting to serialize a SharedArrayBuffer should throw] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/storage-buckets.https.any.js.ini b/tests/wpt/meta/indexeddb/storage-buckets.https.any.js.ini new file mode 100644 index 00000000000..903bce95a5c --- /dev/null +++ b/tests/wpt/meta/indexeddb/storage-buckets.https.any.js.ini @@ -0,0 +1,20 @@ +[storage-buckets.https.any.serviceworker.html] + expected: ERROR + +[storage-buckets.https.any.html] + [Basic test that buckets create independent databases.] + expected: FAIL + + [Tests trying to use indexedDB in a deleted bucket.] + expected: FAIL + + +[storage-buckets.https.any.sharedworker.html] + expected: ERROR + +[storage-buckets.https.any.worker.html] + [Basic test that buckets create independent databases.] + expected: FAIL + + [Tests trying to use indexedDB in a deleted bucket.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/string-list-ordering.any.js.ini b/tests/wpt/meta/indexeddb/string-list-ordering.any.js.ini new file mode 100644 index 00000000000..8e11deef4c3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/string-list-ordering.any.js.ini @@ -0,0 +1,13 @@ +[string-list-ordering.any.worker.html] + expected: CRASH + +[string-list-ordering.any.html] + [Test string list ordering in IndexedDB] + expected: FAIL + + +[string-list-ordering.any.sharedworker.html] + expected: ERROR + +[string-list-ordering.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/structured-clone-transaction-state.any.js.ini b/tests/wpt/meta/indexeddb/structured-clone-transaction-state.any.js.ini new file mode 100644 index 00000000000..21a707b4d48 --- /dev/null +++ b/tests/wpt/meta/indexeddb/structured-clone-transaction-state.any.js.ini @@ -0,0 +1,21 @@ +[structured-clone-transaction-state.any.html] + [Transaction inactive during structured clone in IDBObjectStore.add()] + expected: FAIL + + [Transaction inactive during structured clone in IDBCursor.update()] + expected: FAIL + + [Transaction inactive during structured clone in IDBObjectStore.put()] + expected: FAIL + + +[structured-clone-transaction-state.any.worker.html] + [Transaction inactive during structured clone in IDBObjectStore.add()] + expected: FAIL + + [Transaction inactive during structured clone in IDBCursor.update()] + expected: FAIL + + [Transaction inactive during structured clone in IDBObjectStore.put()] + expected: FAIL + diff --git a/tests/wpt/meta/indexeddb/structured-clone.any.js.ini b/tests/wpt/meta/indexeddb/structured-clone.any.js.ini new file mode 100644 index 00000000000..60be661c658 --- /dev/null +++ b/tests/wpt/meta/indexeddb/structured-clone.any.js.ini @@ -0,0 +1,769 @@ +[structured-clone.any.worker.html] + expected: ERROR + +[structured-clone.any.html] + expected: ERROR + +[structured-clone.any.html?101-last] + [TypeError: TypeError] + expected: FAIL + + [TypeError: TypeError: ghi] + expected: FAIL + + [URIError: URIError] + expected: FAIL + + [URIError: URIError: ghi] + expected: FAIL + + [Array: ] + expected: FAIL + + [Array: 1,2,3] + expected: FAIL + + [Array: foo,bar,,,,,,,,,true,false,,,,,,,,,123,456,,,,,,,,,] + expected: FAIL + + [Array: foo,bar] + expected: FAIL + + [Object: [object Object\]] + expected: FAIL + + [DOMMatrix: matrix(1, 0, 0, 1, 0, 0)] + expected: FAIL + + [DOMMatrixReadOnly: matrix(1, 0, 0, 1, 0, 0)] + expected: FAIL + + [DOMPoint: [object DOMPoint\]] + expected: FAIL + + [DOMPointReadOnly: [object DOMPointReadOnly\]] + expected: FAIL + + [DOMRect: [object DOMRect\]] + expected: FAIL + + [DOMRectReadOnly: [object DOMRectReadOnly\]] + expected: FAIL + + [ImageData: [object ImageData\]] + expected: FAIL + + [Blob: [object Blob\]] + expected: FAIL + + [File: [object File\]] + expected: FAIL + + [FileList: [object FileList\]] + expected: FAIL + + [Not serializable: function: function() {}] + expected: FAIL + + [Not serializable: symbol: Symbol(desc)] + expected: FAIL + + [Not serializable: Window: [object Window\]] + expected: FAIL + + [Not serializable: Event: [object Event\]] + expected: FAIL + + [Not serializable: MessageChannel: [object MessageChannel\]] + expected: FAIL + + +[structured-clone.any.html?41-60] + [Number: 0] + expected: FAIL + + [Number: 1] + expected: FAIL + + [Number: 5e-324] + expected: FAIL + + [Number: 2147483647] + expected: FAIL + + [Number: 2147483648] + expected: FAIL + + [Number: 4294967295] + expected: FAIL + + [Number: 1.7976931348623157e+308] + expected: FAIL + + [Number: Infinity] + expected: FAIL + + [BigInt: -12345678901234567890] + expected: FAIL + + [BigInt: -1] + expected: FAIL + + [BigInt: 0] + expected: FAIL + + [BigInt: 1] + expected: FAIL + + [BigInt: 12345678901234567890] + expected: FAIL + + [String: ] + expected: FAIL + + [String: this is a sample string] + expected: FAIL + + [String: null(\x00)] + expected: FAIL + + [Date: Mon Feb 10 1653 00:55:48 GMT-0517 (Eastern Standard Time)] + expected: FAIL + + [Date: Sun Apr 24 1938 18:13:20 GMT-0400 (Eastern Daylight Saving Time)] + expected: FAIL + + [Date: Sat Dec 20 1969 05:13:20 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 18:43:20 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + +[structured-clone.any.worker.html?21-40] + [number: Infinity] + expected: FAIL + + [bigint: -12345678901234567890] + expected: FAIL + + [bigint: -1] + expected: FAIL + + [bigint: 0] + expected: FAIL + + [bigint: 1] + expected: FAIL + + [bigint: 12345678901234567890] + expected: FAIL + + [string: ] + expected: FAIL + + [string: this is a sample string] + expected: FAIL + + [string: null(\x00)] + expected: FAIL + + [Boolean: false] + expected: FAIL + + [Boolean: true] + expected: FAIL + + [Number: NaN] + expected: FAIL + + [Number: -Infinity] + expected: FAIL + + [Number: -1.7976931348623157e+308] + expected: FAIL + + [Number: -4294967295] + expected: FAIL + + [Number: -2147483648] + expected: FAIL + + [Number: -2147483647] + expected: FAIL + + [Number: -1] + expected: FAIL + + [Number: -5e-324] + expected: FAIL + + [Number: -0] + expected: FAIL + + +[structured-clone.any.worker.html?81-100] + [Uint16Array: 0,1,65534,65535] + expected: FAIL + + [Uint32Array: 0,1,4294967294,4294967295] + expected: FAIL + + [Int8Array: 0,1,-2,-1] + expected: FAIL + + [Int16Array: 0,1,-2,-1] + expected: FAIL + + [Int32Array: 0,1,-2,-1] + expected: FAIL + + [Uint8ClampedArray: 0,1,254,255] + expected: FAIL + + [Float32Array: -Infinity,-1.5,-1,-0.5,0,0.5,1,1.5,Infinity,NaN] + expected: FAIL + + [Float64Array: -Infinity,-1.7976931348623157e+308,-5e-324,0,5e-324,1.7976931348623157e+308,Infinity,NaN] + expected: FAIL + + [Map: [object Map\]] + expected: FAIL + + [Set: [object Set\]] + expected: FAIL + + [Error: Error] + expected: FAIL + + [Error: Error: abc] + expected: FAIL + + [EvalError: EvalError] + expected: FAIL + + [EvalError: EvalError: ghi] + expected: FAIL + + [RangeError: RangeError] + expected: FAIL + + [RangeError: RangeError: ghi] + expected: FAIL + + [ReferenceError: ReferenceError] + expected: FAIL + + [ReferenceError: ReferenceError: ghi] + expected: FAIL + + [SyntaxError: SyntaxError] + expected: FAIL + + [SyntaxError: SyntaxError: ghi] + expected: FAIL + + +[structured-clone.any.worker.html?101-last] + [TypeError: TypeError] + expected: FAIL + + [TypeError: TypeError: ghi] + expected: FAIL + + [URIError: URIError] + expected: FAIL + + [URIError: URIError: ghi] + expected: FAIL + + [Array: ] + expected: FAIL + + [Array: 1,2,3] + expected: FAIL + + [Array: foo,bar,,,,,,,,,true,false,,,,,,,,,123,456,,,,,,,,,] + expected: FAIL + + [Array: foo,bar] + expected: FAIL + + [Object: [object Object\]] + expected: FAIL + + [DOMMatrix: [object DOMMatrix\]] + expected: FAIL + + [DOMMatrixReadOnly: [object DOMMatrixReadOnly\]] + expected: FAIL + + [DOMPoint: [object DOMPoint\]] + expected: FAIL + + [DOMPointReadOnly: [object DOMPointReadOnly\]] + expected: FAIL + + [DOMRect: [object DOMRect\]] + expected: FAIL + + [DOMRectReadOnly: [object DOMRectReadOnly\]] + expected: FAIL + + [ImageData: [object ImageData\]] + expected: FAIL + + [Blob: [object Blob\]] + expected: FAIL + + [File: [object File\]] + expected: FAIL + + [Not serializable: function: function() {}] + expected: FAIL + + [Not serializable: symbol: Symbol(desc)] + expected: FAIL + + [Not serializable: DedicatedWorkerGlobalScope: [object DedicatedWorkerGlobalScope\]] + expected: FAIL + + [Not serializable: Event: [object Event\]] + expected: FAIL + + [Not serializable: MessageChannel: [object MessageChannel\]] + expected: FAIL + + +[structured-clone.any.html?1-20] + [undefined: undefined] + expected: FAIL + + [object: null] + expected: FAIL + + [boolean: false] + expected: FAIL + + [boolean: true] + expected: FAIL + + [number: NaN] + expected: FAIL + + [number: -Infinity] + expected: FAIL + + [number: -1.7976931348623157e+308] + expected: FAIL + + [number: -4294967295] + expected: FAIL + + [number: -2147483648] + expected: FAIL + + [number: -2147483647] + expected: FAIL + + [number: -1] + expected: FAIL + + [number: -5e-324] + expected: FAIL + + [number: -0] + expected: FAIL + + [number: 0] + expected: FAIL + + [number: 1] + expected: FAIL + + [number: 5e-324] + expected: FAIL + + [number: 2147483647] + expected: FAIL + + [number: 2147483648] + expected: FAIL + + [number: 4294967295] + expected: FAIL + + [number: 1.7976931348623157e+308] + expected: FAIL + + +[structured-clone.any.html?21-40] + [number: Infinity] + expected: FAIL + + [bigint: -12345678901234567890] + expected: FAIL + + [bigint: -1] + expected: FAIL + + [bigint: 0] + expected: FAIL + + [bigint: 1] + expected: FAIL + + [bigint: 12345678901234567890] + expected: FAIL + + [string: ] + expected: FAIL + + [string: this is a sample string] + expected: FAIL + + [string: null(\x00)] + expected: FAIL + + [Boolean: false] + expected: FAIL + + [Boolean: true] + expected: FAIL + + [Number: NaN] + expected: FAIL + + [Number: -Infinity] + expected: FAIL + + [Number: -1.7976931348623157e+308] + expected: FAIL + + [Number: -4294967295] + expected: FAIL + + [Number: -2147483648] + expected: FAIL + + [Number: -2147483647] + expected: FAIL + + [Number: -1] + expected: FAIL + + [Number: -5e-324] + expected: FAIL + + [Number: -0] + expected: FAIL + + +[structured-clone.any.html?81-100] + [Uint16Array: 0,1,65534,65535] + expected: FAIL + + [Uint32Array: 0,1,4294967294,4294967295] + expected: FAIL + + [Int8Array: 0,1,-2,-1] + expected: FAIL + + [Int16Array: 0,1,-2,-1] + expected: FAIL + + [Int32Array: 0,1,-2,-1] + expected: FAIL + + [Uint8ClampedArray: 0,1,254,255] + expected: FAIL + + [Float32Array: -Infinity,-1.5,-1,-0.5,0,0.5,1,1.5,Infinity,NaN] + expected: FAIL + + [Float64Array: -Infinity,-1.7976931348623157e+308,-5e-324,0,5e-324,1.7976931348623157e+308,Infinity,NaN] + expected: FAIL + + [Map: [object Map\]] + expected: FAIL + + [Set: [object Set\]] + expected: FAIL + + [Error: Error] + expected: FAIL + + [Error: Error: abc] + expected: FAIL + + [EvalError: EvalError] + expected: FAIL + + [EvalError: EvalError: ghi] + expected: FAIL + + [RangeError: RangeError] + expected: FAIL + + [RangeError: RangeError: ghi] + expected: FAIL + + [ReferenceError: ReferenceError] + expected: FAIL + + [ReferenceError: ReferenceError: ghi] + expected: FAIL + + [SyntaxError: SyntaxError] + expected: FAIL + + [SyntaxError: SyntaxError: ghi] + expected: FAIL + + +[structured-clone.any.worker.html?41-60] + [Number: 0] + expected: FAIL + + [Number: 1] + expected: FAIL + + [Number: 5e-324] + expected: FAIL + + [Number: 2147483647] + expected: FAIL + + [Number: 2147483648] + expected: FAIL + + [Number: 4294967295] + expected: FAIL + + [Number: 1.7976931348623157e+308] + expected: FAIL + + [Number: Infinity] + expected: FAIL + + [BigInt: -12345678901234567890] + expected: FAIL + + [BigInt: -1] + expected: FAIL + + [BigInt: 0] + expected: FAIL + + [BigInt: 1] + expected: FAIL + + [BigInt: 12345678901234567890] + expected: FAIL + + [String: ] + expected: FAIL + + [String: this is a sample string] + expected: FAIL + + [String: null(\x00)] + expected: FAIL + + [Date: Mon Feb 10 1653 00:55:48 GMT-0517 (Eastern Standard Time)] + expected: FAIL + + [Date: Sun Apr 24 1938 18:13:20 GMT-0400 (Eastern Daylight Saving Time)] + expected: FAIL + + [Date: Sat Dec 20 1969 05:13:20 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 18:43:20 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + +[structured-clone.any.worker.html?1-20] + [undefined: undefined] + expected: FAIL + + [object: null] + expected: FAIL + + [boolean: false] + expected: FAIL + + [boolean: true] + expected: FAIL + + [number: NaN] + expected: FAIL + + [number: -Infinity] + expected: FAIL + + [number: -1.7976931348623157e+308] + expected: FAIL + + [number: -4294967295] + expected: FAIL + + [number: -2147483648] + expected: FAIL + + [number: -2147483647] + expected: FAIL + + [number: -1] + expected: FAIL + + [number: -5e-324] + expected: FAIL + + [number: -0] + expected: FAIL + + [number: 0] + expected: FAIL + + [number: 1] + expected: FAIL + + [number: 5e-324] + expected: FAIL + + [number: 2147483647] + expected: FAIL + + [number: 2147483648] + expected: FAIL + + [number: 4294967295] + expected: FAIL + + [number: 1.7976931348623157e+308] + expected: FAIL + + +[structured-clone.any.html?61-80] + [Date: Wed Dec 31 1969 18:59:59 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 19:00:01 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 19:16:40 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Mon Jan 12 1970 08:46:40 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Sat Sep 08 2001 21:46:40 GMT-0400 (Eastern Daylight Saving Time)] + expected: FAIL + + [Date: Sat Nov 20 2286 12:46:40 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [RegExp: /(?:)/] + expected: FAIL + + [RegExp: /abc/] + expected: FAIL + + [RegExp: /abc/g] + expected: FAIL + + [RegExp: /abc/i] + expected: FAIL + + [RegExp: /abc/gi] + expected: FAIL + + [RegExp: /abc/m] + expected: FAIL + + [RegExp: /abc/gm] + expected: FAIL + + [RegExp: /abc/im] + expected: FAIL + + [RegExp: /abc/gim] + expected: FAIL + + [RegExp: /abc/gimsuy] + expected: FAIL + + [ArrayBuffer: [object ArrayBuffer\]] + expected: FAIL + + [Uint8Array: ] + expected: FAIL + + [Uint8Array: 0,1,254,255] + expected: FAIL + + +[structured-clone.any.worker.html?61-80] + [Date: Wed Dec 31 1969 18:59:59 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 19:00:01 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Wed Dec 31 1969 19:16:40 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Mon Jan 12 1970 08:46:40 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [Date: Sat Sep 08 2001 21:46:40 GMT-0400 (Eastern Daylight Saving Time)] + expected: FAIL + + [Date: Sat Nov 20 2286 12:46:40 GMT-0500 (Eastern Standard Time)] + expected: FAIL + + [RegExp: /(?:)/] + expected: FAIL + + [RegExp: /abc/] + expected: FAIL + + [RegExp: /abc/g] + expected: FAIL + + [RegExp: /abc/i] + expected: FAIL + + [RegExp: /abc/gi] + expected: FAIL + + [RegExp: /abc/m] + expected: FAIL + + [RegExp: /abc/gm] + expected: FAIL + + [RegExp: /abc/im] + expected: FAIL + + [RegExp: /abc/gim] + expected: FAIL + + [RegExp: /abc/gimsuy] + expected: FAIL + + [ArrayBuffer: [object ArrayBuffer\]] + expected: FAIL + + [Uint8Array: ] + expected: FAIL + + [Uint8Array: 0,1,254,255] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-abort-generator-revert.any.js.ini b/tests/wpt/meta/indexeddb/transaction-abort-generator-revert.any.js.ini new file mode 100644 index 00000000000..2438eca27ac --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-abort-generator-revert.any.js.ini @@ -0,0 +1,20 @@ +[transaction-abort-generator-revert.any.serviceworker.html] + expected: ERROR + +[transaction-abort-generator-revert.any.sharedworker.html] + expected: ERROR + +[transaction-abort-generator-revert.any.html] + [The current number of a key generator is reverted when a versionchange transaction aborts] + expected: FAIL + + [The current number of a key generator is reverted when a readwrite transaction aborts] + expected: FAIL + + +[transaction-abort-generator-revert.any.worker.html] + [The current number of a key generator is reverted when a versionchange transaction aborts] + expected: FAIL + + [The current number of a key generator is reverted when a readwrite transaction aborts] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-abort-index-metadata-revert.any.js.ini b/tests/wpt/meta/indexeddb/transaction-abort-index-metadata-revert.any.js.ini new file mode 100644 index 00000000000..544dabcf185 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-abort-index-metadata-revert.any.js.ini @@ -0,0 +1,44 @@ +[transaction-abort-index-metadata-revert.any.html] + [Created stores get their indexes marked as deleted after the transaction that created them aborts] + expected: FAIL + + [Deleted stores get their indexes marked as not-deleted after the transaction that deleted them aborts] + expected: FAIL + + [Created+deleted stores still have their indexes marked as deleted after the transaction aborts] + expected: FAIL + + [Created indexes get marked as deleted after their transaction aborts] + expected: FAIL + + [Deleted indexes get marked as not-deleted after the transaction aborts] + expected: FAIL + + [Created+deleted indexes are still marked as deleted after their transaction aborts] + expected: FAIL + + +[transaction-abort-index-metadata-revert.any.serviceworker.html] + expected: ERROR + +[transaction-abort-index-metadata-revert.any.sharedworker.html] + expected: ERROR + +[transaction-abort-index-metadata-revert.any.worker.html] + [Created stores get their indexes marked as deleted after the transaction that created them aborts] + expected: FAIL + + [Deleted stores get their indexes marked as not-deleted after the transaction that deleted them aborts] + expected: FAIL + + [Created+deleted stores still have their indexes marked as deleted after the transaction aborts] + expected: FAIL + + [Created indexes get marked as deleted after their transaction aborts] + expected: FAIL + + [Deleted indexes get marked as not-deleted after the transaction aborts] + expected: FAIL + + [Created+deleted indexes are still marked as deleted after their transaction aborts] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-abort-multiple-metadata-revert.any.js.ini b/tests/wpt/meta/indexeddb/transaction-abort-multiple-metadata-revert.any.js.ini new file mode 100644 index 00000000000..983b3de959b --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-abort-multiple-metadata-revert.any.js.ini @@ -0,0 +1,27 @@ +[transaction-abort-multiple-metadata-revert.any.html] + [Deleted indexes in newly created stores are still marked as deleted after the transaction aborts] + expected: FAIL + + [Deleted indexes in deleted stores are still marked as not-deleted after the transaction aborts] + expected: FAIL + + [Deleted indexes in created+deleted stores are still marked as deleted after their transaction aborts] + expected: FAIL + + +[transaction-abort-multiple-metadata-revert.any.worker.html] + [Deleted indexes in newly created stores are still marked as deleted after the transaction aborts] + expected: FAIL + + [Deleted indexes in deleted stores are still marked as not-deleted after the transaction aborts] + expected: FAIL + + [Deleted indexes in created+deleted stores are still marked as deleted after their transaction aborts] + expected: FAIL + + +[transaction-abort-multiple-metadata-revert.any.sharedworker.html] + expected: ERROR + +[transaction-abort-multiple-metadata-revert.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/transaction-abort-object-store-metadata-revert.any.js.ini b/tests/wpt/meta/indexeddb/transaction-abort-object-store-metadata-revert.any.js.ini new file mode 100644 index 00000000000..b8d4d4fe832 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-abort-object-store-metadata-revert.any.js.ini @@ -0,0 +1,32 @@ +[transaction-abort-object-store-metadata-revert.any.worker.html] + [Created stores get marked as deleted after their transaction aborts] + expected: FAIL + + [Deleted stores get marked as not-deleted after the transaction aborts] + expected: FAIL + + [Created+deleted stores are still marked as deleted after their transaction aborts] + expected: FAIL + + [Un-instantiated deleted stores get marked as not-deleted after the transaction aborts] + expected: FAIL + + +[transaction-abort-object-store-metadata-revert.any.serviceworker.html] + expected: ERROR + +[transaction-abort-object-store-metadata-revert.any.sharedworker.html] + expected: ERROR + +[transaction-abort-object-store-metadata-revert.any.html] + [Created stores get marked as deleted after their transaction aborts] + expected: FAIL + + [Deleted stores get marked as not-deleted after the transaction aborts] + expected: FAIL + + [Created+deleted stores are still marked as deleted after their transaction aborts] + expected: FAIL + + [Un-instantiated deleted stores get marked as not-deleted after the transaction aborts] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-abort-request-error.any.js.ini b/tests/wpt/meta/indexeddb/transaction-abort-request-error.any.js.ini new file mode 100644 index 00000000000..094b17a721b --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-abort-request-error.any.js.ini @@ -0,0 +1,15 @@ +[transaction-abort-request-error.any.worker.html] + [Properties of error events fired at requests when aborting a transaction] + expected: FAIL + + +[transaction-abort-request-error.any.serviceworker.html] + expected: ERROR + +[transaction-abort-request-error.any.html] + [Properties of error events fired at requests when aborting a transaction] + expected: FAIL + + +[transaction-abort-request-error.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/transaction-create_in_versionchange.any.js.ini b/tests/wpt/meta/indexeddb/transaction-create_in_versionchange.any.js.ini new file mode 100644 index 00000000000..02be39d0ac3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-create_in_versionchange.any.js.ini @@ -0,0 +1,13 @@ +[transaction-create_in_versionchange.any.html] + [Attempt to create new transactions inside a versionchange transaction] + expected: FAIL + + +[transaction-create_in_versionchange.any.serviceworker.html] + expected: ERROR + +[transaction-create_in_versionchange.any.worker.html] + expected: CRASH + +[transaction-create_in_versionchange.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/transaction-deactivation-timing.any.js.ini b/tests/wpt/meta/indexeddb/transaction-deactivation-timing.any.js.ini new file mode 100644 index 00000000000..8de17c31cfd --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-deactivation-timing.any.js.ini @@ -0,0 +1,38 @@ +[transaction-deactivation-timing.any.serviceworker.html] + expected: ERROR + +[transaction-deactivation-timing.any.sharedworker.html] + expected: ERROR + +[transaction-deactivation-timing.any.html] + [New transactions are deactivated before next task] + expected: FAIL + + [New transactions are not deactivated until after the microtask checkpoint] + expected: FAIL + + [New transactions from microtask are deactivated before next task] + expected: FAIL + + [New transactions from microtask are still active through the microtask checkpoint] + expected: FAIL + + [Deactivation of new transactions happens at end of invocation] + expected: FAIL + + +[transaction-deactivation-timing.any.worker.html] + [New transactions are deactivated before next task] + expected: FAIL + + [New transactions are not deactivated until after the microtask checkpoint] + expected: FAIL + + [New transactions from microtask are deactivated before next task] + expected: FAIL + + [New transactions from microtask are still active through the microtask checkpoint] + expected: FAIL + + [Deactivation of new transactions happens at end of invocation] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-lifetime-empty.any.js.ini b/tests/wpt/meta/indexeddb/transaction-lifetime-empty.any.js.ini new file mode 100644 index 00000000000..14993aeb1c6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-lifetime-empty.any.js.ini @@ -0,0 +1,20 @@ +[transaction-lifetime-empty.any.serviceworker.html] + expected: ERROR + +[transaction-lifetime-empty.any.sharedworker.html] + expected: ERROR + +[transaction-lifetime-empty.any.worker.html] + [Transactions without requests complete in the expected order] + expected: FAIL + + [Multiple transactions without requests complete in the expected order] + expected: FAIL + + +[transaction-lifetime-empty.any.html] + [Transactions without requests complete in the expected order] + expected: FAIL + + [Multiple transactions without requests complete in the expected order] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-lifetime.any.js.ini b/tests/wpt/meta/indexeddb/transaction-lifetime.any.js.ini new file mode 100644 index 00000000000..474a58230fb --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-lifetime.any.js.ini @@ -0,0 +1,21 @@ +[transaction-lifetime.any.worker.html] + [No Blocked event] + expected: FAIL + + [Blocked event] + expected: FAIL + + +[transaction-lifetime.any.html] + [No Blocked event] + expected: FAIL + + [Blocked event] + expected: FAIL + + +[transaction-lifetime.any.serviceworker.html] + expected: ERROR + +[transaction-lifetime.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/transaction-relaxed-durability.any.js.ini b/tests/wpt/meta/indexeddb/transaction-relaxed-durability.any.js.ini new file mode 100644 index 00000000000..b1cd92c8fe7 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-relaxed-durability.any.js.ini @@ -0,0 +1,38 @@ +[transaction-relaxed-durability.any.worker.html] + [Committed data can be read back out: case 0] + expected: FAIL + + [Committed data can be read back out: case 1] + expected: FAIL + + [Committed data can be read back out: case 2] + expected: FAIL + + [Committed data can be read back out: case 3] + expected: FAIL + + [Committed data can be read back out: case 4] + expected: FAIL + + [Invalid durability option throws a TypeError] + expected: FAIL + + +[transaction-relaxed-durability.any.html] + [Committed data can be read back out: case 0] + expected: FAIL + + [Committed data can be read back out: case 1] + expected: FAIL + + [Committed data can be read back out: case 2] + expected: FAIL + + [Committed data can be read back out: case 3] + expected: FAIL + + [Committed data can be read back out: case 4] + expected: FAIL + + [Invalid durability option throws a TypeError] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-requestqueue.any.js.ini b/tests/wpt/meta/indexeddb/transaction-requestqueue.any.js.ini new file mode 100644 index 00000000000..884f17eccac --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-requestqueue.any.js.ini @@ -0,0 +1,13 @@ +[transaction-requestqueue.any.serviceworker.html] + expected: ERROR + +[transaction-requestqueue.any.html] + [Transactions have a request queue] + expected: FAIL + + +[transaction-requestqueue.any.sharedworker.html] + expected: ERROR + +[transaction-requestqueue.any.worker.html] + expected: CRASH diff --git a/tests/wpt/meta/indexeddb/transaction-scheduling-across-connections.any.js.ini b/tests/wpt/meta/indexeddb/transaction-scheduling-across-connections.any.js.ini new file mode 100644 index 00000000000..fe676ced0b6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-scheduling-across-connections.any.js.ini @@ -0,0 +1,8 @@ +[transaction-scheduling-across-connections.any.worker.html] + [Check that readwrite transactions with overlapping scopes do not run in parallel.] + expected: FAIL + + +[transaction-scheduling-across-connections.any.html] + [Check that readwrite transactions with overlapping scopes do not run in parallel.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-scheduling-across-databases.any.js.ini b/tests/wpt/meta/indexeddb/transaction-scheduling-across-databases.any.js.ini new file mode 100644 index 00000000000..d54bdf8d70b --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-scheduling-across-databases.any.js.ini @@ -0,0 +1,8 @@ +[transaction-scheduling-across-databases.any.worker.html] + [Check that transactions in different databases can run in parallel.] + expected: FAIL + + +[transaction-scheduling-across-databases.any.html] + [Check that transactions in different databases can run in parallel.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-scheduling-mixed-scopes.any.js.ini b/tests/wpt/meta/indexeddb/transaction-scheduling-mixed-scopes.any.js.ini new file mode 100644 index 00000000000..6480929bfb6 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-scheduling-mixed-scopes.any.js.ini @@ -0,0 +1,8 @@ +[transaction-scheduling-mixed-scopes.any.html] + [Check that scope restrictions on mixed transactions are enforced.] + expected: FAIL + + +[transaction-scheduling-mixed-scopes.any.worker.html] + [Check that scope restrictions on mixed transactions are enforced.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-scheduling-ordering.any.js.ini b/tests/wpt/meta/indexeddb/transaction-scheduling-ordering.any.js.ini new file mode 100644 index 00000000000..1144c01feeb --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-scheduling-ordering.any.js.ini @@ -0,0 +1,8 @@ +[transaction-scheduling-ordering.any.html] + [Verify Indexed DB transactions are ordered per spec] + expected: FAIL + + +[transaction-scheduling-ordering.any.worker.html] + [Verify Indexed DB transactions are ordered per spec] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-scheduling-ro-waits-for-rw.any.js.ini b/tests/wpt/meta/indexeddb/transaction-scheduling-ro-waits-for-rw.any.js.ini new file mode 100644 index 00000000000..88353175476 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-scheduling-ro-waits-for-rw.any.js.ini @@ -0,0 +1,8 @@ +[transaction-scheduling-ro-waits-for-rw.any.html] + [readonly transaction should see the result of a previous readwrite transaction] + expected: FAIL + + +[transaction-scheduling-ro-waits-for-rw.any.worker.html] + [readonly transaction should see the result of a previous readwrite transaction] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-scheduling-rw-scopes.any.js.ini b/tests/wpt/meta/indexeddb/transaction-scheduling-rw-scopes.any.js.ini new file mode 100644 index 00000000000..9faf27b8f46 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-scheduling-rw-scopes.any.js.ini @@ -0,0 +1,8 @@ +[transaction-scheduling-rw-scopes.any.worker.html] + [Check that scope restrictions on read-write transactions are enforced.] + expected: FAIL + + +[transaction-scheduling-rw-scopes.any.html] + [Check that scope restrictions on read-write transactions are enforced.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction-scheduling-within-database.any.js.ini b/tests/wpt/meta/indexeddb/transaction-scheduling-within-database.any.js.ini new file mode 100644 index 00000000000..07c2759d5bb --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction-scheduling-within-database.any.js.ini @@ -0,0 +1,8 @@ +[transaction-scheduling-within-database.any.html] + [Check that read-only transactions within a database can run in parallel.] + expected: FAIL + + +[transaction-scheduling-within-database.any.worker.html] + [Check that read-only transactions within a database can run in parallel.] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/transaction_bubble-and-capture.any.js.ini b/tests/wpt/meta/indexeddb/transaction_bubble-and-capture.any.js.ini new file mode 100644 index 00000000000..e09b4c21ed7 --- /dev/null +++ b/tests/wpt/meta/indexeddb/transaction_bubble-and-capture.any.js.ini @@ -0,0 +1,13 @@ +[transaction_bubble-and-capture.any.worker.html] + expected: CRASH + +[transaction_bubble-and-capture.any.html] + [Capture and bubble] + expected: FAIL + + +[transaction_bubble-and-capture.any.serviceworker.html] + expected: ERROR + +[transaction_bubble-and-capture.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/upgrade-transaction-deactivation-timing.any.js.ini b/tests/wpt/meta/indexeddb/upgrade-transaction-deactivation-timing.any.js.ini new file mode 100644 index 00000000000..0bb5f4389aa --- /dev/null +++ b/tests/wpt/meta/indexeddb/upgrade-transaction-deactivation-timing.any.js.ini @@ -0,0 +1,27 @@ +[upgrade-transaction-deactivation-timing.any.worker.html] + [Upgrade transactions are active in upgradeneeded callback] + expected: FAIL + + [Upgrade transactions are active in upgradeneeded callback and microtasks] + expected: FAIL + + [Upgrade transactions are deactivated before next task] + expected: FAIL + + +[upgrade-transaction-deactivation-timing.any.serviceworker.html] + expected: ERROR + +[upgrade-transaction-deactivation-timing.any.html] + [Upgrade transactions are active in upgradeneeded callback] + expected: FAIL + + [Upgrade transactions are active in upgradeneeded callback and microtasks] + expected: FAIL + + [Upgrade transactions are deactivated before next task] + expected: FAIL + + +[upgrade-transaction-deactivation-timing.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-backend-aborted.any.js.ini b/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-backend-aborted.any.js.ini new file mode 100644 index 00000000000..dda35a4f61f --- /dev/null +++ b/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-backend-aborted.any.js.ini @@ -0,0 +1,20 @@ +[upgrade-transaction-lifecycle-backend-aborted.any.sharedworker.html] + expected: ERROR + +[upgrade-transaction-lifecycle-backend-aborted.any.serviceworker.html] + expected: ERROR + +[upgrade-transaction-lifecycle-backend-aborted.any.html] + [in the abort event handler for a transaction aborted due to an unhandled request error] + expected: FAIL + + [in a setTimeout(0) callback after the abort event is fired for a transaction aborted due to an unhandled request failure] + expected: FAIL + + +[upgrade-transaction-lifecycle-backend-aborted.any.worker.html] + [in the abort event handler for a transaction aborted due to an unhandled request error] + expected: FAIL + + [in a setTimeout(0) callback after the abort event is fired for a transaction aborted due to an unhandled request failure] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-committed.any.js.ini b/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-committed.any.js.ini new file mode 100644 index 00000000000..6fe7be9f110 --- /dev/null +++ b/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-committed.any.js.ini @@ -0,0 +1,20 @@ +[upgrade-transaction-lifecycle-committed.any.worker.html] + [in the complete event handler for a committed transaction] + expected: FAIL + + [in a setTimeout(0) callback after the complete event is fired for a committed transaction] + expected: FAIL + + +[upgrade-transaction-lifecycle-committed.any.sharedworker.html] + expected: ERROR + +[upgrade-transaction-lifecycle-committed.any.serviceworker.html] + expected: ERROR + +[upgrade-transaction-lifecycle-committed.any.html] + [in the complete event handler for a committed transaction] + expected: FAIL + + [in a setTimeout(0) callback after the complete event is fired for a committed transaction] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-user-aborted.any.js.ini b/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-user-aborted.any.js.ini new file mode 100644 index 00000000000..e01a019c1b3 --- /dev/null +++ b/tests/wpt/meta/indexeddb/upgrade-transaction-lifecycle-user-aborted.any.js.ini @@ -0,0 +1,32 @@ +[upgrade-transaction-lifecycle-user-aborted.any.worker.html] + [synchronously after abort() is called] + expected: FAIL + + [in a promise microtask after abort() is called, before the transaction abort event is fired] + expected: FAIL + + [in the abort event handler for a transaction aborted due to an abort() call] + expected: FAIL + + [in a setTimeout(0) callback after the abort event is fired for a transaction aborted due to an abort() call] + expected: FAIL + + +[upgrade-transaction-lifecycle-user-aborted.any.sharedworker.html] + expected: ERROR + +[upgrade-transaction-lifecycle-user-aborted.any.serviceworker.html] + expected: ERROR + +[upgrade-transaction-lifecycle-user-aborted.any.html] + [synchronously after abort() is called] + expected: FAIL + + [in a promise microtask after abort() is called, before the transaction abort event is fired] + expected: FAIL + + [in the abort event handler for a transaction aborted due to an abort() call] + expected: FAIL + + [in a setTimeout(0) callback after the abort event is fired for a transaction aborted due to an abort() call] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/value.any.js.ini b/tests/wpt/meta/indexeddb/value.any.js.ini new file mode 100644 index 00000000000..3edf0eb2328 --- /dev/null +++ b/tests/wpt/meta/indexeddb/value.any.js.ini @@ -0,0 +1,34 @@ +[value.any.worker.html] + expected: CRASH + +[value.any.html] + [BigInts as values in IndexedDB - primitive BigInt] + expected: FAIL + + [BigInts as values in IndexedDB - BigInt object] + expected: FAIL + + [BigInts as values in IndexedDB - primitive BigInt inside object] + expected: FAIL + + [BigInts as values in IndexedDB - BigInt object inside object] + expected: FAIL + + [BigInts as keys in IndexedDB - primitive BigInt] + expected: FAIL + + [BigInts as keys in IndexedDB - BigInt object] + expected: FAIL + + [Values - Date] + expected: FAIL + + [Values - Array] + expected: FAIL + + +[value.any.sharedworker.html] + expected: ERROR + +[value.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/value_recursive.any.js.ini b/tests/wpt/meta/indexeddb/value_recursive.any.js.ini new file mode 100644 index 00000000000..67290a52a48 --- /dev/null +++ b/tests/wpt/meta/indexeddb/value_recursive.any.js.ini @@ -0,0 +1,19 @@ +[value_recursive.any.html] + [Recursive value - array directly contains self] + expected: FAIL + + [Recursive value - array indirectly contains self] + expected: FAIL + + [Recursive value - array member contains self] + expected: FAIL + + +[value_recursive.any.worker.html] + expected: CRASH + +[value_recursive.any.sharedworker.html] + expected: ERROR + +[value_recursive.any.serviceworker.html] + expected: ERROR diff --git a/tests/wpt/meta/indexeddb/worker-termination-aborts-upgrade.window.js.ini b/tests/wpt/meta/indexeddb/worker-termination-aborts-upgrade.window.js.ini new file mode 100644 index 00000000000..8cb2e78546c --- /dev/null +++ b/tests/wpt/meta/indexeddb/worker-termination-aborts-upgrade.window.js.ini @@ -0,0 +1,4 @@ +[worker-termination-aborts-upgrade.window.html] + expected: ERROR + [Worker Termination Aborts a Pending Upgrade] + expected: FAIL diff --git a/tests/wpt/meta/indexeddb/writer-starvation.any.js.ini b/tests/wpt/meta/indexeddb/writer-starvation.any.js.ini new file mode 100644 index 00000000000..3ac103d2141 --- /dev/null +++ b/tests/wpt/meta/indexeddb/writer-starvation.any.js.ini @@ -0,0 +1,13 @@ +[writer-starvation.any.serviceworker.html] + expected: ERROR + +[writer-starvation.any.sharedworker.html] + expected: ERROR + +[writer-starvation.any.html] + [IDB read requests should not starve write requests] + expected: FAIL + + +[writer-starvation.any.worker.html] + expected: CRASH