summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webstorage
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webstorage')
-rw-r--r--testing/web-platform/tests/webstorage/OWNERS9
-rw-r--r--testing/web-platform/tests/webstorage/README.md10
-rw-r--r--testing/web-platform/tests/webstorage/document-domain.html20
-rw-r--r--testing/web-platform/tests/webstorage/eventTestHarness.js60
-rw-r--r--testing/web-platform/tests/webstorage/event_basic.html15
-rw-r--r--testing/web-platform/tests/webstorage/event_basic.js106
-rw-r--r--testing/web-platform/tests/webstorage/event_body_attribute.html15
-rw-r--r--testing/web-platform/tests/webstorage/event_body_attribute.js116
-rw-r--r--testing/web-platform/tests/webstorage/event_case_sensitive.html15
-rw-r--r--testing/web-platform/tests/webstorage/event_case_sensitive.js46
-rw-r--r--testing/web-platform/tests/webstorage/event_constructor.html32
-rw-r--r--testing/web-platform/tests/webstorage/event_constructor_eventinit.html34
-rw-r--r--testing/web-platform/tests/webstorage/event_local_key.html38
-rw-r--r--testing/web-platform/tests/webstorage/event_local_newvalue.html38
-rw-r--r--testing/web-platform/tests/webstorage/event_local_oldvalue.html38
-rw-r--r--testing/web-platform/tests/webstorage/event_local_removeitem.html45
-rw-r--r--testing/web-platform/tests/webstorage/event_local_storagearea.html39
-rw-r--r--testing/web-platform/tests/webstorage/event_local_storageeventinit.html37
-rw-r--r--testing/web-platform/tests/webstorage/event_local_url.html43
-rw-r--r--testing/web-platform/tests/webstorage/event_session_key.html38
-rw-r--r--testing/web-platform/tests/webstorage/event_session_newvalue.html40
-rw-r--r--testing/web-platform/tests/webstorage/event_session_oldvalue.html38
-rw-r--r--testing/web-platform/tests/webstorage/event_session_removeitem.html44
-rw-r--r--testing/web-platform/tests/webstorage/event_session_storagearea.html40
-rw-r--r--testing/web-platform/tests/webstorage/event_session_storageeventinit.html36
-rw-r--r--testing/web-platform/tests/webstorage/event_session_url.html43
-rw-r--r--testing/web-platform/tests/webstorage/event_setattribute.html15
-rw-r--r--testing/web-platform/tests/webstorage/event_setattribute.js115
-rw-r--r--testing/web-platform/tests/webstorage/idlharness.html81
-rw-r--r--testing/web-platform/tests/webstorage/missing_arguments.html32
-rw-r--r--testing/web-platform/tests/webstorage/resources/event_body_handler.html14
-rw-r--r--testing/web-platform/tests/webstorage/resources/event_setattribute_handler.html15
-rw-r--r--testing/web-platform/tests/webstorage/resources/local_change_item_iframe.html18
-rw-r--r--testing/web-platform/tests/webstorage/resources/local_set_item_clear_iframe.html17
-rw-r--r--testing/web-platform/tests/webstorage/resources/local_set_item_iframe.html16
-rw-r--r--testing/web-platform/tests/webstorage/resources/local_set_item_remove_iframe.html11
-rw-r--r--testing/web-platform/tests/webstorage/resources/session_change_item_iframe.html18
-rw-r--r--testing/web-platform/tests/webstorage/resources/session_set_item_clear_iframe.html17
-rw-r--r--testing/web-platform/tests/webstorage/resources/session_set_item_iframe.html16
-rw-r--r--testing/web-platform/tests/webstorage/resources/session_set_item_remove_iframe.html11
-rw-r--r--testing/web-platform/tests/webstorage/resources/storage_local_window_open_second.html36
-rw-r--r--testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html36
-rw-r--r--testing/web-platform/tests/webstorage/storage_builtins.html24
-rw-r--r--testing/web-platform/tests/webstorage/storage_clear.html24
-rw-r--r--testing/web-platform/tests/webstorage/storage_enumerate.html41
-rw-r--r--testing/web-platform/tests/webstorage/storage_functions_not_overwritten.html51
-rw-r--r--testing/web-platform/tests/webstorage/storage_getitem.html42
-rw-r--r--testing/web-platform/tests/webstorage/storage_in.html30
-rw-r--r--testing/web-platform/tests/webstorage/storage_indexing.html36
-rw-r--r--testing/web-platform/tests/webstorage/storage_key.html59
-rw-r--r--testing/web-platform/tests/webstorage/storage_key_empty_string.html20
-rw-r--r--testing/web-platform/tests/webstorage/storage_length.html31
-rw-r--r--testing/web-platform/tests/webstorage/storage_local-manual.html40
-rw-r--r--testing/web-platform/tests/webstorage/storage_local_setitem_quotaexceedederr.html31
-rw-r--r--testing/web-platform/tests/webstorage/storage_local_window_open.html31
-rw-r--r--testing/web-platform/tests/webstorage/storage_removeitem.html52
-rw-r--r--testing/web-platform/tests/webstorage/storage_session-manual.html39
-rw-r--r--testing/web-platform/tests/webstorage/storage_session_setitem_quotaexceedederr.html31
-rw-r--r--testing/web-platform/tests/webstorage/storage_session_window_open.html31
-rw-r--r--testing/web-platform/tests/webstorage/storage_set_value_enumerate.html30
-rw-r--r--testing/web-platform/tests/webstorage/storage_setitem.html223
-rw-r--r--testing/web-platform/tests/webstorage/storage_string_conversion.html46
-rw-r--r--testing/web-platform/tests/webstorage/storage_supported_property_names.html23
63 files changed, 0 insertions, 2438 deletions
diff --git a/testing/web-platform/tests/webstorage/OWNERS b/testing/web-platform/tests/webstorage/OWNERS
deleted file mode 100644
index 3b7fb5d88..000000000
--- a/testing/web-platform/tests/webstorage/OWNERS
+++ /dev/null
@@ -1,9 +0,0 @@
-@siusin
-@inexorabletash
-@zqzhang
-@chunywang
-@kangxu
-@plehegar
-@ibelem
-@jdm
-@Ms2ger
diff --git a/testing/web-platform/tests/webstorage/README.md b/testing/web-platform/tests/webstorage/README.md
deleted file mode 100644
index 298028cc1..000000000
--- a/testing/web-platform/tests/webstorage/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-This directory contains the Web Storage test suite.
-
-The spec's Implementation Report contains a list of each test file in the test suite and the results of running the test file on several browsers <http://www.w3.org/wiki/Webapps/Interop/WebStorage>.
-
-To run this test suite within a browser, go to: <http://w3c-test.org/webstorage/>.
-
-A W3C Recommendation of Web Storage was published on 30 July 2013 <http://www.w3.org/TR/2013/REC-webstorage-20130730/>.
-
-Latest Editor's Draft of Web Storage is: <http://dev.w3.org/html5/webstorage/>.
-
diff --git a/testing/web-platform/tests/webstorage/document-domain.html b/testing/web-platform/tests/webstorage/document-domain.html
deleted file mode 100644
index 3232b0d50..000000000
--- a/testing/web-platform/tests/webstorage/document-domain.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>localStorage and document.domain</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<iframe></iframe>
-<script>
- async_test(function(t) {
- frames[0].addEventListener("storage", function(e) {
- t.step(function() {
- localStorage.clear()
- t.done()
- })
- })
- frames[0].document.domain = document.domain
- localStorage.setItem("test", "test")
- })
-</script>
diff --git a/testing/web-platform/tests/webstorage/eventTestHarness.js b/testing/web-platform/tests/webstorage/eventTestHarness.js
deleted file mode 100644
index 7d9ed0187..000000000
--- a/testing/web-platform/tests/webstorage/eventTestHarness.js
+++ /dev/null
@@ -1,60 +0,0 @@
-iframe = document.createElement("IFRAME");
-iframe.src = "about:blank";
-document.body.appendChild(iframe);
-iframe.contentWindow.document.body.textContent = "Nothing to see here.";
-
-storageEventList = new Array();
-iframe.contentWindow.onstorage = function(e) {
- window.parent.storageEventList.push(e);
-};
-
-function runAfterNStorageEvents(callback, expectedNumEvents)
-{
- countStorageEvents(callback, expectedNumEvents, 0)
-}
-
-function countStorageEvents(callback, expectedNumEvents, times)
-{
- function onTimeout()
- {
- var currentCount = storageEventList.length;
- if (currentCount == expectedNumEvents) {
- callback();
- } else if (currentCount > expectedNumEvents) {
- msg = "got at least " + currentCount + ", expected only " + expectedNumEvents + " events";
- callback(msg);
- } else if (times > 50) {
- msg = "Timeout: only got " + currentCount + ", expected " + expectedNumEvents + " events";
- callback(msg);
- } else {
- countStorageEvents(callback, expectedNumEvents, times+1);
- }
- }
- setTimeout(onTimeout, 20);
-}
-
-function clearStorage(storageName, callback)
-{
- if (window[storageName].length === 0) {
- storageEventList = [];
- setTimeout(callback, 0);
- } else {
- window[storageName].clear();
- runAfterNStorageEvents(function() {
- storageEventList = [];
- callback();
- }, 1);
- }
-}
-
-function testStorages(testCallback)
-{
- testCallback("sessionStorage");
- var hit = false;
- add_result_callback(function() {
- if (!hit) {
- hit = true;
- testCallback("localStorage");
- }
- });
-}
diff --git a/testing/web-platform/tests/webstorage/event_basic.html b/testing/web-platform/tests/webstorage/event_basic.html
deleted file mode 100644
index 407e41c4b..000000000
--- a/testing/web-platform/tests/webstorage/event_basic.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta name="timeout" content="long">
-<title>WebStorage Test: StorageEvent - window.onstorage</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script src="eventTestHarness.js"></script>
-<script src="event_basic.js"></script>
-</body>
-</html>
-
diff --git a/testing/web-platform/tests/webstorage/event_basic.js b/testing/web-platform/tests/webstorage/event_basic.js
deleted file mode 100644
index fe8446cec..000000000
--- a/testing/web-platform/tests/webstorage/event_basic.js
+++ /dev/null
@@ -1,106 +0,0 @@
-testStorages(function(storageString) {
- async_test(function(t) {
- assert_true(storageString in window, storageString + " exist");
- var storage = window[storageString];
- t.add_cleanup(function() { storage.clear() });
-
- clearStorage(storageString, t.step_func(step1));
- assert_equals(storage.length, 0, "storage.length");
-
- function step1(msg)
- {
- storage.setItem('FOO', 'BAR');
-
- runAfterNStorageEvents(t.step_func(step2), 1);
- }
-
- function step2(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 1);
- assert_equals(storageEventList[0].key, "FOO");
- assert_equals(storageEventList[0].oldValue, null);
- assert_equals(storageEventList[0].newValue, "BAR");
-
- storage.setItem('FU', 'BAR');
- storage.setItem('a', '1');
- storage.setItem('b', '2');
- storage.setItem('b', '3');
-
- runAfterNStorageEvents(t.step_func(step3), 5);
- }
-
- function step3(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 5);
- assert_equals(storageEventList[1].key, "FU");
- assert_equals(storageEventList[1].oldValue, null);
- assert_equals(storageEventList[1].newValue, "BAR");
-
- assert_equals(storageEventList[2].key, "a");
- assert_equals(storageEventList[2].oldValue, null);
- assert_equals(storageEventList[2].newValue, "1");
-
- assert_equals(storageEventList[3].key, "b");
- assert_equals(storageEventList[3].oldValue, null);
- assert_equals(storageEventList[3].newValue, "2");
-
- assert_equals(storageEventList[4].key, "b");
- assert_equals(storageEventList[4].oldValue, "2");
- assert_equals(storageEventList[4].newValue, "3");
-
- storage.removeItem('FOO');
-
- runAfterNStorageEvents(t.step_func(step4), 6);
- }
-
- function step4(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 6);
- assert_equals(storageEventList[5].key, "FOO");
- assert_equals(storageEventList[5].oldValue, "BAR");
- assert_equals(storageEventList[5].newValue, null);
-
- storage.removeItem('FU');
-
- runAfterNStorageEvents(t.step_func(step5), 7);
- }
-
- function step5(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 7);
- assert_equals(storageEventList[6].key, "FU");
- assert_equals(storageEventList[6].oldValue, "BAR");
- assert_equals(storageEventList[6].newValue, null);
-
- storage.clear();
-
- runAfterNStorageEvents(t.step_func(step6), 8);
- }
-
- function step6(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 8);
- assert_equals(storageEventList[7].key, null);
- assert_equals(storageEventList[7].oldValue, null);
- assert_equals(storageEventList[7].newValue, null);
-
- t.done();
- }
-
- }, storageString + " mutations fire StorageEvents that are caught by the event listener set via window.onstorage.");
-});
diff --git a/testing/web-platform/tests/webstorage/event_body_attribute.html b/testing/web-platform/tests/webstorage/event_body_attribute.html
deleted file mode 100644
index 80ec67618..000000000
--- a/testing/web-platform/tests/webstorage/event_body_attribute.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta name="timeout" content="long">
-<title>WebStorage Test: StorageEvent - set onstorage as body attribute</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script src="eventTestHarness.js"></script>
-<script src="event_body_attribute.js"></script>
-</body>
-</html>
-
diff --git a/testing/web-platform/tests/webstorage/event_body_attribute.js b/testing/web-platform/tests/webstorage/event_body_attribute.js
deleted file mode 100644
index a0e596da9..000000000
--- a/testing/web-platform/tests/webstorage/event_body_attribute.js
+++ /dev/null
@@ -1,116 +0,0 @@
-testStorages(function(storageString) {
- async_test(function(t) {
- assert_true(storageString in window, storageString + " exist");
- var storage = window[storageString];
- t.add_cleanup(function() { storage.clear() });
-
- clearStorage(storageString, t.step_func(step0));
- assert_equals(storage.length, 0, "storage.length");
-
- function step0(msg)
- {
- iframe.onload = t.step_func(step1);
- // Null out the existing handler eventTestHarness.js set up;
- // otherwise this test won't be testing much of anything useful.
- iframe.contentWindow.onstorage = null;
- iframe.src = "resources/event_body_handler.html";
- }
-
- function step1(msg)
- {
- storageEventList = new Array();
- storage.setItem('FOO', 'BAR');
-
- runAfterNStorageEvents(t.step_func(step2), 1);
- }
-
- function step2(msg)
- {
- if (msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 1);
- assert_equals(storageEventList[0].key, "FOO");
- assert_equals(storageEventList[0].oldValue, null);
- assert_equals(storageEventList[0].newValue, "BAR");
-
- storage.setItem('FU', 'BAR');
- storage.setItem('a', '1');
- storage.setItem('b', '2');
- storage.setItem('b', '3');
-
- runAfterNStorageEvents(t.step_func(step3), 5);
- }
-
- function step3(msg)
- {
- if (msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 5);
- assert_equals(storageEventList[1].key, "FU");
- assert_equals(storageEventList[1].oldValue, null);
- assert_equals(storageEventList[1].newValue, "BAR");
-
- assert_equals(storageEventList[2].key, "a");
- assert_equals(storageEventList[2].oldValue, null);
- assert_equals(storageEventList[2].newValue, "1");
-
- assert_equals(storageEventList[3].key, "b");
- assert_equals(storageEventList[3].oldValue, null);
- assert_equals(storageEventList[3].newValue, "2");
-
- assert_equals(storageEventList[4].key, "b");
- assert_equals(storageEventList[4].oldValue, "2");
- assert_equals(storageEventList[4].newValue, "3");
-
- storage.removeItem('FOO');
-
- runAfterNStorageEvents(t.step_func(step4), 6);
- }
-
- function step4(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 6);
- assert_equals(storageEventList[5].key, "FOO");
- assert_equals(storageEventList[5].oldValue, "BAR");
- assert_equals(storageEventList[5].newValue, null);
-
- storage.removeItem('FU');
-
- runAfterNStorageEvents(t.step_func(step5), 7);
- }
-
- function step5(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 7);
- assert_equals(storageEventList[6].key, "FU");
- assert_equals(storageEventList[6].oldValue, "BAR");
- assert_equals(storageEventList[6].newValue, null);
-
- storage.clear();
-
- runAfterNStorageEvents(t.step_func(step6), 8);
- }
-
- function step6(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 8);
- assert_equals(storageEventList[7].key, null);
- assert_equals(storageEventList[7].oldValue, null);
- assert_equals(storageEventList[7].newValue, null);
-
- t.done();
- }
-
- }, storageString + " mutations fire StorageEvents that are caught by the event listener specified as an attribute on the body.");
-});
diff --git a/testing/web-platform/tests/webstorage/event_case_sensitive.html b/testing/web-platform/tests/webstorage/event_case_sensitive.html
deleted file mode 100644
index 916b23041..000000000
--- a/testing/web-platform/tests/webstorage/event_case_sensitive.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta name="timeout" content="long">
-<title>WebStorage Test: StorageEvent - the case of value changed</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script src="eventTestHarness.js"></script>
-<script src="event_case_sensitive.js"></script>
-</body>
-</html>
-
diff --git a/testing/web-platform/tests/webstorage/event_case_sensitive.js b/testing/web-platform/tests/webstorage/event_case_sensitive.js
deleted file mode 100644
index 2729a3bed..000000000
--- a/testing/web-platform/tests/webstorage/event_case_sensitive.js
+++ /dev/null
@@ -1,46 +0,0 @@
-testStorages(function(storageString) {
- async_test(function(t) {
- assert_true(storageString in window, storageString + " exist");
- var storage = window[storageString];
- t.add_cleanup(function() { storage.clear() });
-
- clearStorage(storageString, t.step_func(step0));
- assert_equals(storage.length, 0, "storage.length");
-
- function step0(msg)
- {
- storage.foo = "test";
- runAfterNStorageEvents(t.step_func(step1), 1);
- }
-
- function step1(msg)
- {
- storageEventList = new Array();
- storage.foo = "test";
-
- runAfterNStorageEvents(t.step_func(step2), 0);
- }
-
- function step2(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 0);
-
- storage.foo = "TEST";
-
- runAfterNStorageEvents(t.step_func(step3), 1);
- }
-
- function step3(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 1);
-
- t.done();
- }
- }, storageString + " storage events fire even when only the case of the value changes.");
-});
diff --git a/testing/web-platform/tests/webstorage/event_constructor.html b/testing/web-platform/tests/webstorage/event_constructor.html
deleted file mode 100644
index c74f08aad..000000000
--- a/testing/web-platform/tests/webstorage/event_constructor.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: StorageEvent - init value</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_session_Constructor</h1>
- <div id="log"></div>
- <script>
- test(function() {
- var t = async_test("storageeventinit test");
- function onStorageEvent(event) {
- t.step(function() {
- assert_equals(event.type, 'storage');
- assert_equals(event.key, null);
- assert_equals(event.oldValue, null);
- assert_equals(event.newValue, null);
- assert_equals(event.url, '');
- assert_equals(event.storageArea, null);
- });
- t.done();
- }
-
- window.addEventListener('storage', onStorageEvent, false);
- var event = new StorageEvent('storage');
- window.dispatchEvent(event);
- }, "The initial values of storage event properties.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_constructor_eventinit.html b/testing/web-platform/tests/webstorage/event_constructor_eventinit.html
deleted file mode 100644
index 3b4a77cb2..000000000
--- a/testing/web-platform/tests/webstorage/event_constructor_eventinit.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: StorageEvent - StorageEventInit with null value</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_Constructor</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- function onStorageEvent(event) {
- assert_equals(event.type, 'storage', 'type');
- assert_equals(event.key, null, 'key');
- assert_equals(event.oldValue, null, 'oldValue');
- assert_equals(event.newValue, null, 'newValue');
- assert_equals(event.url, 'null', 'url');
- assert_equals(event.storageArea, null, 'storageArea');
- t.done();
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
- var event = new StorageEvent('storage', {
- key: null,
- oldValue: null,
- newValue: null,
- url: null
- });
- window.dispatchEvent(event);
- }, "StorageEvent constructor and nulls - Construct StorageEvent with StorageEventInit.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_local_key.html b/testing/web-platform/tests/webstorage/event_local_key.html
deleted file mode 100644
index 84512da2d..000000000
--- a/testing/web-platform/tests/webstorage/event_local_key.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: localStorage event - key</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_local_key</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- localStorage.clear();
- t.add_cleanup(function() { localStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- var expected = ['name', null]
- function onStorageEvent(event) {
- assert_equals(event.key, expected.shift());
- if (!expected.length) {
- t.done();
- }
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/local_set_item_clear_iframe.html');
- document.body.appendChild(el);
- }, "key property test of local event - Local event is fired due to an invocation of the setItem(), clear() methods.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_local_newvalue.html b/testing/web-platform/tests/webstorage/event_local_newvalue.html
deleted file mode 100644
index 2b743c37b..000000000
--- a/testing/web-platform/tests/webstorage/event_local_newvalue.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: localStorage event - newValue</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_local_newValue</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- localStorage.clear();
- t.add_cleanup(function() { localStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- var expected = ['user1', 'user2', null]
- function onStorageEvent(event) {
- assert_equals(event.newValue, expected.shift());
- if (!expected.length) {
- t.done();
- }
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/local_change_item_iframe.html');
- document.body.appendChild(el);
- }, "newValue property test of local event - Local event is fired due to an invocation of the setItem(), clear() methods.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_local_oldvalue.html b/testing/web-platform/tests/webstorage/event_local_oldvalue.html
deleted file mode 100644
index 87c79aa07..000000000
--- a/testing/web-platform/tests/webstorage/event_local_oldvalue.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: localStorage event - oldValue</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_local_oldValue</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- localStorage.clear();
- t.add_cleanup(function() { localStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- var expected = [null, 'user1', null]
- function onStorageEvent(event) {
- assert_equals(event.oldValue, expected.shift());
- if (!expected.length) {
- t.done();
- }
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/local_change_item_iframe.html');
- document.body.appendChild(el);
- }, "oldValue property test of local event - Local event is fired due to an invocation of the setItem(), clear() methods.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_local_removeitem.html b/testing/web-platform/tests/webstorage/event_local_removeitem.html
deleted file mode 100644
index 7b81ea2ba..000000000
--- a/testing/web-platform/tests/webstorage/event_local_removeitem.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset="utf-8">
-<title>Web Storage Test: event - localStorage removeItem</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<div id="log"></div>
-
-<script>
-
-async_test(function(t) {
- localStorage.clear();
- t.add_cleanup(function() { localStorage.clear() });
-
- self.step = function(f) { t.step(f); };
-
- var event_index = 0;
- window.addEventListener('storage', t.step_func(function(event) {
- switch(++event_index) {
- case 1:
- assert_equals(event.key, "name", "set key");
- assert_equals(event.oldValue, null, "set oldValue");
- assert_equals(event.newValue, "user1", "set newValue");
- assert_equals(event.url, el.contentDocument.documentURI, "set url");
- assert_equals(event.storageArea, localStorage, "set storageArea");
- break;
- case 2:
- assert_equals(event.key, "name", "remove key");
- assert_equals(event.oldValue, "user1", "remove oldValue");
- assert_equals(event.newValue, null, "remove newValue");
- assert_equals(event.url, el.contentDocument.documentURI, "remove url");
- assert_equals(event.storageArea, localStorage, "remove storageArea");
- t.done();
- break;
- }
- }), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/local_set_item_remove_iframe.html');
- document.body.appendChild(el);
-}, "key property test of local event");
-
-</script>
diff --git a/testing/web-platform/tests/webstorage/event_local_storagearea.html b/testing/web-platform/tests/webstorage/event_local_storagearea.html
deleted file mode 100644
index db4b114a9..000000000
--- a/testing/web-platform/tests/webstorage/event_local_storagearea.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: localStorage event - storageArea</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_local_storageArea</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- localStorage.clear();
- t.add_cleanup(function() { localStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- function onStorageEvent(event) {
- assert_equals(event.storageArea.length, 1);
- var key = event.storageArea.key(0);
- var value = event.storageArea.getItem(key);
- assert_equals(key, "name");
- assert_equals(value, "user1");
- t.done();
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/local_set_item_iframe.html');
- document.body.appendChild(el);
- }, "storageArea property test of local event - Local event is fired due to an invocation of the setItem() method.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_local_storageeventinit.html b/testing/web-platform/tests/webstorage/event_local_storageeventinit.html
deleted file mode 100644
index 3a7e5d18f..000000000
--- a/testing/web-platform/tests/webstorage/event_local_storageeventinit.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: localStorage event - StorageEventInit</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_local_StorageEventInit</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
-
- function onStorageEvent(event) {
- assert_equals(event.key, 'key');
- assert_equals(event.oldValue, 'oldValue');
- assert_equals(event.newValue, 'newValue');
- assert_equals(event.url, window.location.href);
- assert_equals(event.storageArea, window.localStorage);
- t.done();
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var event = new StorageEvent('storage', {
- key: 'key',
- oldValue: 'oldValue',
- newValue: 'newValue',
- url: window.location.href,
- storageArea: window.localStorage
- });
-
- window.dispatchEvent(event);
- }, "storageeventinit test - Storage event is fired due to set values for StorageEventInit.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_local_url.html b/testing/web-platform/tests/webstorage/event_local_url.html
deleted file mode 100644
index 7345ce373..000000000
--- a/testing/web-platform/tests/webstorage/event_local_url.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: localStorage event - url</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_local_url</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- localStorage.clear();
- t.add_cleanup(function() { localStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- function onStorageEvent(event) {
- var url = window.location.href;
-
- var pos = url.lastIndexOf("/");
- if (pos != -1) {
- url = url.substr(0, pos + 1);
- url = url + "resources/local_set_item_iframe.html";
- }
-
- assert_equals(event.url, url);
- t.done();
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/local_set_item_iframe.html');
- document.body.appendChild(el);
- }, "url property test of local event - Local event is fired due to an invocation of the setItem() method.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_session_key.html b/testing/web-platform/tests/webstorage/event_session_key.html
deleted file mode 100644
index 62600aa39..000000000
--- a/testing/web-platform/tests/webstorage/event_session_key.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: sessionStorage event - key</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_session_key</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- sessionStorage.clear();
- t.add_cleanup(function() { sessionStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- var expected = ['name', null]
- function onStorageEvent(event) {
- assert_equals(event.key, expected.shift());
- if (!expected.length) {
- t.done();
- }
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/session_set_item_clear_iframe.html');
- document.body.appendChild(el);
- }, "key property test of session event - Session event is fired due to an invocation of the setItem(), clear() methods.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_session_newvalue.html b/testing/web-platform/tests/webstorage/event_session_newvalue.html
deleted file mode 100644
index 1f367988e..000000000
--- a/testing/web-platform/tests/webstorage/event_session_newvalue.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: sessionStorage event - newValue</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_session_newValue</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- sessionStorage.clear();
- t.add_cleanup(function() { sessionStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- var expected = ['user1', 'user2', null]
- function onStorageEvent(event) {
- t.step(function() {
- assert_equals(event.newValue, expected.shift());
- });
- if (!expected.length) {
- t.done();
- }
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/session_change_item_iframe.html');
- document.body.appendChild(el);
- }, "newvalue property test of session event - Session event is fired due to an invocation of the setItem(), clear() methods.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_session_oldvalue.html b/testing/web-platform/tests/webstorage/event_session_oldvalue.html
deleted file mode 100644
index 00400df25..000000000
--- a/testing/web-platform/tests/webstorage/event_session_oldvalue.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: sessionStorage event - oldValue</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_session_oldValue</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- sessionStorage.clear();
- t.add_cleanup(function() { sessionStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- var expected = [null, 'user1', null]
- function onStorageEvent(event) {
- assert_equals(event.oldValue, expected.shift());
- if (!expected.length) {
- t.done();
- }
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/session_change_item_iframe.html');
- document.body.appendChild(el);
- }, "oldvalue property test of session event - Session event is fired due to an invocation of the setItem(), clear() methods.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_session_removeitem.html b/testing/web-platform/tests/webstorage/event_session_removeitem.html
deleted file mode 100644
index 7b3c6446e..000000000
--- a/testing/web-platform/tests/webstorage/event_session_removeitem.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset="utf-8">
-<title>Web Storage Test: event - sessionStorage removeItem</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<div id="log"></div>
-
-<script>
-
-async_test(function(t) {
- sessionStorage.clear();
- t.add_cleanup(function() { sessionStorage.clear() });
-
- self.step = function(f) { t.step(f); };
-
- var event_index = 0;
- window.addEventListener('storage', t.step_func(function(event) {
- switch(++event_index) {
- case 1:
- assert_equals(event.key, "name", "set key");
- assert_equals(event.oldValue, null, "set oldValue");
- assert_equals(event.newValue, "user1", "set newValue");
- assert_equals(event.url, el.contentDocument.documentURI, "set url");
- assert_equals(event.storageArea, sessionStorage, "set storageArea");
- break;
- case 2:
- assert_equals(event.key, "name", "remove key");
- assert_equals(event.oldValue, "user1", "remove oldValue");
- assert_equals(event.newValue, null, "remove newValue");
- assert_equals(event.url, el.contentDocument.documentURI, "remove url");
- assert_equals(event.storageArea, sessionStorage, "remove storageArea");
- t.done();
- break;
- }
- }), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/session_set_item_remove_iframe.html');
- document.body.appendChild(el);
-}, "key property test of session event");
-</script>
diff --git a/testing/web-platform/tests/webstorage/event_session_storagearea.html b/testing/web-platform/tests/webstorage/event_session_storagearea.html
deleted file mode 100644
index d2c2ba437..000000000
--- a/testing/web-platform/tests/webstorage/event_session_storagearea.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: sessionStorage event - storageArea</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_session_storageArea</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- sessionStorage.clear();
- t.add_cleanup(function() { sessionStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- function onStorageEvent(event) {
- assert_equals(event.storageArea.length, 1);
- var key = event.storageArea.key(0);
- var value = event.storageArea.getItem(key);
- assert_equals(key, "name");
- assert_equals(value, "user1");
- t.done();
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/session_set_item_iframe.html');
- document.body.appendChild(el);
- }, "storageArea property test of session event - session event is fired due to an invocation of the setItem() method.");
- </script>
-
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_session_storageeventinit.html b/testing/web-platform/tests/webstorage/event_session_storageeventinit.html
deleted file mode 100644
index 69539df41..000000000
--- a/testing/web-platform/tests/webstorage/event_session_storageeventinit.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: sessionStorage event - StorageEventInit</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_session_StorageEventInit</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- function onStorageEvent(event) {
- assert_equals(event.key, 'key');
- assert_equals(event.oldValue, 'oldValue');
- assert_equals(event.newValue, 'newValue');
- assert_equals(event.url, window.location.href);
- assert_equals(event.storageArea, window.sessionStorage);
- t.done();
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var event = new StorageEvent('storage', {
- key: 'key',
- oldValue: 'oldValue',
- newValue: 'newValue',
- url: window.location.href,
- storageArea: window.sessionStorage
- });
-
- window.dispatchEvent(event);
- }, "storageeventinit test - Storage event is fired due to set values for StorageEventInit.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_session_url.html b/testing/web-platform/tests/webstorage/event_session_url.html
deleted file mode 100644
index 85250acc2..000000000
--- a/testing/web-platform/tests/webstorage/event_session_url.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: sessionStorage event - url</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>event_session_url</h1>
- <div id="log"></div>
- <script>
- async_test(function(t) {
- sessionStorage.clear();
- t.add_cleanup(function() { sessionStorage.clear() });
-
- self.fail = t.step_func(function(msg) {
- assert_unreached(msg);
- t.done();
- });
-
- function onStorageEvent(event) {
- var url = window.location.href;
-
- var pos = url.lastIndexOf("/");
- if (pos != -1) {
- url = url.substr(0, pos + 1);
- url = url + "resources/session_set_item_iframe.html";
- }
-
- assert_equals(event.url, url);
- t.done();
- }
-
- window.addEventListener('storage', t.step_func(onStorageEvent), false);
-
- var el = document.createElement("iframe");
- el.setAttribute('id', 'ifrm');
- el.setAttribute('src', 'resources/session_set_item_iframe.html');
- document.body.appendChild(el);
- }, "url property test of session event - Session event is fired due to an invocation of the setItem() method.");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/event_setattribute.html b/testing/web-platform/tests/webstorage/event_setattribute.html
deleted file mode 100644
index c48a2e0fc..000000000
--- a/testing/web-platform/tests/webstorage/event_setattribute.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta name="timeout" content="long">
-<title>WebStorage Test: StorageEvent - attached setAttribute</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script src="eventTestHarness.js"></script>
-<script src="event_setattribute.js"></script>
-</body>
-</html>
-
diff --git a/testing/web-platform/tests/webstorage/event_setattribute.js b/testing/web-platform/tests/webstorage/event_setattribute.js
deleted file mode 100644
index 8070938ba..000000000
--- a/testing/web-platform/tests/webstorage/event_setattribute.js
+++ /dev/null
@@ -1,115 +0,0 @@
-testStorages(function(storageString) {
- async_test(function(t) {
- assert_true(storageString in window, storageString + " exist");
- var storage = window[storageString];
- t.add_cleanup(function() { storage.clear() });
-
- clearStorage(storageString, t.step_func(step0));
- assert_equals(storage.length, 0, "storage.length");
-
- function step0(msg)
- {
- iframe.onload = t.step_func(step1);
- // Null out the existing handler eventTestHarness.js set up;
- // otherwise this test won't be testing much of anything useful.
- iframe.contentWindow.onstorage = null;
- iframe.src = "resources/event_setattribute_handler.html";
- }
-
- function step1(msg)
- {
- storage.setItem('FOO', 'BAR');
-
- runAfterNStorageEvents(t.step_func(step2), 1);
- }
-
- function step2(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 1);
- assert_equals(storageEventList[0].key, "FOO");
- assert_equals(storageEventList[0].oldValue, null);
- assert_equals(storageEventList[0].newValue, "BAR");
-
- storage.setItem('FU', 'BAR');
- storage.setItem('a', '1');
- storage.setItem('b', '2');
- storage.setItem('b', '3');
-
- runAfterNStorageEvents(t.step_func(step3), 5);
- }
-
- function step3(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 5);
- assert_equals(storageEventList[1].key, "FU");
- assert_equals(storageEventList[1].oldValue, null);
- assert_equals(storageEventList[1].newValue, "BAR");
-
- assert_equals(storageEventList[2].key, "a");
- assert_equals(storageEventList[2].oldValue, null);
- assert_equals(storageEventList[2].newValue, "1");
-
- assert_equals(storageEventList[3].key, "b");
- assert_equals(storageEventList[3].oldValue, null);
- assert_equals(storageEventList[3].newValue, "2");
-
- assert_equals(storageEventList[4].key, "b");
- assert_equals(storageEventList[4].oldValue, "2");
- assert_equals(storageEventList[4].newValue, "3");
-
- storage.removeItem('FOO');
-
- runAfterNStorageEvents(t.step_func(step4), 6);
- }
-
- function step4(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 6);
- assert_equals(storageEventList[5].key, "FOO");
- assert_equals(storageEventList[5].oldValue, "BAR");
- assert_equals(storageEventList[5].newValue, null);
-
- storage.removeItem('FU');
-
- runAfterNStorageEvents(t.step_func(step5), 7);
- }
-
- function step5(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 7);
- assert_equals(storageEventList[6].key, "FU");
- assert_equals(storageEventList[6].oldValue, "BAR");
- assert_equals(storageEventList[6].newValue, null);
-
- storage.clear();
-
- runAfterNStorageEvents(t.step_func(step6), 8);
- }
-
- function step6(msg)
- {
- if(msg != undefined) {
- assert_unreached(msg);
- }
- assert_equals(storageEventList.length, 8);
- assert_equals(storageEventList[7].key, null);
- assert_equals(storageEventList[7].oldValue, null);
- assert_equals(storageEventList[7].newValue, null);
-
- t.done();
- }
-
- }, storageString + " mutations fire StorageEvents that are caught by the event listener attached via setattribute.");
-});
diff --git a/testing/web-platform/tests/webstorage/idlharness.html b/testing/web-platform/tests/webstorage/idlharness.html
deleted file mode 100644
index 454e441d6..000000000
--- a/testing/web-platform/tests/webstorage/idlharness.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>Web Storage IDL tests</title>
-<link rel="author" title="W3C" href="http://www.w3.org/" />
-<link rel="help" href="http://www.w3.org/TR/webstorage/#storage"/>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/WebIDLParser.js"></script>
-<script src="/resources/idlharness.js"></script>
-</head>
-<body>
-<h1>Web Storage IDL tests</h1>
-<div id="log"></div>
-
-<pre id='untested_idl' style='display:none'>
-[PrimaryGlobal]
-interface Window {
-};
-
-interface Event {
-};
-
-interface EventInit {
-};
-</pre>
-
-<pre id='idl'>
-interface Storage {
- readonly attribute unsigned long length;
- DOMString? key(unsigned long index);
- getter DOMString? getItem(DOMString key);
- setter void setItem(DOMString key, DOMString value);
- deleter void removeItem(DOMString key);
- void clear();
-};
-[NoInterfaceObject]
-interface WindowSessionStorage {
- readonly attribute Storage sessionStorage;
-};
-Window implements WindowSessionStorage;
-[NoInterfaceObject]
-interface WindowLocalStorage {
- readonly attribute Storage localStorage;
-};
-Window implements WindowLocalStorage;
-[Constructor(DOMString type, optional StorageEventInit eventInitDict)]
-interface StorageEvent : Event {
- readonly attribute DOMString? key;
- readonly attribute DOMString? oldValue;
- readonly attribute DOMString? newValue;
- readonly attribute DOMString url;
- readonly attribute Storage? storageArea;
-};
-
-dictionary StorageEventInit : EventInit {
- DOMString? key;
- DOMString? oldValue;
- DOMString? newValue;
- DOMString url;
- Storage? storageArea;
-};
-</pre>
-
-<script>
-
-(function() {
- var idl_array = new IdlArray();
-
- idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
- idl_array.add_idls(document.getElementById("idl").textContent);
-
- idl_array.add_objects({Storage: ["window.localStorage"]});
-
- idl_array.test();
-})();
-
-</script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/missing_arguments.html b/testing/web-platform/tests/webstorage/missing_arguments.html
deleted file mode 100644
index 34f54bc35..000000000
--- a/testing/web-platform/tests/webstorage/missing_arguments.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: missing arguments</title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>missing_arguments</h1>
- <div id="log"></div>
- <script>
- var tests = [
- function() { localStorage.key(); },
- function() { localStorage.getItem(); },
- function() { localStorage.setItem(); },
- function() { localStorage.setItem("a"); },
- function() { localStorage.removeItem(); },
- function() { sessionStorage.key(); },
- function() { sessionStorage.getItem(); },
- function() { sessionStorage.setItem(); },
- function() { sessionStorage.setItem("a"); },
- function() { sessionStorage.removeItem(); },
- function() { new StorageEvent(); }
- ];
- tests.forEach(function(fun) {
- test(function() {
- assert_throws(new TypeError(), fun);
- }, "Should throw TypeError for " + format_value(fun) + ".");
- });
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/event_body_handler.html b/testing/web-platform/tests/webstorage/resources/event_body_handler.html
deleted file mode 100644
index 11d8ec944..000000000
--- a/testing/web-platform/tests/webstorage/resources/event_body_handler.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script>
-
-function handleStorageEvent(e) {
- window.parent.storageEventList.push(e);
-}
-
-</script>
-</head>
-<body onstorage="handleStorageEvent(event);">
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/event_setattribute_handler.html b/testing/web-platform/tests/webstorage/resources/event_setattribute_handler.html
deleted file mode 100644
index b9e2f0402..000000000
--- a/testing/web-platform/tests/webstorage/resources/event_setattribute_handler.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head></head>
-<body>
-<script>
-
-function handleStorageEvent(e) {
- window.parent.storageEventList.push(e);
-}
-
-document.body.setAttribute("onstorage", "handleStorageEvent(event);");
-
-</script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/local_change_item_iframe.html b/testing/web-platform/tests/webstorage/resources/local_change_item_iframe.html
deleted file mode 100644
index 17be8fb26..000000000
--- a/testing/web-platform/tests/webstorage/resources/local_change_item_iframe.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- if (('localStorage' in window) && window.localStorage !== null){
- try {
- localStorage.setItem("name", "user1");
- localStorage.setItem("name", "user2");
- } catch (e) {
- parent.fail("setItem method is failed.");
- }
- localStorage.clear();
- } else {
- parent.fail("localStorage is not supported.");
- }
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/local_set_item_clear_iframe.html b/testing/web-platform/tests/webstorage/resources/local_set_item_clear_iframe.html
deleted file mode 100644
index 742b7dad1..000000000
--- a/testing/web-platform/tests/webstorage/resources/local_set_item_clear_iframe.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- if (('localStorage' in window) && window.localStorage !== null){
- try {
- localStorage.setItem("name", "user1");
- } catch (e) {
- parent.fail("setItem method is failed.");
- }
- localStorage.clear();
- } else {
- parent.fail("localStorage is not supported.");
- }
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/local_set_item_iframe.html b/testing/web-platform/tests/webstorage/resources/local_set_item_iframe.html
deleted file mode 100644
index 0693824e5..000000000
--- a/testing/web-platform/tests/webstorage/resources/local_set_item_iframe.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- if (('localStorage' in window) && window.localStorage !== null){
- try {
- localStorage.setItem("name", "user1");
- } catch (e) {
- parent.fail("setItem method is failed.");
- }
- } else {
- parent.fail("localStorage is not supported.");
- }
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/local_set_item_remove_iframe.html b/testing/web-platform/tests/webstorage/resources/local_set_item_remove_iframe.html
deleted file mode 100644
index 7451594c8..000000000
--- a/testing/web-platform/tests/webstorage/resources/local_set_item_remove_iframe.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- parent.step(function() {
- localStorage.setItem("name", "user1");
- localStorage.removeItem('name');
- });
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/session_change_item_iframe.html b/testing/web-platform/tests/webstorage/resources/session_change_item_iframe.html
deleted file mode 100644
index 1e1867e51..000000000
--- a/testing/web-platform/tests/webstorage/resources/session_change_item_iframe.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- if (('sessionStorage' in window) && window.sessionStorage !== null){
- try {
- sessionStorage.setItem("name", "user1");
- sessionStorage.setItem("name", "user2");
- } catch (e) {
- parent.fail("setItem method is failed.");
- }
- sessionStorage.clear();
- } else {
- parent.fail("sessionStorage is not supported.");
- }
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/session_set_item_clear_iframe.html b/testing/web-platform/tests/webstorage/resources/session_set_item_clear_iframe.html
deleted file mode 100644
index 7deaa9b17..000000000
--- a/testing/web-platform/tests/webstorage/resources/session_set_item_clear_iframe.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- if (('sessionStorage' in window) && window.sessionStorage !== null){
- try {
- sessionStorage.setItem('name', 'user1');
- } catch (e) {
- parent.fail('setItem method is failed.');
- }
- sessionStorage.clear();
- } else {
- parent.fail('sessionStorage is not supported.');
- }
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/session_set_item_iframe.html b/testing/web-platform/tests/webstorage/resources/session_set_item_iframe.html
deleted file mode 100644
index de844cca4..000000000
--- a/testing/web-platform/tests/webstorage/resources/session_set_item_iframe.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- if (('sessionStorage' in window) && window.sessionStorage !== null){
- try {
- sessionStorage.setItem('name', 'user1');
- } catch (e) {
- parent.fail('setItem method is failed.');
- }
- } else {
- parent.fail('sessionStorage is not supported.');
- }
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/session_set_item_remove_iframe.html b/testing/web-platform/tests/webstorage/resources/session_set_item_remove_iframe.html
deleted file mode 100644
index 60303e70f..000000000
--- a/testing/web-platform/tests/webstorage/resources/session_set_item_remove_iframe.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <body>
- <script>
- parent.step(function() {
- sessionStorage.setItem("name", "user1");
- sessionStorage.removeItem('name');
- });
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/storage_local_window_open_second.html b/testing/web-platform/tests/webstorage/resources/storage_local_window_open_second.html
deleted file mode 100644
index 3c8405adc..000000000
--- a/testing/web-platform/tests/webstorage/resources/storage_local_window_open_second.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>WebStorage Test: localStorage - second page</title>
-</head>
-<body>
-<script>
-
-var storage = window.localStorage;
-
-var assertions = [];
-
-assertions.push({
- actual: storage.getItem("FOO"),
- expected: "BAR",
- message: "storage.getItem('FOO')"
-});
-
-storage.setItem("FOO", "BAR-NEWWINDOW");
-
-assertions.push({
- actual: storage.getItem("FOO"),
- expected: "BAR-NEWWINDOW",
- message: "value for FOO after changing"
-});
-assertions.push({
- actual: window.opener.localStorage.getItem("FOO"),
- expected: "BAR-NEWWINDOW",
- message: "value for FOO in my opening window"
-});
-
-window.opener.postMessage(assertions, '*');
-
-</script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html b/testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html
deleted file mode 100644
index bc134af32..000000000
--- a/testing/web-platform/tests/webstorage/resources/storage_session_window_open_second.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>WebStorage Test: sessionStorage - second page</title>
-</head>
-<body>
-<script>
-
-var storage = window.sessionStorage;
-
-var assertions = [];
-
-assertions.push({
- actual: storage.getItem("FOO"),
- expected: "BAR",
- message: "storage.getItem('FOO')"
-});
-
-storage.setItem("FOO", "BAR-NEWWINDOW");
-
-assertions.push({
- actual: storage.getItem("FOO"),
- expected: "BAR-NEWWINDOW",
- message: "value for FOO after changing"
-});
-assertions.push({
- actual: window.opener.sessionStorage.getItem("FOO"),
- expected: "BAR",
- message: "value for FOO in my opening window"
-});
-
-window.opener.postMessage(assertions, '*');
-
-</script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/storage_builtins.html b/testing/web-platform/tests/webstorage/storage_builtins.html
deleted file mode 100644
index 2ae06d55b..000000000
--- a/testing/web-platform/tests/webstorage/storage_builtins.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - builtins</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
- assert_equals(storage.length, 0, "storage.length");
-
- var builtins = ["key", "getItem", "setItem", "removeItem", "clear"];
- var origBuiltins = builtins.map(function(b) { return Storage.prototype[b]; });
- assert_array_equals(builtins.map(function(b) { return storage[b]; }), origBuiltins, "a");
- builtins.forEach(function(b) { storage[b] = b; });
- assert_array_equals(builtins.map(function(b) { return storage[b]; }), origBuiltins, "b");
- assert_array_equals(builtins.map(function(b) { return storage.getItem(b); }), builtins, "c");
-
- assert_equals(storage.length, builtins.length, "storage.length");
- }, "Builtins in " + name);
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_clear.html b/testing/web-platform/tests/webstorage/storage_clear.html
deleted file mode 100644
index 1d81f5391..000000000
--- a/testing/web-platform/tests/webstorage/storage_clear.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - clear()</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("name", "user1");
- assert_equals(storage.getItem("name"), "user1");
- assert_equals(storage.name, "user1");
- assert_equals(storage.length, 1);
-
- storage.clear();
- assert_equals(storage.getItem("name"), null, "storage.getItem('name')");
- assert_equals(storage.name, undefined, "storage.name");
- assert_equals(storage.length, 0, "storage.length");
- }, "Clear in " + name);
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_enumerate.html b/testing/web-platform/tests/webstorage/storage_enumerate.html
deleted file mode 100644
index 1586f7a61..000000000
--- a/testing/web-platform/tests/webstorage/storage_enumerate.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>WebStorage Test: Storage - enumerate and built-in properties</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- assert_true(name in window, name + " exist");
-
- var storage = window[name];
- storage.clear();
-
- Storage.prototype.prototypeTestKey = "prototypeTestValue";
- storage.foo = "bar";
- storage.fu = "baz";
- storage.batman = "bin suparman";
- storage.bar = "foo";
- storage.alpha = "beta";
- storage.zeta = "gamma";
-
- var enumeratedArray = new Array();
- for (var n in storage)
- enumeratedArray.push(n);
-
- // Sort the array, since the storage order isn't guaranteed
- enumeratedArray.sort();
-
- var expectArray = ["alpha", "bar", "batman", "foo", "fu", "prototypeTestKey", "zeta"];
- assert_array_equals(enumeratedArray, expectArray);
-
- }, name + ": enumerate a Storage object and get only the keys as a result and the built-in properties of the Storage object should be ignored");
-});
-</script>
-</body>
-</html>
-
diff --git a/testing/web-platform/tests/webstorage/storage_functions_not_overwritten.html b/testing/web-platform/tests/webstorage/storage_functions_not_overwritten.html
deleted file mode 100644
index 47608b986..000000000
--- a/testing/web-platform/tests/webstorage/storage_functions_not_overwritten.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>WebStorage Test: Storage - set key with the same name as storage function</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
-
- runTest();
- function doWedgeThySelf() {
- storage.setItem("clear", "almost");
- storage.setItem("key", "too");
- storage.setItem("getItem", "funny");
- storage.setItem("removeItem", "to");
- storage.setItem("length", "be");
- storage.setItem("setItem", "true");
- }
-
- function runTest() {
- doWedgeThySelf();
-
- assert_equals(storage.getItem('clear'), "almost");
- assert_equals(storage.getItem('key'), "too");
- assert_equals(storage.getItem('getItem'), "funny");
- assert_equals(storage.getItem('removeItem'), "to");
- assert_equals(storage.getItem('length'), "be");
- assert_equals(storage.getItem('setItem'), "true");
-
- // Test to see if an exception is thrown for any of the built in
- // functions.
- storage.setItem("test", "123");
- storage.key(0);
- storage.getItem("test");
- storage.removeItem("test");
- storage.clear();
- assert_equals(storage.length, 0);
- }
-
- }, name + " should be not rendered unusable by setting a key with the same name as a storage function such that the function is hidden");
-});
-</script>
-</body>
-</html>
-
diff --git a/testing/web-platform/tests/webstorage/storage_getitem.html b/testing/web-platform/tests/webstorage/storage_getitem.html
deleted file mode 100644
index b735b2eaf..000000000
--- a/testing/web-platform/tests/webstorage/storage_getitem.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - getItem(key) and named getter</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
- storage.setItem("name", "x");
- storage.setItem("undefined", "foo");
- storage.setItem("null", "bar");
- storage.setItem("", "baz");
-
- test(function() {
- assert_equals(storage.length, 4);
- }, "All items should be added to " + name + ".");
-
- test(function() {
- assert_equals(storage["unknown"], undefined, "storage['unknown']")
- assert_equals(storage["name"], "x", "storage['name']")
- assert_equals(storage["undefined"], "foo", "storage['undefined']")
- assert_equals(storage["null"], "bar", "storage['null']")
- assert_equals(storage[undefined], "foo", "storage[undefined]")
- assert_equals(storage[null], "bar", "storage[null]")
- assert_equals(storage[""], "baz", "storage['']")
- }, "Named access to " + name + " should be correct");
-
- test(function() {
- assert_equals(storage.getItem("unknown"), null, "storage.getItem('unknown')")
- assert_equals(storage.getItem("name"), "x", "storage.getItem('name')")
- assert_equals(storage.getItem("undefined"), "foo", "storage.getItem('undefined')")
- assert_equals(storage.getItem("null"), "bar", "storage.getItem('null')")
- assert_equals(storage.getItem(undefined), "foo", "storage.getItem(undefined)")
- assert_equals(storage.getItem(null), "bar", "storage.getItem(null)")
- assert_equals(storage.getItem(""), "baz", "storage.getItem('')")
- }, name + ".getItem should be correct")
- }, "Get value by getIten(key) and named access in " + name + ".");
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_in.html b/testing/web-platform/tests/webstorage/storage_in.html
deleted file mode 100644
index 8b336047c..000000000
--- a/testing/web-platform/tests/webstorage/storage_in.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - in operator</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
-
- assert_false("name" in storage);
- storage["name"] = "user1";
- assert_true("name" in storage);
- }, "The in operator in " + name + ": property access");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- assert_false("name" in storage);
- storage.setItem("name", "user1");
- assert_true("name" in storage);
- assert_equals(storage.name, "user1");
- storage.removeItem("name");
- assert_false("name" in storage);
- }, "The in operator in " + name + ": method access");
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_indexing.html b/testing/web-platform/tests/webstorage/storage_indexing.html
deleted file mode 100644
index 7bce10514..000000000
--- a/testing/web-platform/tests/webstorage/storage_indexing.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - indexed getter</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
- storage["name"] = "user1";
- storage["age"] = "42";
-
- test(function() {
- assert_equals(storage[-1], undefined);
- assert_equals(storage[0], undefined);
- assert_equals(storage[1], undefined);
- assert_equals(storage[2], undefined);
- }, "Getting number properties on " + name);
-
- test(function() {
- assert_equals(storage["-1"], undefined);
- assert_equals(storage["0"], undefined);
- assert_equals(storage["1"], undefined);
- assert_equals(storage["2"], undefined);
- }, "Getting number-valued string properties on " + name);
-
- test(function() {
- storage.setItem(1, "number");
- assert_equals(storage[1], "number");
- assert_equals(storage["1"], "number");
- }, "Getting existing number-valued properties on " + name);
- }, "Indexed getter on " + name);
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_key.html b/testing/web-platform/tests/webstorage/storage_key.html
deleted file mode 100644
index c70b536fb..000000000
--- a/testing/web-platform/tests/webstorage/storage_key.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - key(index)</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("name", "user1");
- storage.setItem("age", "20");
- storage.setItem("a", "1");
- storage.setItem("b", "2");
-
- var keys = ["name", "age", "a", "b"];
- function doTest(index) {
- test(function() {
- var key = storage.key(index);
- assert_not_equals(key, null);
- assert_true(keys.indexOf(key) >= 0,
- "Unexpected key " + key + " found.");
- }, name + ".key(" + index + ") should return the right thing.");
- }
- for (var i = 0; i < keys.length; ++i) {
- doTest(i);
- doTest(i + 0x100000000);
- }
-
- test(function() {
- assert_equals(storage.key(-1), null, "storage.key(-1)");
- assert_equals(storage.key(4), null, "storage.key(4)");
- }, name + ".key() should return null for out-of-range arguments.");
- }, name + ".key");
-
- test(function() {
- var get_keys = function(s) {
- var keys = [];
- for (var i = 0; i < s.length; ++i) {
- keys.push(s.key(i));
- }
- return keys;
- };
- var storage = window[name];
- storage.clear();
-
- storage.setItem("name", "user1");
- storage.setItem("age", "20");
- storage.setItem("a", "1");
- storage.setItem("b", "2");
-
- var expected_keys = get_keys(storage);
- storage.setItem("name", "user2");
- assert_array_equals(get_keys(storage), expected_keys);
- }, name + ".key with value changes");
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_key_empty_string.html b/testing/web-platform/tests/webstorage/storage_key_empty_string.html
deleted file mode 100644
index 55e08df22..000000000
--- a/testing/web-platform/tests/webstorage/storage_key_empty_string.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>WebStorage Test: Storage - key with empty string</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
- ["localStorage", "sessionStorage"].forEach(function(name) {
- test(function () {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("", "empty string");
- assert_equals(storage.getItem(""), "empty string");
-
- }, name + ".key with empty string");
- });
-</script>
-
diff --git a/testing/web-platform/tests/webstorage/storage_length.html b/testing/web-platform/tests/webstorage/storage_length.html
deleted file mode 100644
index ecee6ec9b..000000000
--- a/testing/web-platform/tests/webstorage/storage_length.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - length</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
- assert_equals(storage.length, 0, "storage.length")
-
- storage["name"] = "user1";
- storage["age"] = "20";
-
- assert_equals(storage.length, 2, "storage.length")
- }, name + ".length (method access)");
-
- test(function() {
- var storage = window[name];
- storage.clear();
- assert_equals(storage.length, 0, "storage.length")
-
- storage.setItem("name", "user1");
- storage.setItem("age", "20");
-
- assert_equals(storage.length, 2, "storage.length")
- }, name + ".length (proprty access)");
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_local-manual.html b/testing/web-platform/tests/webstorage/storage_local-manual.html
deleted file mode 100644
index d039773b5..000000000
--- a/testing/web-platform/tests/webstorage/storage_local-manual.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>WebStorage Test: local storage</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<meta name="flags" content="interact">
-
-<h2>Description</h2>
-<p>
- This test validates that store data using Local Storage which means that close the page, and re-open it, the data saved before should be loaded again.
-</p>
-
-<h2>Preconditions</h2>
-<ol class="instructions">
- <li>
- Click the "Clear" button, refresh the page once and then check if the page shows "You have viewed this page 1 time(s)"
- </li>
- <li>
- Close the page, re-open it and then check if the page still shows "You have viewed this page 2 time(s)"
- </li>
- <li>
- If the above two steps are all true the test case pass, otherwise it fail
- </li>
-</ol>
-
-<p>
- <h2>You have viewed this page
- <span id="count">an untold number of</span>
- time(s).</h2>
- <button type="button" onclick="javascript:localStorage.pageLoadCount = 0;"><h3>Clear</h3></button>
-</p>
-
-<script>
-
- if (!localStorage.pageLoadCount) {
- localStorage.pageLoadCount = 0;
- }
- localStorage.pageLoadCount = parseInt(localStorage.pageLoadCount) + 1;
- document.getElementById('count').textContent = localStorage.pageLoadCount;
-
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_local_setitem_quotaexceedederr.html b/testing/web-platform/tests/webstorage/storage_local_setitem_quotaexceedederr.html
deleted file mode 100644
index b547f3046..000000000
--- a/testing/web-platform/tests/webstorage/storage_local_setitem_quotaexceedederr.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: localStorage - setItem throws QuotaExceededError</title>
- <meta name="timeout" content="long">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>storage_local_setItem_QUOTA_EXCEEDED_ERR</h1>
- <div id="log"></div>
- <script>
- test(function() {
- localStorage.clear();
-
- var index = 0;
- var key = "name";
- var val = "x".repeat(1024);
-
- assert_throws("QUOTA_EXCEEDED_ERR", function() {
- while (true) {
- index++;
- localStorage.setItem("" + key + index, "" + val + index);
- }
- });
-
- localStorage.clear();
- }, "Throws QuotaExceededError when the quota has been exceeded");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/storage_local_window_open.html b/testing/web-platform/tests/webstorage/storage_local_window_open.html
deleted file mode 100644
index 867b31959..000000000
--- a/testing/web-platform/tests/webstorage/storage_local_window_open.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>WebStorage Test: localStorage - open a existing browsing context</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-
-async_test(function(t) {
-
- var storage = window.localStorage;
- storage.clear();
-
- storage.setItem("FOO", "BAR");
- var win = window.open("resources/storage_local_window_open_second.html");
- window.addEventListener('message', t.step_func(function(e) {
- e.data.forEach(t.step_func(function(assertion) {
- assert_equals(assertion.actual, assertion.expected, assertion.message);
- }));
- win.close();
- t.done();
- }));
-
-}, "A new window to make sure there is a copy of the previous window's localStorage, and that they do not diverge after a change");
-
-</script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/storage_removeitem.html b/testing/web-platform/tests/webstorage/storage_removeitem.html
deleted file mode 100644
index 58d66ec37..000000000
--- a/testing/web-platform/tests/webstorage/storage_removeitem.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - removeItem(key)</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("name", "user1");
- assert_equals(storage.getItem("name"), "user1");
-
- storage.removeItem("name");
- storage.removeItem("unknown");
- assert_equals(storage.getItem("name"), null, "storage.getItem('name')")
- }, name + ".removeItem()");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("name", "user1");
- assert_equals(storage.getItem("name"), "user1");
- delete storage["name"];
- delete storage["unknown"];
- assert_equals(storage.getItem("name"), null, "storage.getItem('name')")
- }, "delete " + name + "[]");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("null", "test");
- assert_true("null" in storage);
- storage.removeItem(null);
- assert_false("null" in storage);
- }, name + ".removeItem(null)");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("undefined", "test");
- assert_true("undefined" in storage);
- storage.removeItem(undefined);
- assert_false("undefined" in storage);
- }, name + ".removeItem(undefined)");
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_session-manual.html b/testing/web-platform/tests/webstorage/storage_session-manual.html
deleted file mode 100644
index c2676af14..000000000
--- a/testing/web-platform/tests/webstorage/storage_session-manual.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>WebStorage Test: session storage</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<meta name="flags" content="interact">
-
-<h2>Description</h2>
-<p>
- This test validates that store the data using Session Storage which means that even if you close the page, and re-open it, the data saved before should be lost.
-</p>
-
-<ol class="instructions">
- <li>
- Click the "Clear" button, refresh the page once and then check if the page shows "You have viewed this page 1 time(s)"
- </li>
- <li>
- Close the page, re-open it and then check if the page still shows "You have viewed this page 1 time(s)"
- </li>
- <li>
- If the above two steps are all true the test case pass, otherwise it fail.<br>
- </li>
-</ol>
-
-<p>
- <h2>You have viewed this page
- <span id="count">an untold number of</span>
- time(s).</h2>
- <button type="button" onclick="javascript:sessionStorage.pageLoadCount = 0;"><h3>Clear</h3></button>
-</p>
-
-<script>
-
- if (!sessionStorage.pageLoadCount) {
- sessionStorage.pageLoadCount = 0;
- }
- sessionStorage.pageLoadCount = parseInt(sessionStorage.pageLoadCount) + 1;
- document.getElementById('count').textContent = sessionStorage.pageLoadCount;
-
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_session_setitem_quotaexceedederr.html b/testing/web-platform/tests/webstorage/storage_session_setitem_quotaexceedederr.html
deleted file mode 100644
index 285a4bea2..000000000
--- a/testing/web-platform/tests/webstorage/storage_session_setitem_quotaexceedederr.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>WebStorage Test: sessionStorage - setItem throws QuotaExceededError</title>
- <meta name="timeout" content="long">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>storage_session_setItem_QUOTA_EXCEEDED_ERR</h1>
- <div id="log"></div>
- <script>
- test(function() {
- sessionStorage.clear();
-
- var index = 0;
- var key = "name";
- var val = "x".repeat(1024);
-
- assert_throws("QUOTA_EXCEEDED_ERR", function() {
- while (true) {
- index++;
- sessionStorage.setItem("" + key + index, "" + val + index);
- }
- });
-
- sessionStorage.clear();
- }, "Throws QuotaExceededError when the quota has been exceeded");
- </script>
- </body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/storage_session_window_open.html b/testing/web-platform/tests/webstorage/storage_session_window_open.html
deleted file mode 100644
index 3dea721e9..000000000
--- a/testing/web-platform/tests/webstorage/storage_session_window_open.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>WebStorage Test: sessionStorage - open a existing browsing context</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-
-async_test(function(t) {
-
- var storage = window.sessionStorage;
- storage.clear();
-
- storage.setItem("FOO", "BAR");
- var win = window.open("resources/storage_session_window_open_second.html");
- window.addEventListener('message', t.step_func(function(e) {
- e.data.forEach(t.step_func(function(assertion) {
- assert_equals(assertion.actual, assertion.expected, assertion.message);
- }));
- win.close();
- t.done();
- }));
-
-}, "A new window to make sure there is a copy of the previous window's sessionStorage, and that they diverge after a change");
-
-</script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/storage_set_value_enumerate.html b/testing/web-platform/tests/webstorage/storage_set_value_enumerate.html
deleted file mode 100644
index fc53441a3..000000000
--- a/testing/web-platform/tests/webstorage/storage_set_value_enumerate.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>WebStorage Test: Storage - set value with enumerate</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
- var store_list = [
- ["key0", "value0"],
- ["key1", "value1"],
- ["key2", "value2"]
- ];
- ["localStorage", "sessionStorage"].forEach(function(name) {
- test(function () {
- var storage = window[name];
- storage.clear();
-
- store_list.forEach(function(item) {
- storage.setItem(item[0], item[1]);
- });
-
- for (var i = 0; i < store_list.length; i++) {
- var value = storage.getItem("key" + i);
- assert_equals(value, "value" + i);
- }
- }, "enumerate a " + name + " object with the key and get the values");
- });
-</script>
-
diff --git a/testing/web-platform/tests/webstorage/storage_setitem.html b/testing/web-platform/tests/webstorage/storage_setitem.html
deleted file mode 100644
index fa38284fd..000000000
--- a/testing/web-platform/tests/webstorage/storage_setitem.html
+++ /dev/null
@@ -1,223 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>WebStorage Test: Storage - setItem(key, value)</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- var test_error = { name: "test" };
- var interesting_strs = ["\uD7FF", "\uD800", "\uDBFF", "\uDC00",
- "\uDFFF", "\uE000", "\uFFFD", "\uFFFE", "\uFFFF",
- "\uD83C\uDF4D", "\uD83Ca", "a\uDF4D",
- "\uDBFF\uDFFF"];
-
- for (var i = 0; i <= 0xFF; i++) {
- interesting_strs.push(String.fromCharCode(i));
- }
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("name", "user1");
- assert_equals(storage.length, 1, "localStorage.setItem")
- }, name + ".setItem()");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["name"] = "user1";
- assert_true("name" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("name"), "user1");
- assert_equals(storage["name"], "user1");
- }, name + "[]");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["name"] = "user1";
- storage["name"] = "user2";
- assert_true("name" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("name"), "user2");
- assert_equals(storage["name"], "user2");
- }, name + "[] update");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("age", null);
- assert_true("age" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("age"), "null");
- assert_equals(storage["age"], "null");
- }, name + ".setItem(_, null)");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["age"] = null;
- assert_true("age" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("age"), "null");
- assert_equals(storage["age"], "null");
- }, name + "[] = null");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("age", undefined);
- assert_true("age" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("age"), "undefined");
- assert_equals(storage["age"], "undefined");
- }, name + ".setItem(_, undefined)");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["age"] = undefined;
- assert_true("age" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("age"), "undefined");
- assert_equals(storage["age"], "undefined");
- }, name + "[] = undefined");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("age", "10");
- assert_throws(test_error, function() {
- storage.setItem("age",
- { toString: function() { throw test_error; } });
- });
- assert_true("age" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("age"), "10");
- assert_equals(storage["age"], "10");
- }, name + ".setItem({ throws })");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem("age", "10");
- assert_throws(test_error, function() {
- storage["age"] =
- { toString: function() { throw test_error; } };
- });
- assert_true("age" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("age"), "10");
- assert_equals(storage["age"], "10");
- }, name + "[] = { throws }");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem(undefined, "test");
- assert_true("undefined" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("undefined"), "test");
- assert_equals(storage["undefined"], "test");
- }, name + ".setItem(undefined, _)");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage[undefined] = "test2";
- assert_true("undefined" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("undefined"), "test2");
- assert_equals(storage["undefined"], "test2");
- }, name + "[undefined]");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage.setItem(null, "test");
- assert_true("null" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("null"), "test");
- assert_equals(storage["null"], "test");
- }, name + ".setItem(null, _)");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage[null] = "test2";
- assert_true("null" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("null"), "test2");
- assert_equals(storage["null"], "test2");
- }, name + "[null]");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["foo\0bar"] = "user1";
- assert_true("foo\0bar" in storage);
- assert_false("foo\0" in storage);
- assert_false("foo\0baz" in storage);
- assert_false("foo" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("foo\0bar"), "user1");
- assert_equals(storage.getItem("foo\0"), null);
- assert_equals(storage.getItem("foo\0baz"), null);
- assert_equals(storage.getItem("foo"), null);
- assert_equals(storage["foo\0bar"], "user1");
- assert_equals(storage["foo\0"], undefined);
- assert_equals(storage["foo\0baz"], undefined);
- assert_equals(storage["foo"], undefined);
- }, name + " key containing null");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["name"] = "foo\0bar";
- assert_true("name" in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("name"), "foo\0bar");
- assert_equals(storage["name"], "foo\0bar");
- }, name + " value containing null");
-
- for (i = 0; i < interesting_strs.length; i++) {
- var str = interesting_strs[i];
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage[str] = "user1";
- assert_true(str in storage);
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem(str), "user1");
- assert_equals(storage[str], "user1");
- }, name + "[" + format_value(str) + "]");
-
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["name"] = str;
- assert_equals(storage.length, 1, "storage.length")
- assert_equals(storage.getItem("name"), str);
- assert_equals(storage["name"], str);
- }, name + "[] = " + format_value(str));
- }
-});
-</script>
diff --git a/testing/web-platform/tests/webstorage/storage_string_conversion.html b/testing/web-platform/tests/webstorage/storage_string_conversion.html
deleted file mode 100644
index c76eddfec..000000000
--- a/testing/web-platform/tests/webstorage/storage_string_conversion.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>WebStorage Test: Storage only store strings</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- assert_true(name in window, name + " exist");
-
- var storage = window[name];
- storage.clear();
-
- assert_equals(storage.length, 0);
-
- storage.a = null;
- assert_equals(storage.a, "null");
- storage.b = 0;
- assert_equals(storage.b, "0");
- storage.c = function(){};
- assert_equals(storage.c, "function(){}");
-
- storage.setItem('d', null);
- assert_equals(storage.d, "null");
- storage.setItem('e', 0);
- assert_equals(storage.e, "0");
- storage.setItem('f', function(){});
- assert_equals(storage.f, "function(){}");
-
- storage['g'] = null;
- assert_equals(storage.g, "null");
- storage['h'] = 0;
- assert_equals(storage.h, "0");
- storage['i'] = function(){};
- assert_equals(storage.f, "function(){}");
-
- }, name + " only stores strings");
-});
-
-</script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/webstorage/storage_supported_property_names.html b/testing/web-platform/tests/webstorage/storage_supported_property_names.html
deleted file mode 100644
index d2911d867..000000000
--- a/testing/web-platform/tests/webstorage/storage_supported_property_names.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<meta charset=utf-8>
-<title>Storage Test: Supported property names</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
- ["localStorage", "sessionStorage"].forEach(function(name) {
- test(function() {
- var storage = window[name];
- storage.clear();
-
- storage["name"] = "user1";
- assert_array_equals(Object.getOwnPropertyNames(storage), ['name']);
- }, "Object.getOwnPropertyNames on " + name + " Storage");
-
- test(function() {
- var storage = window[name];
- storage.clear();
- assert_array_equals(Object.getOwnPropertyNames(storage), []);
- }, "Object.getOwnPropertyNames on " + name + " storage with empty collection");
- });
-</script>