Reland "[IndexedDB] Update and reenable tests after removing security origin support in the frontend"
Flaky resources-panel test fixed by https://chromium-review.googlesource.com/c/chromium/src/+/4020272
This is a reland of commit 1ba6a133bd9b0fe4c5866e10d4aeb07d6dc22ab6
Original change's description:
> [IndexedDB] Update and reenable tests after removing security origin
> support in the frontend
>
> Bug: 1347831
> Change-Id: I698454fc7eddd7f1eb6164067213f3d0a329aa7f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3964120
> Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
> Reviewed-by: Danil Somsikov <dsv@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1062101}
Bug: 1347831
Change-Id: I87d72151f1359b3cb9342e4e85c15f4fd222213b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3991508
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1069714}
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations
index aa823f1..619a890 100644
--- a/third_party/blink/web_tests/TestExpectations
+++ b/third_party/blink/web_tests/TestExpectations
@@ -7582,20 +7582,14 @@
# Sheriff 2022-10-19
crbug.com/1376307 [ Fuchsia ] tables/mozilla_expected_failures/bugs/bug1055-2.html [ Failure ]
-# Temporarily disable tests to land IndexedDB reprioritisation changes
-crbug.com/1347831 http/tests/devtools/indexeddb/delete-entry.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/application-panel/resources-panel-idb-clear-for-origin.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/live-update-indexeddb-content.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/resources-panel.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/database-data.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/database-names.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/database-structure.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/database-version-number.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/track-valid-origin.js [ Skip ]
-crbug.com/1347831 http/tests/devtools/indexeddb/upgrade-events.js [ Skip ]
-
# Test times out on Linux MSAN
crbug.com/1381545 [ Linux ] virtual/wasm-code-caching/http/tests/wasm/caching/code-cache.html [ Pass Timeout ]
+# Disabled to land devtools-frontend change:
+crbug.com/1376854 http/tests/devtools/elements/accessibility/autocomplete-attribute.js [ Skip ]
+crbug.com/1376854 http/tests/devtools/elements/styles-3/style-autocomplete.js [ Skip ]
+
+# WebRTC: temporarily disabled to allow new WebRTC stats to roll.
+crbug.com/webrtc/14619 external/wpt/webrtc-stats/supported-stats.html [ Failure Pass ]
# Sheriff 2022-10-20
crbug.com/1376822 [ Win11 ] external/wpt/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html [ Failure ]
diff --git a/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-origin-expected.txt b/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-origin-expected.txt
deleted file mode 100644
index c780b570..0000000
--- a/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-origin-expected.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Validate IndexeddbModel clearForOrigin
-
-Create IndexedDB in main frame
-Database Length: 1
-Database Entries:
- Security Origin:http://127.0.0.1:8000, Database Name:Database-main-frame
-**done**
-
-Removing bogus security origin...
-Database Length: 1
-Database Entries:
- Security Origin:http://127.0.0.1:8000, Database Name:Database-main-frame
-**done**
-
-Removing http://127.0.0.1:8000 security origin...
-Database Length: 0
-Database Entries:
-**done**
-
-
diff --git a/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-storage-key-expected.txt b/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-storage-key-expected.txt
new file mode 100644
index 0000000..f18d4f31
--- /dev/null
+++ b/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-storage-key-expected.txt
@@ -0,0 +1,20 @@
+Validate IndexeddbModel clearForStorageKey
+
+Create IndexedDB in main frame
+Database Length: 1
+Database Entries:
+ Storage key:http://127.0.0.1:8000/, Database Name:Database-main-frame
+**done**
+
+Removing bogus security origin...
+Database Length: 1
+Database Entries:
+ Storage key:http://127.0.0.1:8000/, Database Name:Database-main-frame
+**done**
+
+Removing http://127.0.0.1:8000 security origin...
+Database Length: 0
+Database Entries:
+**done**
+
+
diff --git a/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-origin.js b/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-storage-key.js
similarity index 85%
rename from third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-origin.js
rename to third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-storage-key.js
index f12c6f1..a67b6d69 100644
--- a/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-origin.js
+++ b/third_party/blink/web_tests/http/tests/devtools/application-panel/resources-panel-idb-clear-for-storage-key.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
(async function() {
- TestRunner.addResult(`Validate IndexeddbModel clearForOrigin\n`);
+ TestRunner.addResult(`Validate IndexeddbModel clearForStorageKey\n`);
await TestRunner.loadLegacyModule('console'); await TestRunner.loadTestModule('application_test_runner');
// Note: every test that uses a storage API must manually clean-up state from previous tests.
await ApplicationTestRunner.resetState();
@@ -30,7 +30,7 @@
TestRunner.addResult('Database Length: ' + databases.length);
TestRunner.addResult('Database Entries:');
for (let j = 0; j < databases.length; ++j)
- TestRunner.addResult(` Security Origin:${databases[j].securityOrigin}, Database Name:${databases[j].name}`);
+ TestRunner.addResult(` Storage key:${databases[j].storageKey}, Database Name:${databases[j].name}`);
TestRunner.addResult('**done**\n');
}
@@ -40,11 +40,11 @@
dumpDatabases();
TestRunner.addResult('Removing bogus security origin...');
- model.clearForOrigin('http://bogus-security-origin.com');
+ model.clearForStorageKey('http://bogus-security-origin.com/');
dumpDatabases();
TestRunner.addResult('Removing http://127.0.0.1:8000 security origin...');
- model.clearForOrigin('http://127.0.0.1:8000');
+ model.clearForStorageKey('http://127.0.0.1:8000/');
dumpDatabases();
TestRunner.completeTest();
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-data.js b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-data.js
index 959541fd..a4b507f 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-data.js
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-data.js
@@ -11,12 +11,12 @@
var indexedDBModel = ApplicationTestRunner.createIndexedDBModel();
var mainFrameId = TestRunner.resourceTreeModel.mainFrame.id;
- var securityOrigin = 'http://127.0.0.1:8000';
+ var storageKey = 'http://127.0.0.1:8000/';
var databaseName = 'testDatabase';
var objectStoreName1 = 'testObjectStore1';
var objectStoreName2 = 'testObjectStore2';
var indexName = 'testIndexName';
- var databaseId = new Resources.IndexedDBModel.DatabaseId(securityOrigin, /* storageKey */ undefined, databaseName);
+ var databaseId = new Resources.IndexedDBModel.DatabaseId(storageKey, databaseName);
/**
* @param {number} count
@@ -87,7 +87,7 @@
}
}
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', fillDatabase, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', fillDatabase, false);
function fillDatabase() {
ApplicationTestRunner.createDatabase(mainFrameId, databaseName, step2);
@@ -118,7 +118,7 @@
databaseId, {name: objectStoreName2, autoIncrement: true}).then(printMetadata);
resolve();
});
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', refreshDatabase, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', refreshDatabase, false);
indexedDBModel.refreshDatabaseNames();
function printMetadata(metadata) {
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-names.js b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-names.js
index b32276e..e544de1 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-names.js
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-names.js
@@ -5,7 +5,7 @@
(async function() {
TestRunner.addResult(`Tests that database names are correctly loaded and saved in IndexedDBModel.\n`);
await TestRunner.loadLegacyModule('console'); await TestRunner.loadTestModule('application_test_runner');
- // Note: every test that uses a storage API must manually clean-up state from previous tests.
+ //Note: every test that uses a storage API must manually clean-up state from previous tests.
await ApplicationTestRunner.resetState();
var indexedDBModel = ApplicationTestRunner.createIndexedDBModel();
@@ -13,15 +13,15 @@
function dumpDatabaseNames() {
TestRunner.addResult('Dumping database names:');
- var securityOrigins = TestRunner.securityOriginManager.securityOrigins();
- var securityOrigin = securityOrigins[0];
- var names = indexedDBModel.databaseNamesBySecurityOrigin.get(securityOrigin);
+ var storageKeys = TestRunner.storageKeyManager.storageKeys();
+ var storageKey = storageKeys[0];
+ var names = indexedDBModel.databaseNamesByStorageKey.get(storageKey);
for (let name of names || [])
TestRunner.addResult(' ' + name);
TestRunner.addResult('');
}
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step2, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step2, false);
function step2() {
dumpDatabaseNames();
@@ -29,7 +29,7 @@
}
function step3() {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step4, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step4, false);
indexedDBModel.refreshDatabaseNames();
}
@@ -39,7 +39,7 @@
}
function step5() {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step6, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step6, false);
indexedDBModel.refreshDatabaseNames();
}
@@ -49,7 +49,7 @@
}
function step7() {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step8, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step8, false);
indexedDBModel.refreshDatabaseNames();
}
@@ -59,7 +59,7 @@
}
function step9() {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step10, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step10, false);
indexedDBModel.refreshDatabaseNames();
}
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-structure.js b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-structure.js
index 4a9fdf2a..5dd9dcd2 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-structure.js
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-structure.js
@@ -11,8 +11,8 @@
var indexedDBModel = ApplicationTestRunner.createIndexedDBModel();
var mainFrameId = TestRunner.resourceTreeModel.mainFrame.id;
var databaseName = 'testDatabase1';
- var securityOrigin = 'http://127.0.0.1:8000';
- var databaseId = new Resources.IndexedDBModel.DatabaseId(securityOrigin, /* storageKey */ undefined, databaseName);
+ var storageKey = 'http://127.0.0.1:8000/';
+ var databaseId = new Resources.IndexedDBModel.DatabaseId(storageKey, databaseName);
function dumpDatabase() {
TestRunner.addResult('Dumping database:');
@@ -43,14 +43,14 @@
TestRunner.addResult('');
}
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step2, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step2, false);
function step2() {
ApplicationTestRunner.createDatabase(mainFrameId, databaseName, step3);
}
function step3() {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step4, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step4, false);
indexedDBModel.refreshDatabaseNames();
}
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-version-number.js b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-version-number.js
index 9e9cc3a..e7301c7 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-version-number.js
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/database-version-number.js
@@ -11,8 +11,8 @@
var indexedDBModel = ApplicationTestRunner.createIndexedDBModel();
var mainFrameId = TestRunner.resourceTreeModel.mainFrame.id;
var databaseName = 'testDatabase1';
- var securityOrigin = 'http://127.0.0.1:8000';
- var databaseId = new Resources.IndexedDBModel.DatabaseId(securityOrigin, /* storageKey */ undefined, databaseName);
+ var storageKey = 'http://127.0.0.1:8000/';
+ var databaseId = new Resources.IndexedDBModel.DatabaseId(storageKey, databaseName);
function dumpDatabase() {
TestRunner.addResult('Dumping database:');
@@ -43,14 +43,14 @@
TestRunner.addResult('');
}
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step2, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step2, false);
function step2() {
ApplicationTestRunner.createDatabaseWithVersion(mainFrameId, databaseName, 2147483647, step3);
}
function step3() {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step4, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step4, false);
indexedDBModel.refreshDatabaseNames();
}
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/delete-entry-expected.txt b/third_party/blink/web_tests/http/tests/devtools/indexeddb/delete-entry-expected.txt
index d31abdf..abce03e7 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/delete-entry-expected.txt
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/delete-entry-expected.txt
@@ -1,7 +1,7 @@
Tests object store and index entry deletion.
Dumping IndexedDB tree:
- database: database1 - http://127.0.0.1:8000
+ database: database1 - http://127.0.0.1:8000/
Object store: objectStore1
Index: index1
Dumping ObjectStore data:
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/live-update-indexeddb-content-expected.txt b/third_party/blink/web_tests/http/tests/devtools/indexeddb/live-update-indexeddb-content-expected.txt
index e1ba5d1..7e6ad58 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/live-update-indexeddb-content-expected.txt
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/live-update-indexeddb-content-expected.txt
@@ -1,7 +1,7 @@
Tests that the IndexedDB database content live updates.
Dumping IndexedDB tree:
- database: database1 - http://127.0.0.1:8000
+ database: database1 - http://127.0.0.1:8000/
Object store: objectStore1
Index: index1
Object store marked needs refresh = false
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel-expected.txt b/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel-expected.txt
index 1c7bde6..22e31fe 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel-expected.txt
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel-expected.txt
@@ -8,7 +8,7 @@
Refreshing.
Refreshed.
Dumping IndexedDB tree:
- database: testDatabase - http://127.0.0.1:8000
+ database: testDatabase - http://127.0.0.1:8000/
Object store: testObjectStore
Index: testIndexName
Navigating to another security origin.
@@ -20,7 +20,7 @@
Refreshing.
Refreshed.
Dumping IndexedDB tree:
- database: testDatabase - http://127.0.0.1:8000
+ database: testDatabase - http://127.0.0.1:8000/
Object store: testObjectStore
Index: testIndexName
Deleting database.
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel.js b/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel.js
index f8ca0d53..c07c322d 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel.js
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/resources-panel.js
@@ -80,6 +80,7 @@
function navigatedAway() {
TestRunner.addResult('Navigated to another security origin.');
+ indexedDBModel.removeEventListener(Resources.IndexedDBModel.Events.DatabaseRemoved);
ApplicationTestRunner.dumpIndexedDBTree();
TestRunner.addResult('Navigating back.');
TestRunner.navigate(originalURL, navigatedBack);
@@ -107,7 +108,7 @@
TestRunner.addResult('Refreshing.');
UI.panels.resources.sidebar.indexedDBListTreeElement.refreshIndexedDB();
TestRunner.addSniffer(
- Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', databaseNamesLoadedAfterDeleting, false);
+ Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', databaseNamesLoadedAfterDeleting, false);
}
function databaseNamesLoadedAfterDeleting() {
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/track-valid-origin-expected.txt b/third_party/blink/web_tests/http/tests/devtools/indexeddb/track-valid-origin-expected.txt
deleted file mode 100644
index b0ef1f0a..0000000
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/track-valid-origin-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Tests that IndexedDB live update only tracks valid security origins.
-
-Invalid Origins:
-http, valid = false
-test://fake, valid = false
-test://fake.origin.com, valid = false
-chrome://test, valid = false
-
-Valid Origins:
-http://fake.origin.com, valid = true
-https://fake.origin.com, valid = true
-
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/track-valid-origin.js b/third_party/blink/web_tests/http/tests/devtools/indexeddb/track-valid-origin.js
deleted file mode 100644
index a567cbe..0000000
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/track-valid-origin.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 The Chromium Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-(async function() {
- TestRunner.addResult(`Tests that IndexedDB live update only tracks valid security origins.\n`);
- await TestRunner.loadLegacyModule('console'); await TestRunner.loadTestModule('application_test_runner');
- // Note: every test that uses a storage API must manually clean-up state from previous tests.
- await ApplicationTestRunner.resetState();
-
- let indexedDBModel = TestRunner.mainTarget.model(Resources.IndexedDBModel);
- let invalidOrigins = ['http', 'test://fake', 'test://fake.origin.com', 'chrome://test'];
- let validOrigins = ['http://fake.origin.com', 'https://fake.origin.com'];
-
- TestRunner.addResult('Invalid Origins:');
- invalidOrigins.map(origin => {
- TestRunner.addResult(origin + ', valid = ' + indexedDBModel.isValidSecurityOrigin(origin));
- });
- TestRunner.addResult('\nValid Origins:');
- validOrigins.map(origin => {
- TestRunner.addResult(origin + ', valid = ' + indexedDBModel.isValidSecurityOrigin(origin));
- });
- TestRunner.completeTest();
-})();
diff --git a/third_party/blink/web_tests/http/tests/devtools/indexeddb/upgrade-events.js b/third_party/blink/web_tests/http/tests/devtools/indexeddb/upgrade-events.js
index 0b675b9..8a84dec6 100644
--- a/third_party/blink/web_tests/http/tests/devtools/indexeddb/upgrade-events.js
+++ b/third_party/blink/web_tests/http/tests/devtools/indexeddb/upgrade-events.js
@@ -10,10 +10,10 @@
var indexedDBModel = ApplicationTestRunner.createIndexedDBModel();
var mainFrameId = TestRunner.resourceTreeModel.mainFrame.id;
- var securityOrigin = 'http://127.0.0.1:8000';
+ var storageKey = 'http://127.0.0.1:8000/';
var databaseName = 'testDatabase - ' + self.location;
var objectStoreName = 'testObjectStore';
- var databaseId = new Resources.IndexedDBModel.DatabaseId(securityOrigin, /* storageKey */ undefined, databaseName);
+ var databaseId = new Resources.IndexedDBModel.DatabaseId(storageKey, databaseName);
function onConsoleError(callback) {
var old = console.error;
@@ -50,7 +50,7 @@
}
}
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', fillDatabase, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', fillDatabase, false);
function fillDatabase() {
TestRunner.addResult('Preparing database');
@@ -104,22 +104,22 @@
}
function checkDatabaseDoesExist(callback) {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step2, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step2, false);
indexedDBModel.refreshDatabaseNames();
function step2() {
- var names = indexedDBModel.databaseNamesBySecurityOrigin.get(securityOrigin);
+ var names = indexedDBModel.databaseNamesByStorageKey.get(storageKey);
TestRunner.assertEquals(true, names.has(databaseName), 'Database should exist');
callback();
}
}
function checkDatabaseDoesNotExist(callback) {
- TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateOriginDatabaseNames', step2, false);
+ TestRunner.addSniffer(Resources.IndexedDBModel.prototype, 'updateStorageKeyDatabaseNames', step2, false);
indexedDBModel.refreshDatabaseNames();
function step2() {
- var names = indexedDBModel.databaseNamesBySecurityOrigin.get(securityOrigin);
+ var names = indexedDBModel.databaseNamesByStorageKey.get(storageKey);
TestRunner.assertEquals(false, names.has(databaseName), 'Database should not exist');
callback();
}