From 3fb5197361d8673ff466328fed53384b764db438 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 30 Jun 2015 12:54:31 +0200 Subject: [PATCH] Update web-platform-tests to revision 87398b8448f699e3e324148795891658f2fa16dd --- tests/wpt/metadata/MANIFEST.json | 70 +++++++- .../XMLSerializer-serializeToString.html.ini | 5 + .../wpt/metadata/html/dom/interfaces.html.ini | 30 ++++ tests/wpt/metadata/mozilla-sync | 2 +- .../webstorage/storage_enumerate.html.ini | 8 + .../storage_local_window_open.html.ini | 5 + .../storage_local_window_open_second.html.ini | 5 + .../storage_session_window_open.html.ini | 5 + ...torage_session_window_open_second.html.ini | 5 + .../IndexedDB/idbindex_get7.htm | 2 +- .../IndexedDB/idbindex_getKey7.htm | 2 +- .../IndexedDB/idbindex_openCursor2.htm | 2 +- .../IndexedDB/idbindex_openKeyCursor3.htm | 2 +- .../WebCryptoAPI/getRandomValues.js | 41 +++++ .../WebCryptoAPI/getRandomValues.worker.js | 4 + .../WebCryptoAPI/test_getRandomValues.html | 39 +---- .../html/media-queries/015-novalid.html | 11 -- .../html/media-queries/016-novalid.html | 11 -- .../html/media-queries/017-novalid.html | 11 -- .../html/media-queries/018-haswarn.html | 11 -- .../html/media-queries/022-isvalid.html | 11 -- .../html/media-queries/118-isvalid.html | 13 -- ....html => device-aspect-ratio-novalid.html} | 0 ...4-isvalid.html => projection-novalid.html} | 0 .../{021-isvalid.html => tv-novalid.html} | 0 .../conformance-checkers/messages.json | 15 +- .../xhtml/media-queries/119-isvalid.xhtml | 11 -- .../content-security-policy/README.html | 2 +- .../XMLSerializer-serializeToString.html | 26 +++ .../html/dom/interfaces.html | 2 +- tests/wpt/web-platform-tests/lint.whitelist | 2 - .../URL-createObjectURL-revoke.html | 43 ++++- .../media-source/index.html | 93 ----------- .../mediasource-append-buffer.html | 20 +-- .../mediasource-appendwindow.html | 2 +- .../media-source/mediasource-buffered.html | 16 +- .../mediasource-config-changes.js | 6 +- .../mediasource-endofstream-invaliderror.html | 6 +- .../mediasource-getvideoplaybackquality.html | 2 +- .../media-source/mediasource-play.html | 4 +- .../mediasource-redundant-seek.html | 4 +- ...ediasource-sequencemode-append-buffer.html | 2 +- .../media-source/mediasource-util.js | 113 ++++++------- .../notification-constructor-invalid.html | 2 +- .../resource-timing/test_resource_timing.js | 3 - tests/wpt/web-platform-tests/serve.py | 1 - .../crossorigin-creds-script.js.sub.headers | 2 +- .../crossorigin-creds-style.css.sub.headers | 2 +- tests/wpt/web-platform-tests/tools/LICENSE | 30 ++++ .../wpt/web-platform-tests/tools/lint/lint.py | 31 +++- .../web-platform-tests/url/interfaces.html | 2 +- .../{test.html => test-gainnode.html} | 0 .../webstorage/eventTestHarness.js | 53 +++++++ .../webstorage/event_basic.html | 15 ++ .../webstorage/event_basic.js | 148 +++++++++++++++++ .../webstorage/event_body_attribute.html | 15 ++ .../webstorage/event_body_attribute.js | 148 +++++++++++++++++ .../webstorage/event_case_sensitive.html | 15 ++ .../webstorage/event_case_sensitive.js | 54 +++++++ .../webstorage/event_setattribute.html | 15 ++ .../webstorage/event_setattribute.js | 149 ++++++++++++++++++ .../webstorage/iframe/event_body_handler.html | 14 ++ .../iframe/event_setattribute_handler.html | 15 ++ .../webstorage/storage_enumerate.html | 41 +++++ .../storage_functions_not_overwritten.html | 56 +++++++ ...torage_local_setitem_quotaexceedederr.html | 4 +- .../webstorage/storage_local_window_open.html | 27 ++++ .../storage_local_window_open_second.html | 27 ++++ ...rage_session_setitem_quotaexceedederr.html | 4 +- .../storage_session_window_open.html | 26 +++ .../storage_session_window_open_second.html | 27 ++++ .../webstorage/storage_string_conversion.html | 51 ++++++ 72 files changed, 1293 insertions(+), 348 deletions(-) create mode 100644 tests/wpt/metadata/domparsing/XMLSerializer-serializeToString.html.ini create mode 100644 tests/wpt/metadata/webstorage/storage_enumerate.html.ini create mode 100644 tests/wpt/metadata/webstorage/storage_local_window_open.html.ini create mode 100644 tests/wpt/metadata/webstorage/storage_local_window_open_second.html.ini create mode 100644 tests/wpt/metadata/webstorage/storage_session_window_open.html.ini create mode 100644 tests/wpt/metadata/webstorage/storage_session_window_open_second.html.ini create mode 100644 tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.js create mode 100644 tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.worker.js delete mode 100644 tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/015-novalid.html delete mode 100644 tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/016-novalid.html delete mode 100644 tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/017-novalid.html delete mode 100644 tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/018-haswarn.html delete mode 100644 tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/022-isvalid.html delete mode 100644 tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/118-isvalid.html rename tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/{023-isvalid.html => device-aspect-ratio-novalid.html} (100%) rename tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/{004-isvalid.html => projection-novalid.html} (100%) rename tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/{021-isvalid.html => tv-novalid.html} (100%) delete mode 100644 tests/wpt/web-platform-tests/conformance-checkers/xhtml/media-queries/119-isvalid.xhtml create mode 100644 tests/wpt/web-platform-tests/domparsing/XMLSerializer-serializeToString.html delete mode 100644 tests/wpt/web-platform-tests/media-source/index.html create mode 100644 tests/wpt/web-platform-tests/tools/LICENSE rename tests/wpt/web-platform-tests/webaudio/the-audio-api/the-gainnode-interface/{test.html => test-gainnode.html} (100%) create mode 100644 tests/wpt/web-platform-tests/webstorage/eventTestHarness.js create mode 100644 tests/wpt/web-platform-tests/webstorage/event_basic.html create mode 100644 tests/wpt/web-platform-tests/webstorage/event_basic.js create mode 100644 tests/wpt/web-platform-tests/webstorage/event_body_attribute.html create mode 100644 tests/wpt/web-platform-tests/webstorage/event_body_attribute.js create mode 100644 tests/wpt/web-platform-tests/webstorage/event_case_sensitive.html create mode 100644 tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js create mode 100644 tests/wpt/web-platform-tests/webstorage/event_setattribute.html create mode 100644 tests/wpt/web-platform-tests/webstorage/event_setattribute.js create mode 100644 tests/wpt/web-platform-tests/webstorage/iframe/event_body_handler.html create mode 100644 tests/wpt/web-platform-tests/webstorage/iframe/event_setattribute_handler.html create mode 100644 tests/wpt/web-platform-tests/webstorage/storage_enumerate.html create mode 100644 tests/wpt/web-platform-tests/webstorage/storage_functions_not_overwritten.html create mode 100644 tests/wpt/web-platform-tests/webstorage/storage_local_window_open.html create mode 100644 tests/wpt/web-platform-tests/webstorage/storage_local_window_open_second.html create mode 100644 tests/wpt/web-platform-tests/webstorage/storage_session_window_open.html create mode 100644 tests/wpt/web-platform-tests/webstorage/storage_session_window_open_second.html create mode 100644 tests/wpt/web-platform-tests/webstorage/storage_string_conversion.html diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 5dc9a3c1fff..ca40eed366e 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -11469,6 +11469,10 @@ "path": "IndexedDB/value_recursive.htm", "url": "/IndexedDB/value_recursive.htm" }, + { + "path": "WebCryptoAPI/getRandomValues.worker.js", + "url": "/WebCryptoAPI/getRandomValues.worker" + }, { "path": "WebCryptoAPI/test_getRandomValues.html", "url": "/WebCryptoAPI/test_getRandomValues.html" @@ -13385,6 +13389,10 @@ "path": "domparsing/DOMParser-parseFromString-xml.html", "url": "/domparsing/DOMParser-parseFromString-xml.html" }, + { + "path": "domparsing/XMLSerializer-serializeToString.html", + "url": "/domparsing/XMLSerializer-serializeToString.html" + }, { "path": "domparsing/insert-adjacent.html", "url": "/domparsing/insert-adjacent.html" @@ -16237,6 +16245,10 @@ "path": "html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04.html", "url": "/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04.html" }, + { + "path": "html/semantics/embedded-content/the-img-element/Image-constructor.html", + "url": "/html/semantics/embedded-content/the-img-element/Image-constructor.html" + }, { "path": "html/semantics/embedded-content/the-img-element/current-pixel-density/basic.html", "url": "/html/semantics/embedded-content/the-img-element/current-pixel-density/basic.html" @@ -16253,10 +16265,6 @@ "path": "html/semantics/embedded-content/the-img-element/img.complete.html", "url": "/html/semantics/embedded-content/the-img-element/img.complete.html" }, - { - "path": "html/semantics/embedded-content/the-img-element/Image-constructor.html", - "url": "/html/semantics/embedded-content/the-img-element/Image-constructor.html" - }, { "path": "html/semantics/embedded-content/the-img-element/relevant-mutations.html", "url": "/html/semantics/embedded-content/the-img-element/relevant-mutations.html" @@ -23018,8 +23026,8 @@ "url": "/webaudio/the-audio-api/the-gainnode-interface/idl-test.html" }, { - "path": "webaudio/the-audio-api/the-gainnode-interface/test.html", - "url": "/webaudio/the-audio-api/the-gainnode-interface/test.html" + "path": "webaudio/the-audio-api/the-gainnode-interface/test-gainnode.html", + "url": "/webaudio/the-audio-api/the-gainnode-interface/test-gainnode.html" }, { "path": "webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html", @@ -24245,6 +24253,14 @@ "path": "webstorage/storage_clear.html", "url": "/webstorage/storage_clear.html" }, + { + "path": "webstorage/storage_enumerate.html", + "url": "/webstorage/storage_enumerate.html" + }, + { + "path": "webstorage/storage_functions_not_overwritten.html", + "url": "/webstorage/storage_functions_not_overwritten.html" + }, { "path": "webstorage/storage_getitem.html", "url": "/webstorage/storage_getitem.html" @@ -24269,10 +24285,26 @@ "path": "webstorage/storage_length.html", "url": "/webstorage/storage_length.html" }, + { + "path": "webstorage/storage_local_window_open.html", + "url": "/webstorage/storage_local_window_open.html" + }, + { + "path": "webstorage/storage_local_window_open_second.html", + "url": "/webstorage/storage_local_window_open_second.html" + }, { "path": "webstorage/storage_removeitem.html", "url": "/webstorage/storage_removeitem.html" }, + { + "path": "webstorage/storage_session_window_open.html", + "url": "/webstorage/storage_session_window_open.html" + }, + { + "path": "webstorage/storage_session_window_open_second.html", + "url": "/webstorage/storage_session_window_open_second.html" + }, { "path": "webstorage/storage_set_value_enumerate.html", "url": "/webstorage/storage_set_value_enumerate.html" @@ -24281,6 +24313,10 @@ "path": "webstorage/storage_setitem.html", "url": "/webstorage/storage_setitem.html" }, + { + "path": "webstorage/storage_string_conversion.html", + "url": "/webstorage/storage_string_conversion.html" + }, { "path": "webvtt/interfaces.html", "url": "/webvtt/interfaces.html" @@ -26340,6 +26376,26 @@ "timeout": "long", "url": "/websockets/unload-a-document/005.html" }, + { + "path": "webstorage/event_basic.html", + "timeout": "long", + "url": "/webstorage/event_basic.html" + }, + { + "path": "webstorage/event_body_attribute.html", + "timeout": "long", + "url": "/webstorage/event_body_attribute.html" + }, + { + "path": "webstorage/event_case_sensitive.html", + "timeout": "long", + "url": "/webstorage/event_case_sensitive.html" + }, + { + "path": "webstorage/event_setattribute.html", + "timeout": "long", + "url": "/webstorage/event_setattribute.html" + }, { "path": "webstorage/storage_local_setitem_quotaexceedederr.html", "timeout": "long", @@ -31872,7 +31928,7 @@ } ] }, - "rev": "4d96cccabc2feacd48e1dab9afc22b8af2225572", + "rev": "87398b8448f699e3e324148795891658f2fa16dd", "url_base": "/", "version": 2 } \ No newline at end of file diff --git a/tests/wpt/metadata/domparsing/XMLSerializer-serializeToString.html.ini b/tests/wpt/metadata/domparsing/XMLSerializer-serializeToString.html.ini new file mode 100644 index 00000000000..8adcd02d010 --- /dev/null +++ b/tests/wpt/metadata/domparsing/XMLSerializer-serializeToString.html.ini @@ -0,0 +1,5 @@ +[XMLSerializer-serializeToString.html] + type: testharness + [check XMLSerializer.serializeToString method could parsing xmldoc to string] + expected: FAIL + diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index 3d059e0dd58..d000553cacc 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -9015,3 +9015,33 @@ [WebSocket interface: operation send(ArrayBufferView)] expected: FAIL + [HTMLOptionElement must be primary interface of new Option()] + expected: FAIL + + [Stringification of new Option()] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "disabled" with the proper type (0)] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "form" with the proper type (1)] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "label" with the proper type (2)] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "defaultSelected" with the proper type (3)] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "selected" with the proper type (4)] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "value" with the proper type (5)] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "text" with the proper type (6)] + expected: FAIL + + [HTMLOptionElement interface: new Option() must inherit property "index" with the proper type (7)] + expected: FAIL + diff --git a/tests/wpt/metadata/mozilla-sync b/tests/wpt/metadata/mozilla-sync index dc9acd461d3..42a6f02a9af 100644 --- a/tests/wpt/metadata/mozilla-sync +++ b/tests/wpt/metadata/mozilla-sync @@ -1 +1 @@ -d86c5879255ec9ced621412d4565a9a66ee4dc72 \ No newline at end of file +836463b9e03f441aaf213ff48c99d50d8c1be5a5 \ No newline at end of file diff --git a/tests/wpt/metadata/webstorage/storage_enumerate.html.ini b/tests/wpt/metadata/webstorage/storage_enumerate.html.ini new file mode 100644 index 00000000000..e9c308dcb55 --- /dev/null +++ b/tests/wpt/metadata/webstorage/storage_enumerate.html.ini @@ -0,0 +1,8 @@ +[storage_enumerate.html] + type: testharness + [localStorage: enumerate a Storage object and get only the keys as a result and the built-in properties of the Storage object should be ignored] + expected: FAIL + + [sessionStorage: enumerate a Storage object and get only the keys as a result and the built-in properties of the Storage object should be ignored] + expected: FAIL + diff --git a/tests/wpt/metadata/webstorage/storage_local_window_open.html.ini b/tests/wpt/metadata/webstorage/storage_local_window_open.html.ini new file mode 100644 index 00000000000..4cf4a59cd27 --- /dev/null +++ b/tests/wpt/metadata/webstorage/storage_local_window_open.html.ini @@ -0,0 +1,5 @@ +[storage_local_window_open.html] + type: testharness + [A new window to make sure there is a copy of the previous window's localStorage, and that they diverge after a change] + expected: FAIL + diff --git a/tests/wpt/metadata/webstorage/storage_local_window_open_second.html.ini b/tests/wpt/metadata/webstorage/storage_local_window_open_second.html.ini new file mode 100644 index 00000000000..d174c62a22b --- /dev/null +++ b/tests/wpt/metadata/webstorage/storage_local_window_open_second.html.ini @@ -0,0 +1,5 @@ +[storage_local_window_open_second.html] + type: testharness + [A new window to make sure there is a copy of the previous window's localStorage, and that they diverge after a change] + expected: FAIL + diff --git a/tests/wpt/metadata/webstorage/storage_session_window_open.html.ini b/tests/wpt/metadata/webstorage/storage_session_window_open.html.ini new file mode 100644 index 00000000000..555a8e32fdd --- /dev/null +++ b/tests/wpt/metadata/webstorage/storage_session_window_open.html.ini @@ -0,0 +1,5 @@ +[storage_session_window_open.html] + type: testharness + [A new window to make sure there is a copy of the previous window's sessionStorage, and that they diverge after a change] + expected: FAIL + diff --git a/tests/wpt/metadata/webstorage/storage_session_window_open_second.html.ini b/tests/wpt/metadata/webstorage/storage_session_window_open_second.html.ini new file mode 100644 index 00000000000..46bffcd7fb0 --- /dev/null +++ b/tests/wpt/metadata/webstorage/storage_session_window_open_second.html.ini @@ -0,0 +1,5 @@ +[storage_session_window_open_second.html] + type: testharness + [A new window to make sure there is a copy of the previous window's sessionStorage, and that they diverge after a change] + expected: FAIL + diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm index a49b0efc6ff..daf0f574968 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm @@ -20,7 +20,7 @@ e.target.transaction.abort(); - assert_throws("TransactionInactiveError", function(){ + assert_throws("InvalidStateError", function(){ index.get("data"); }); t.done(); diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm index 5a35ebb5c91..f41f7635211 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm @@ -20,7 +20,7 @@ e.target.transaction.abort(); - assert_throws("TransactionInactiveError", function(){ + assert_throws("InvalidStateError", function(){ index.getKey("data"); }); t.done(); diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm index d39254055f1..c056abded3e 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm @@ -20,7 +20,7 @@ e.target.transaction.abort(); - assert_throws("TransactionInactiveError", function(){ + assert_throws("InvalidStateError", function(){ index.openCursor(); }); t.done(); diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm index b4af3172417..1f5fd015590 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm @@ -20,7 +20,7 @@ e.target.transaction.abort(); - assert_throws("TransactionInactiveError", function(){ + assert_throws("InvalidStateError", function(){ index.openKeyCursor(); }); t.done(); diff --git a/tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.js b/tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.js new file mode 100644 index 00000000000..77855b2822d --- /dev/null +++ b/tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.js @@ -0,0 +1,41 @@ +function run_test() { + // Step 1. + test(function() { + assert_throws("TypeMismatchError", function() { + self.crypto.getRandomValues(new Float32Array(6)) + }, "Float32Array") + assert_throws("TypeMismatchError", function() { + self.crypto.getRandomValues(new Float64Array(6)) + }, "Float64Array") + + assert_throws("TypeMismatchError", function() { + self.crypto.getRandomValues(new Float32Array(65537)) + }, "Float32Array (too long)") + assert_throws("TypeMismatchError", function() { + self.crypto.getRandomValues(new Float64Array(65537)) + }, "Float64Array (too long)") + }, "Float arrays") + + test(function() { + assert_equals(self.crypto.getRandomValues(new Int8Array(8)).constructor, + Int8Array, "crypto.getRandomValues(new Int8Array(8))") + assert_equals(self.crypto.getRandomValues(new Uint8Array(8)).constructor, + Uint8Array, "crypto.getRandomValues(new Uint8Array(8))") + + assert_equals(self.crypto.getRandomValues(new Int16Array(8)).constructor, + Int16Array, "crypto.getRandomValues(new Int16Array(8))") + assert_equals(self.crypto.getRandomValues(new Uint16Array(8)).constructor, + Uint16Array, "crypto.getRandomValues(new Uint16Array(8))") + + assert_equals(self.crypto.getRandomValues(new Int32Array(8)).constructor, + Int32Array, "crypto.getRandomValues(new Int32Array(8))") + assert_equals(self.crypto.getRandomValues(new Uint32Array(8)).constructor, + Uint32Array, "crypto.getRandomValues(new Uint32Array(8))") + }, "Integer arrays") + + test(function() { + assert_throws("QuotaExceededError", function() { + self.crypto.getRandomValues(new Int8Array(65537)) + }, "crypto.getRandomValues length over 65536") + }, "Large length") +} diff --git a/tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.worker.js b/tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.worker.js new file mode 100644 index 00000000000..cc2635630d1 --- /dev/null +++ b/tests/wpt/web-platform-tests/WebCryptoAPI/getRandomValues.worker.js @@ -0,0 +1,4 @@ +importScripts("/resources/testharness.js"); +importScripts("getRandomValues.js"); +run_test(); +done(); diff --git a/tests/wpt/web-platform-tests/WebCryptoAPI/test_getRandomValues.html b/tests/wpt/web-platform-tests/WebCryptoAPI/test_getRandomValues.html index 62b00e9f12c..a5cd5370950 100644 --- a/tests/wpt/web-platform-tests/WebCryptoAPI/test_getRandomValues.html +++ b/tests/wpt/web-platform-tests/WebCryptoAPI/test_getRandomValues.html @@ -5,43 +5,8 @@ +
diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/015-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/015-novalid.html deleted file mode 100644 index 3f896f06171..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/015-novalid.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - -tv and (scan: 1) - - - -

tv and (scan: 1)

- - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/016-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/016-novalid.html deleted file mode 100644 index 8f7a3f003f2..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/016-novalid.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - -tv and (scan: İNTERLACE) - - - -

tv and (scan: İNTERLACE)

- - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/017-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/017-novalid.html deleted file mode 100644 index b8340dd9829..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/017-novalid.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - -screen and (device-aspect-ratio: 16px/9pt) - - - -

screen and (device-aspect-ratio: 16px/9pt)

- - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/018-haswarn.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/018-haswarn.html deleted file mode 100644 index 2b9b1cde9ec..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/018-haswarn.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - -Check that device-aspect-ratio warns about U+000C before/after slash in value - - - -

screen and (device-aspect-ratio: 16 / 9)

- - diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/022-isvalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/022-isvalid.html deleted file mode 100644 index 0481671ada4..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/022-isvalid.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - -tv and (scan: interlace) - - - -

tv and (scan: interlace)

- - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/118-isvalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/118-isvalid.html deleted file mode 100644 index 00999cfa8ca..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/118-isvalid.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - -Check that device-aspect-ratio allows space, tab, or LF before & after slash - - - -

Check that device-aspect-ratio allows space, tab, or LF before & after slash

- - diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/023-isvalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/device-aspect-ratio-novalid.html similarity index 100% rename from tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/023-isvalid.html rename to tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/device-aspect-ratio-novalid.html diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/004-isvalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/projection-novalid.html similarity index 100% rename from tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/004-isvalid.html rename to tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/projection-novalid.html diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/021-isvalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/tv-novalid.html similarity index 100% rename from tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/021-isvalid.html rename to tests/wpt/web-platform-tests/conformance-checkers/html/media-queries/tv-novalid.html diff --git a/tests/wpt/web-platform-tests/conformance-checkers/messages.json b/tests/wpt/web-platform-tests/conformance-checkers/messages.json index 71c5f3ca5c5..34e3a756738 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/messages.json +++ b/tests/wpt/web-platform-tests/conformance-checkers/messages.json @@ -1799,8 +1799,8 @@ "html/elements/q/cite/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/q/cite/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in user or password: not a URL code point.", "html/elements/q/model-novalid.html": "End tag \u201cp\u201d implied, but there were open elements.", - "html/elements/ruby/empty-novalid.html": "Element \u201cruby\u201d is missing one or more of the following child elements: [rp, rt].", - "html/elements/ruby/missing-rt-novalid.html": "Element \u201cruby\u201d is missing required child element \u201crt\u201d.", + "html/elements/ruby/empty-novalid.html": "Element \u201cruby\u201d is missing one or more of the following child elements: [rp, rt, rtc].", + "html/elements/ruby/missing-rt-novalid.html": "Element \u201cruby\u201d is missing one or more of the following child elements: [rt, rtc].", "html/elements/samp/model-novalid.html": "End tag \u201cp\u201d implied, but there were open elements.", "html/elements/script/language-novalid.html": "The \u201clanguage\u201d attribute on the \u201cscript\u201d element is obsolete. Use the \u201ctype\u201d attribute instead.", "html/elements/script/src-empty-novalid.html": "Bad value \u201c\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Must be non-empty.", @@ -2161,16 +2161,15 @@ "html/media-queries/012-novalid.html": "Bad value \u201cscreen and (min-width: 400px)and (max-width: 600px)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected whitespace but saw \u201ca\u201d instead.", "html/media-queries/013-novalid.html": "Bad value \u201cscreen and (min-width:\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Media query ended prematurely.", "html/media-queries/014-novalid.html": "Bad value \u201cscreen and (min-width: 400px) and\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Media query ended prematurely.", - "html/media-queries/015-novalid.html": "Bad value \u201ctv and (scan: 1)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected a letter but saw \u201c1\u201d instead.", - "html/media-queries/016-novalid.html": "Bad value \u201ctv and (scan: \u0130NTERLACE)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected a letter but saw \u201c\u0130\u201d instead.", - "html/media-queries/017-novalid.html": "Bad value \u201cscreen and (device-aspect-ratio: 16px/9pt)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected a digit, whitespace or \u201c/\u201d for device-aspect-ratio value but saw \u201cp\u201d instead.", - "html/media-queries/018-haswarn.html": "This document is not mappable to XML 1.0 without data loss due to U+000c which is not a legal XML 1.0 character.", "html/media-queries/019-novalid.html": "Bad value \u201cscreen and (color: 1em)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected a digit, whitespace or \u201c)\u201d but saw \u201ce\u201d instead.", "html/media-queries/020-novalid.html": "Bad value \u201c,\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Media query ended prematurely.", "html/media-queries/021-novalid.html": "Bad value \u201cscreen,,print\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Media query ended prematurely.", "html/media-queries/022-novalid.html": "Bad value \u201cscreen,\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Media query ended prematurely.", "html/media-queries/023-novalid.html": "Bad value \u201c,screen\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Media query ended prematurely.", "html/media-queries/024-novalid.html": "Bad value \u201cscreen and (min-width: 400)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Non-zero lengths require a unit.", + "html/media-queries/device-aspect-ratio-novalid.html": "Bad value \u201cscreen and (device-aspect-ratio: 16/9)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected a CSS media feature but saw \u201cdevice-aspect-ratio\u201d instead.", + "html/media-queries/projection-novalid.html": "Bad value \u201cprojection\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected a CSS media type but the query ended.", + "html/media-queries/tv-novalid.html": "Bad value \u201ctv and (scan: progressive)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Expected a CSS media type but saw \u201ctv\u201d instead.", "html/microdata/itemid-scheme-data-contains-fragment-haswarn.html": "Bad value \u201cdata:text/html,test#test\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Fragment is not allowed for data: URIs according to RFC 2397.", "html/microdata/itemid/fragment-backslash-novalid.html": "Bad value \u201c#\\\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in fragment: not a URL code point.", "html/microdata/itemid/fragment-contains-hash-novalid.html": "Bad value \u201chttp://foo/path#f#g\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in fragment: not a URL code point.", @@ -2391,8 +2390,8 @@ "xhtml/elements/progress/009-novalid.xhtml": "The value of the \u201cvalue\u201d attribute must be less than or equal to the value of the \u201cmax\u201d attribute.", "xhtml/elements/progress/108-novalid.xhtml": "The value of the \u201cvalue\u201d attribute must be less than or equal to one when the \u201cmax\u201d attribute is absent.", "xhtml/elements/progress/309-novalid.xhtml": "The value of the \u201cvalue\u201d attribute must be less than or equal to the value of the \u201cmax\u201d attribute.", - "xhtml/elements/ruby/001-novalid.xhtml": "Element \u201cruby\u201d is missing one or more of the following child elements: [rp, rt].", - "xhtml/elements/ruby/002-novalid.xhtml": "Element \u201cruby\u201d is missing required child element \u201crt\u201d.", + "xhtml/elements/ruby/001-novalid.xhtml": "Element \u201cruby\u201d is missing one or more of the following child elements: [rp, rt, rtc].", + "xhtml/elements/ruby/002-novalid.xhtml": "Element \u201cruby\u201d is missing one or more of the following child elements: [rt, rtc].", "xhtml/elements/script/001-novalid.xhtml": "The \u201clanguage\u201d attribute on the \u201cscript\u201d element is obsolete. Use the \u201ctype\u201d attribute instead.", "xhtml/elements/table/201-novalid.xhtml": "Table cell spans past the end of its row group established by a \u201ctbody\u201d element; clipped to the end of the row group.", "xhtml/elements/table/202-novalid.xhtml": "Table cell is overlapped by later table cell.", diff --git a/tests/wpt/web-platform-tests/conformance-checkers/xhtml/media-queries/119-isvalid.xhtml b/tests/wpt/web-platform-tests/conformance-checkers/xhtml/media-queries/119-isvalid.xhtml deleted file mode 100644 index 857c16dea38..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/xhtml/media-queries/119-isvalid.xhtml +++ /dev/null @@ -1,11 +0,0 @@ - - - - -Check that device-aspect-ratio allows CR before and after slash - - - -

Check that device-aspect-ratio allows CR before andafter slash

- - diff --git a/tests/wpt/web-platform-tests/content-security-policy/README.html b/tests/wpt/web-platform-tests/content-security-policy/README.html index 6d71659cbb7..88cd0367c5e 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/README.html +++ b/tests/wpt/web-platform-tests/content-security-policy/README.html @@ -3,7 +3,7 @@ Introduction to Writing Content Security Policy Tests - + + + + +

domparsing_XMLSerializer_serializeToString

+ + + diff --git a/tests/wpt/web-platform-tests/html/dom/interfaces.html b/tests/wpt/web-platform-tests/html/dom/interfaces.html index 58e4d241d9c..29d059bdc1e 100644 --- a/tests/wpt/web-platform-tests/html/dom/interfaces.html +++ b/tests/wpt/web-platform-tests/html/dom/interfaces.html @@ -3332,7 +3332,7 @@ window.onload = function() { HTMLSelectElement: ['document.createElement("select")'], HTMLDataListElement: ['document.createElement("datalist")'], HTMLOptGroupElement: ['document.createElement("optgroup")'], - HTMLOptionElement: ['document.createElement("option")'], + HTMLOptionElement: ['document.createElement("option")', 'new Option()'], HTMLTextAreaElement: ['document.createElement("textarea")'], HTMLKeygenElement: ['document.createElement("keygen")'], HTMLOutputElement: ['document.createElement("output")'], diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index a0d7f1cfd25..30732fbfb14 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -16,7 +16,6 @@ INDENT TABS: content-security-policy/* INDENT TABS: custom-elements/* INDENT TABS: DOMEvents/* INDENT TABS: html/editing/dnd/* -INDENT TABS: media-source/* INDENT TABS: old-tests/* INDENT TABS: pointerlock/* INDENT TABS: shadow-dom/* @@ -36,7 +35,6 @@ TRAILING WHITESPACE: content-security-policy/* TRAILING WHITESPACE: custom-elements/* TRAILING WHITESPACE: DOMEvents/* TRAILING WHITESPACE: html-longdesc/* -TRAILING WHITESPACE: media-source/* TRAILING WHITESPACE: microdata/* TRAILING WHITESPACE: old-tests/* TRAILING WHITESPACE: pointerevents/* diff --git a/tests/wpt/web-platform-tests/media-source/URL-createObjectURL-revoke.html b/tests/wpt/web-platform-tests/media-source/URL-createObjectURL-revoke.html index a194d24636e..c5e18d4fd58 100644 --- a/tests/wpt/web-platform-tests/media-source/URL-createObjectURL-revoke.html +++ b/tests/wpt/web-platform-tests/media-source/URL-createObjectURL-revoke.html @@ -9,14 +9,51 @@
diff --git a/tests/wpt/web-platform-tests/media-source/index.html b/tests/wpt/web-platform-tests/media-source/index.html deleted file mode 100644 index 903afffdd56..00000000000 --- a/tests/wpt/web-platform-tests/media-source/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -
-
- - diff --git a/tests/wpt/web-platform-tests/media-source/mediasource-append-buffer.html b/tests/wpt/web-platform-tests/media-source/mediasource-append-buffer.html index 3bff4d9fa53..ac2c487491d 100644 --- a/tests/wpt/web-platform-tests/media-source/mediasource-append-buffer.html +++ b/tests/wpt/web-platform-tests/media-source/mediasource-append-buffer.html @@ -11,7 +11,7 @@ + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webstorage/event_basic.js b/tests/wpt/web-platform-tests/webstorage/event_basic.js new file mode 100644 index 00000000000..dbc113675e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_basic.js @@ -0,0 +1,148 @@ +test(function() { + var name ; + testStorages(runTest); + + function runTest(storageString, callback) + { + name = storageString; + window.completionCallback = callback; + + assert_true(storageString in window, storageString + " exist"); + window.storage = eval(storageString); + + storageEventList = new Array(); + storage.clear(); + assert_equals(storage.length, 0, "storage.length"); + + runAfterNStorageEvents(step1, 0); + } + + function step1(msg) + { + storageEventList = new Array(); + storage.setItem('FOO', 'BAR'); + + runAfterNStorageEvents(step2, 1); + } + + function shouldBeEqualToString(express, expectValue) { + assert_equals(typeof express, "string"); + assert_equals(express, expectValue); + } + + function step2(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 1); + shouldBeEqualToString(storageEventList[0].key, "FOO"); + assert_equals(storageEventList[0].oldValue, null); + shouldBeEqualToString(storageEventList[0].newValue, "BAR"); + }, name + ": the first storage event properties"); + + storage.setItem('FU', 'BAR'); + storage.setItem('a', '1'); + storage.setItem('b', '2'); + storage.setItem('b', '3'); + + runAfterNStorageEvents(step3, 5); + } + + function step3(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 5); + shouldBeEqualToString(storageEventList[1].key, "FU"); + assert_equals(storageEventList[1].oldValue, null); + shouldBeEqualToString(storageEventList[1].newValue, "BAR"); + }, name + ": the second storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[2].key, "a"); + assert_equals(storageEventList[2].oldValue, null); + shouldBeEqualToString(storageEventList[2].newValue, "1"); + }, name + ": the third storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[3].key, "b"); + assert_equals(storageEventList[3].oldValue, null); + shouldBeEqualToString(storageEventList[3].newValue, "2"); + }, name + ": the fourth storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[4].key, "b"); + shouldBeEqualToString(storageEventList[4].oldValue, "2"); + shouldBeEqualToString(storageEventList[4].newValue, "3"); + }, name + ": the fifth storage event properties"); + + + storage.removeItem('FOO'); + + runAfterNStorageEvents(step4, 6); + } + + function step4(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 6); + shouldBeEqualToString(storageEventList[5].key, "FOO"); + shouldBeEqualToString(storageEventList[5].oldValue, "BAR"); + assert_equals(storageEventList[5].newValue, null); + }, name + ": the sixth storage event properties"); + + storage.removeItem('FU'); + + runAfterNStorageEvents(step5, 7); + } + + function step5(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 7); + shouldBeEqualToString(storageEventList[6].key, "FU"); + shouldBeEqualToString(storageEventList[6].oldValue, "BAR"); + assert_equals(storageEventList[6].newValue, null); + }, name + ": the seventh storage event properties"); + + storage.clear(); + + runAfterNStorageEvents(step6, 8); + } + + function step6(msg) + { + test(function() { + 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); + }, name + ": the eighth storage event properties"); + + completionCallback(); + } + +}, "DOM Storage mutations fire StorageEvents that are caught by the event listener set via window.onstorage."); + diff --git a/tests/wpt/web-platform-tests/webstorage/event_body_attribute.html b/tests/wpt/web-platform-tests/webstorage/event_body_attribute.html new file mode 100644 index 00000000000..80ec6761864 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_body_attribute.html @@ -0,0 +1,15 @@ + + + + +WebStorage Test: StorageEvent - set onstorage as body attribute + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webstorage/event_body_attribute.js b/tests/wpt/web-platform-tests/webstorage/event_body_attribute.js new file mode 100644 index 00000000000..5c976740c6c --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_body_attribute.js @@ -0,0 +1,148 @@ +test(function() { + var name ; + testStorages(runTest); + + function runTest(storageString, callback) + { + name = storageString; + window.completionCallback = callback; + + assert_true(storageString in window, storageString + " exist"); + window.storage = eval(storageString); + + storage.clear(); + assert_equals(storage.length, 0, "storage.length"); + + iframe.onload = step1; + iframe.src = "iframe/event_body_handler.html"; + } + + function step1(msg) + { + storageEventList = new Array(); + storage.setItem('FOO', 'BAR'); + + runAfterNStorageEvents(step2, 1); + } + + function shouldBeEqualToString(express, expectValue) { + assert_equals(typeof express, "string"); + assert_equals(express, expectValue); + } + + function step2(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 1); + shouldBeEqualToString(storageEventList[0].key, "FOO"); + assert_equals(storageEventList[0].oldValue, null); + shouldBeEqualToString(storageEventList[0].newValue, "BAR"); + }, name + ": the first storage event properties"); + + storage.setItem('FU', 'BAR'); + storage.setItem('a', '1'); + storage.setItem('b', '2'); + storage.setItem('b', '3'); + + runAfterNStorageEvents(step3, 5); + } + + function step3(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 5); + shouldBeEqualToString(storageEventList[1].key, "FU"); + assert_equals(storageEventList[1].oldValue, null); + shouldBeEqualToString(storageEventList[1].newValue, "BAR"); + }, name + ": the second storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[2].key, "a"); + assert_equals(storageEventList[2].oldValue, null); + shouldBeEqualToString(storageEventList[2].newValue, "1"); + }, name + ": the third storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[3].key, "b"); + assert_equals(storageEventList[3].oldValue, null); + shouldBeEqualToString(storageEventList[3].newValue, "2"); + }, name + ": the fourth storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[4].key, "b"); + shouldBeEqualToString(storageEventList[4].oldValue, "2"); + shouldBeEqualToString(storageEventList[4].newValue, "3"); + }, name + ": the fifth storage event properties"); + + + storage.removeItem('FOO'); + + runAfterNStorageEvents(step4, 6); + } + + function step4(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 6); + shouldBeEqualToString(storageEventList[5].key, "FOO"); + shouldBeEqualToString(storageEventList[5].oldValue, "BAR"); + assert_equals(storageEventList[5].newValue, null); + }, name + ": the sixth storage event properties"); + + storage.removeItem('FU'); + + runAfterNStorageEvents(step5, 7); + } + + function step5(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 7); + shouldBeEqualToString(storageEventList[6].key, "FU"); + shouldBeEqualToString(storageEventList[6].oldValue, "BAR"); + assert_equals(storageEventList[6].newValue, null); + }, name + ": the seventh storage event properties"); + + storage.clear(); + + runAfterNStorageEvents(step6, 8); + } + + function step6(msg) + { + test(function() { + 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); + }, name + ": the eighth storage event properties"); + + completionCallback(); + } + +}, "DOM Storage mutations fire StorageEvents that are caught by the event listener specified as an attribute on the body."); + diff --git a/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.html b/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.html new file mode 100644 index 00000000000..916b2304126 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.html @@ -0,0 +1,15 @@ + + + + +WebStorage Test: StorageEvent - the case of value changed + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js b/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js new file mode 100644 index 00000000000..71be9049042 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js @@ -0,0 +1,54 @@ +test(function() { + var name ; + testStorages(runTest); + + function runTest(storageString, callback) + { + name = storageString; + window.completionCallback = callback; + + assert_true(storageString in window, storageString + " exist"); + window.storage = eval(storageString); + + storage.clear(); + assert_equals(storage.length, 0, "storage.length"); + storage.foo = "test"; + + runAfterNStorageEvents(step1, 1); + } + + function step1(msg) + { + storageEventList = new Array(); + storage.foo = "test"; + + runAfterNStorageEvents(step2, 0); + } + + function step2(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 0); + }, name + ": The key/value does not change, the event is not fired."); + + storage.foo = "TEST"; + + runAfterNStorageEvents(step3, 1); + } + + function step3(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 1); + }, name + ": The event is fired when the value case is changed."); + + completionCallback(); + } +}, "storage events fire even when only the case of the value changes."); + diff --git a/tests/wpt/web-platform-tests/webstorage/event_setattribute.html b/tests/wpt/web-platform-tests/webstorage/event_setattribute.html new file mode 100644 index 00000000000..c48a2e0fc35 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_setattribute.html @@ -0,0 +1,15 @@ + + + + +WebStorage Test: StorageEvent - attached setAttribute + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webstorage/event_setattribute.js b/tests/wpt/web-platform-tests/webstorage/event_setattribute.js new file mode 100644 index 00000000000..1a56504c1db --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_setattribute.js @@ -0,0 +1,149 @@ +test(function() { + var name ; + testStorages(runTest); + + function runTest(storageString, callback) + { + name = storageString; + window.completionCallback = callback; + + assert_true(storageString in window, storageString + " exist"); + window.storage = eval(storageString); + + storageEventList = new Array(); + storage.clear(); + assert_equals(storage.length, 0, "storage.length"); + + iframe.onload = step1; + iframe.src = "iframe/event_setattribute_handler.html"; + } + + function step1(msg) + { + storageEventList = new Array(); + storage.setItem('FOO', 'BAR'); + + runAfterNStorageEvents(step2, 1); + } + + function shouldBeEqualToString(express, expectValue) { + assert_equals(typeof express, "string"); + assert_equals(express, expectValue); + } + + function step2(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 1); + shouldBeEqualToString(storageEventList[0].key, "FOO"); + assert_equals(storageEventList[0].oldValue, null); + shouldBeEqualToString(storageEventList[0].newValue, "BAR"); + }, name + ": the first storage event properties"); + + storage.setItem('FU', 'BAR'); + storage.setItem('a', '1'); + storage.setItem('b', '2'); + storage.setItem('b', '3'); + + runAfterNStorageEvents(step3, 5); + } + + function step3(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 5); + shouldBeEqualToString(storageEventList[1].key, "FU"); + assert_equals(storageEventList[1].oldValue, null); + shouldBeEqualToString(storageEventList[1].newValue, "BAR"); + }, name + ": the second storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[2].key, "a"); + assert_equals(storageEventList[2].oldValue, null); + shouldBeEqualToString(storageEventList[2].newValue, "1"); + }, name + ": the third storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[3].key, "b"); + assert_equals(storageEventList[3].oldValue, null); + shouldBeEqualToString(storageEventList[3].newValue, "2"); + }, name + ": the forth storage event properties"); + + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + shouldBeEqualToString(storageEventList[4].key, "b"); + shouldBeEqualToString(storageEventList[4].oldValue, "2"); + shouldBeEqualToString(storageEventList[4].newValue, "3"); + }, name + ": the fifth storage event properties"); + + + storage.removeItem('FOO'); + + runAfterNStorageEvents(step4, 6); + } + + function step4(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 6); + shouldBeEqualToString(storageEventList[5].key, "FOO"); + shouldBeEqualToString(storageEventList[5].oldValue, "BAR"); + assert_equals(storageEventList[5].newValue, null); + }, name + ": the sixth storage event properties"); + + storage.removeItem('FU'); + + runAfterNStorageEvents(step5, 7); + } + + function step5(msg) + { + test(function() { + if(msg != undefined) { + assert_unreached(msg); + } + assert_equals(storageEventList.length, 7); + shouldBeEqualToString(storageEventList[6].key, "FU"); + shouldBeEqualToString(storageEventList[6].oldValue, "BAR"); + assert_equals(storageEventList[6].newValue, null); + }, name + ": the seventh storage event properties"); + + storage.clear(); + + runAfterNStorageEvents(step6, 8); + } + + function step6(msg) + { + test(function() { + 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); + }, name + ": the eighth storage event properties"); + + completionCallback(); + } + +}, "DOM Storage mutations fire StorageEvents that are caught by the event listener attached via setattribute."); + diff --git a/tests/wpt/web-platform-tests/webstorage/iframe/event_body_handler.html b/tests/wpt/web-platform-tests/webstorage/iframe/event_body_handler.html new file mode 100644 index 00000000000..1200f405e67 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/iframe/event_body_handler.html @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webstorage/iframe/event_setattribute_handler.html b/tests/wpt/web-platform-tests/webstorage/iframe/event_setattribute_handler.html new file mode 100644 index 00000000000..f5d6f8a06ff --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/iframe/event_setattribute_handler.html @@ -0,0 +1,15 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webstorage/storage_enumerate.html b/tests/wpt/web-platform-tests/webstorage/storage_enumerate.html new file mode 100644 index 00000000000..1586f7a6128 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/storage_enumerate.html @@ -0,0 +1,41 @@ + + + +WebStorage Test: Storage - enumerate and built-in properties + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/webstorage/storage_functions_not_overwritten.html b/tests/wpt/web-platform-tests/webstorage/storage_functions_not_overwritten.html new file mode 100644 index 00000000000..dd67f17ac07 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/storage_functions_not_overwritten.html @@ -0,0 +1,56 @@ + + + +WebStorage Test: Storage - set key with the same name as storage function + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/webstorage/storage_local_setitem_quotaexceedederr.html b/tests/wpt/web-platform-tests/webstorage/storage_local_setitem_quotaexceedederr.html index 8f3b30d0e33..8258a011542 100644 --- a/tests/wpt/web-platform-tests/webstorage/storage_local_setitem_quotaexceedederr.html +++ b/tests/wpt/web-platform-tests/webstorage/storage_local_setitem_quotaexceedederr.html @@ -20,12 +20,12 @@ assert_throws("QUOTA_EXCEEDED_ERR", function() { while (true) { index++; - localStorage.setItem("" + key + index, "" + name + index); + localStorage.setItem("" + key + index, "" + index); } }); localStorage.clear(); - }, "Throws QuotaExceededError when the quota of " + name + " has been exceeded"); + }, "Throws QuotaExceededError when the quota has been exceeded"); diff --git a/tests/wpt/web-platform-tests/webstorage/storage_local_window_open.html b/tests/wpt/web-platform-tests/webstorage/storage_local_window_open.html new file mode 100644 index 00000000000..e5625927bcd --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/storage_local_window_open.html @@ -0,0 +1,27 @@ + + + +WebStorage Test: localStorage - open a existing browsing context + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/webstorage/storage_local_window_open_second.html b/tests/wpt/web-platform-tests/webstorage/storage_local_window_open_second.html new file mode 100644 index 00000000000..15ce2f34e52 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/storage_local_window_open_second.html @@ -0,0 +1,27 @@ + + + +WebStorage Test: localStorage - second page + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/webstorage/storage_session_setitem_quotaexceedederr.html b/tests/wpt/web-platform-tests/webstorage/storage_session_setitem_quotaexceedederr.html index 1541b4e4141..d78b29ebdc4 100644 --- a/tests/wpt/web-platform-tests/webstorage/storage_session_setitem_quotaexceedederr.html +++ b/tests/wpt/web-platform-tests/webstorage/storage_session_setitem_quotaexceedederr.html @@ -20,12 +20,12 @@ assert_throws("QUOTA_EXCEEDED_ERR", function() { while (true) { index++; - sessionStorage.setItem("" + key + index, "" + name + index); + sessionStorage.setItem("" + key + index, "" + index); } }); sessionStorage.clear(); - }, "Throws QuotaExceededError when the quota of " + name + " has been exceeded"); + }, "Throws QuotaExceededError when the quota has been exceeded"); diff --git a/tests/wpt/web-platform-tests/webstorage/storage_session_window_open.html b/tests/wpt/web-platform-tests/webstorage/storage_session_window_open.html new file mode 100644 index 00000000000..d8016e91372 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/storage_session_window_open.html @@ -0,0 +1,26 @@ + + + +WebStorage Test: sessionStorage - open a existing browsing context + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/webstorage/storage_session_window_open_second.html b/tests/wpt/web-platform-tests/webstorage/storage_session_window_open_second.html new file mode 100644 index 00000000000..3e241f4b3c2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/storage_session_window_open_second.html @@ -0,0 +1,27 @@ + + + +WebStorage Test: sessionStorage - second page + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/webstorage/storage_string_conversion.html b/tests/wpt/web-platform-tests/webstorage/storage_string_conversion.html new file mode 100644 index 00000000000..66b7d90a66c --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/storage_string_conversion.html @@ -0,0 +1,51 @@ + + + +WebStorage Test: Storage only store strings + + + + +
+ + +