diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index c3c4e32f435..47106525131 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -4489,7 +4489,7 @@ "path": "html/rendering/non-replaced-elements/the-hr-element-0/color.html", "references": [ [ - "html/rendering/non-replaced-elements/the-hr-element-0/color-ref.html", + "/html/rendering/non-replaced-elements/the-hr-element-0/color-ref.html", "==" ] ], @@ -11181,6 +11181,14 @@ "path": "IndexedDB/idbindex_get7.htm", "url": "/IndexedDB/idbindex_get7.htm" }, + { + "path": "IndexedDB/idbindex_getAll.html", + "url": "/IndexedDB/idbindex_getAll.html" + }, + { + "path": "IndexedDB/idbindex_getAllKeys.html", + "url": "/IndexedDB/idbindex_getAllKeys.html" + }, { "path": "IndexedDB/idbindex_getKey.htm", "url": "/IndexedDB/idbindex_getKey.htm" @@ -11445,6 +11453,14 @@ "path": "IndexedDB/idbobjectstore_get7.htm", "url": "/IndexedDB/idbobjectstore_get7.htm" }, + { + "path": "IndexedDB/idbobjectstore_getAll.html", + "url": "/IndexedDB/idbobjectstore_getAll.html" + }, + { + "path": "IndexedDB/idbobjectstore_getAllKeys.html", + "url": "/IndexedDB/idbobjectstore_getAllKeys.html" + }, { "path": "IndexedDB/idbobjectstore_index.htm", "url": "/IndexedDB/idbobjectstore_index.htm" @@ -11537,6 +11553,10 @@ "path": "IndexedDB/idbtransaction_abort.htm", "url": "/IndexedDB/idbtransaction_abort.htm" }, + { + "path": "IndexedDB/idbtransaction_objectStoreNames.html", + "url": "/IndexedDB/idbtransaction_objectStoreNames.html" + }, { "path": "IndexedDB/idbversionchangeevent.htm", "url": "/IndexedDB/idbversionchangeevent.htm" @@ -13869,6 +13889,10 @@ "path": "dom/nodes/Node-contains.html", "url": "/dom/nodes/Node-contains.html" }, + { + "path": "dom/nodes/Node-contains.xml", + "url": "/dom/nodes/Node-contains.xml" + }, { "path": "dom/nodes/Node-insertBefore.html", "url": "/dom/nodes/Node-insertBefore.html" @@ -14005,6 +14029,14 @@ "path": "dom/nodes/getElementsByClassName-09.htm", "url": "/dom/nodes/getElementsByClassName-09.htm" }, + { + "path": "dom/nodes/getElementsByClassName-10.xml", + "url": "/dom/nodes/getElementsByClassName-10.xml" + }, + { + "path": "dom/nodes/getElementsByClassName-11.xml", + "url": "/dom/nodes/getElementsByClassName-11.xml" + }, { "path": "dom/nodes/getElementsByClassName-12.htm", "url": "/dom/nodes/getElementsByClassName-12.htm" @@ -14669,6 +14701,10 @@ "path": "hr-time/basic.html", "url": "/hr-time/basic.html" }, + { + "path": "hr-time/basic.worker.js", + "url": "/hr-time/basic.worker" + }, { "path": "hr-time/idlharness.html", "url": "/hr-time/idlharness.html" @@ -14817,6 +14853,10 @@ "path": "html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_submit.html", "url": "/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_submit.html" }, + { + "path": "html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html", + "url": "/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html" + }, { "path": "html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_data_url.html", "url": "/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_data_url.html" @@ -18509,6 +18549,10 @@ "path": "html/webappapis/animation-frames/callback-invoked.html", "url": "/html/webappapis/animation-frames/callback-invoked.html" }, + { + "path": "html/webappapis/animation-frames/callback-multicalls.html", + "url": "/html/webappapis/animation-frames/callback-multicalls.html" + }, { "path": "html/webappapis/animation-frames/cancel-invoked.html", "url": "/html/webappapis/animation-frames/cancel-invoked.html" @@ -18533,6 +18577,10 @@ "path": "html/webappapis/scripting/events/body-onload.html", "url": "/html/webappapis/scripting/events/body-onload.html" }, + { + "path": "html/webappapis/scripting/events/event-handler-attributes-body-window.html", + "url": "/html/webappapis/scripting/events/event-handler-attributes-body-window.html" + }, { "path": "html/webappapis/scripting/events/event-handler-javascript.html", "url": "/html/webappapis/scripting/events/event-handler-javascript.html" @@ -18541,6 +18589,10 @@ "path": "html/webappapis/scripting/events/event-handler-spec-example.html", "url": "/html/webappapis/scripting/events/event-handler-spec-example.html" }, + { + "path": "html/webappapis/scripting/events/onerroreventhandler.html", + "url": "/html/webappapis/scripting/events/onerroreventhandler.html" + }, { "path": "html/webappapis/scripting/processing-model-2/addEventListener.html", "url": "/html/webappapis/scripting/processing-model-2/addEventListener.html" @@ -18737,6 +18789,14 @@ "path": "infrastructure/failing-test.html", "url": "/infrastructure/failing-test.html" }, + { + "path": "innerText/getter.html", + "url": "/innerText/getter.html" + }, + { + "path": "innerText/setter.html", + "url": "/innerText/setter.html" + }, { "path": "js/behaviours/SetPrototypeOf-window.html", "url": "/js/behaviours/SetPrototypeOf-window.html" @@ -26217,6 +26277,38 @@ "path": "url/url-constructor.html", "url": "/url/url-constructor.html" }, + { + "path": "url/urlsearchparams-append.html", + "url": "/url/urlsearchparams-append.html" + }, + { + "path": "url/urlsearchparams-constructor.html", + "url": "/url/urlsearchparams-constructor.html" + }, + { + "path": "url/urlsearchparams-delete.html", + "url": "/url/urlsearchparams-delete.html" + }, + { + "path": "url/urlsearchparams-get.html", + "url": "/url/urlsearchparams-get.html" + }, + { + "path": "url/urlsearchparams-getall.html", + "url": "/url/urlsearchparams-getall.html" + }, + { + "path": "url/urlsearchparams-has.html", + "url": "/url/urlsearchparams-has.html" + }, + { + "path": "url/urlsearchparams-set.html", + "url": "/url/urlsearchparams-set.html" + }, + { + "path": "url/urlsearchparams-stringifier.html", + "url": "/url/urlsearchparams-stringifier.html" + }, { "path": "user-timing/idlharness.html", "url": "/user-timing/idlharness.html" @@ -26321,6 +26413,10 @@ "path": "web-animations/animation-timeline/idlharness.html", "url": "/web-animations/animation-timeline/idlharness.html" }, + { + "path": "web-animations/keyframe-effect/constructor.html", + "url": "/web-animations/keyframe-effect/constructor.html" + }, { "path": "webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html", "url": "/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html" @@ -26329,6 +26425,10 @@ "path": "webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html", "url": "/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html" }, + { + "path": "webaudio/the-audio-api/the-audionode-interface/audionode-connect-return-value.html", + "url": "/webaudio/the-audio-api/the-audionode-interface/audionode-connect-return-value.html" + }, { "path": "webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime.html", "url": "/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime.html" @@ -29759,6 +29859,15 @@ } ], "wdspec": [ + { + "path": "webdriver/command_contexts/open_and_close_window_test.py" + }, + { + "path": "webdriver/command_contexts/window_handle_test.py" + }, + { + "path": "webdriver/command_contexts/window_size_test.py" + }, { "path": "webdriver/cookie/cookie_test.py" }, @@ -29774,6 +29883,9 @@ { "path": "webdriver/element_state/properties.py" }, + { + "path": "webdriver/element_state/selected_test.py" + }, { "path": "webdriver/element_state/visibility_test.py" }, @@ -29819,6 +29931,12 @@ { "path": "webdriver/user_input/clear_test.py" }, + { + "path": "webdriver/user_input/click_test.py" + }, + { + "path": "webdriver/user_input/sendkeys_test.py" + }, { "path": "webdriver/windows/tabbing.py" }, @@ -29829,40 +29947,7 @@ }, "local_changes": { "deleted": [], - "items": { - "testharness": { - "dom/nodes/Node-contains.xml": [ - { - "path": "dom/nodes/Node-contains.xml", - "url": "/dom/nodes/Node-contains.xml" - } - ], - "dom/nodes/getElementsByClassName-10.xml": [ - { - "path": "dom/nodes/getElementsByClassName-10.xml", - "url": "/dom/nodes/getElementsByClassName-10.xml" - } - ], - "dom/nodes/getElementsByClassName-11.xml": [ - { - "path": "dom/nodes/getElementsByClassName-11.xml", - "url": "/dom/nodes/getElementsByClassName-11.xml" - } - ], - "html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html": [ - { - "path": "html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html", - "url": "/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html" - } - ], - "html/webappapis/scripting/events/onerroreventhandler.html": [ - { - "path": "html/webappapis/scripting/events/onerroreventhandler.html", - "url": "/html/webappapis/scripting/events/onerroreventhandler.html" - } - ] - } - }, + "items": {}, "reftest_nodes": {} }, "reftest_nodes": { @@ -31858,6 +31943,30 @@ "url": "/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html" } ], + "html/rendering/non-replaced-elements/the-hr-element-0/color.html": [ + { + "path": "html/rendering/non-replaced-elements/the-hr-element-0/color.html", + "references": [ + [ + "/html/rendering/non-replaced-elements/the-hr-element-0/color-ref.html", + "==" + ] + ], + "url": "/html/rendering/non-replaced-elements/the-hr-element-0/color.html" + } + ], + "html/rendering/non-replaced-elements/the-hr-element-0/width.html": [ + { + "path": "html/rendering/non-replaced-elements/the-hr-element-0/width.html", + "references": [ + [ + "/html/rendering/non-replaced-elements/the-hr-element-0/width-ref.html", + "==" + ] + ], + "url": "/html/rendering/non-replaced-elements/the-hr-element-0/width.html" + } + ], "html/rendering/non-replaced-elements/the-page/body_text_00ffff.xhtml": [ { "path": "html/rendering/non-replaced-elements/the-page/body_text_00ffff.xhtml", @@ -35399,7 +35508,7 @@ } ] }, - "rev": "7123012427f92f0dc38a120e6e86a75b6c03aab5", + "rev": "5a754b40cd49c0404863c431b58cc311dc5d167c", "url_base": "/", "version": 2 } \ No newline at end of file diff --git a/tests/wpt/metadata/hr-time/basic.worker.js.ini b/tests/wpt/metadata/hr-time/basic.worker.js.ini new file mode 100644 index 00000000000..8d2e2c67e2d --- /dev/null +++ b/tests/wpt/metadata/hr-time/basic.worker.js.ini @@ -0,0 +1,11 @@ +[basic.worker] + type: testharness + [WorkerGlobalScope.performance.now() is a function] + expected: FAIL + + [WorkerGlobalScope.performance.now() returns a positive number] + expected: FAIL + + [WorkerGlobalScope.performance.now() difference is not negative] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html.ini index 32b46eb5e93..546e04621ac 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html.ini @@ -1,6 +1,5 @@ [javascript-url-query-fragment-components.html] type: testharness - expected: OK [iframes with javascript src] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html.ini b/tests/wpt/metadata/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html.ini index a806e94b29b..0ee0497fe2f 100644 --- a/tests/wpt/metadata/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html.ini @@ -18,3 +18,12 @@ [return an HTMLOptionsCollection in correct order for repeated mixed value] expected: FAIL + [if multiple items have a name or *id* value matching the parameter, return the first object and stop] + expected: FAIL + + [if multiple items have a *name* or id value matching the parameter, return the first object and stop] + expected: FAIL + + [if multiple items have a *name* or *id* value matching the parameter, return the first object and stop] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini new file mode 100644 index 00000000000..0869c29c2c8 --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini @@ -0,0 +1,50 @@ +[event-handler-attributes-body-window.html] + type: testharness + [blur] + expected: FAIL + + [error] + expected: FAIL + + [focus] + expected: FAIL + + [resize] + expected: FAIL + + [scroll] + expected: FAIL + + [afterprint] + expected: FAIL + + [beforeprint] + expected: FAIL + + [beforeunload] + expected: FAIL + + [hashchange] + expected: FAIL + + [languagechange] + expected: FAIL + + [message] + expected: FAIL + + [offline] + expected: FAIL + + [online] + expected: FAIL + + [pagehide] + expected: FAIL + + [pageshow] + expected: FAIL + + [popstate] + expected: FAIL + diff --git a/tests/wpt/metadata/mozilla-sync b/tests/wpt/metadata/mozilla-sync index 296a35e4d67..a87d8455c1f 100644 --- a/tests/wpt/metadata/mozilla-sync +++ b/tests/wpt/metadata/mozilla-sync @@ -1 +1 @@ -521a87180a85709f8f704df33537f79bd131bf71 \ No newline at end of file +8950345e0e2c803cfa87105374dfdb30a550cfe0 \ No newline at end of file diff --git a/tests/wpt/metadata/url/urlsearchparams-constructor.html.ini b/tests/wpt/metadata/url/urlsearchparams-constructor.html.ini new file mode 100644 index 00000000000..af33a71e148 --- /dev/null +++ b/tests/wpt/metadata/url/urlsearchparams-constructor.html.ini @@ -0,0 +1,5 @@ +[urlsearchparams-constructor.html] + type: testharness + [URLSearchParams constructor, empty.] + expected: FAIL + diff --git a/tests/wpt/metadata/url/urlsearchparams-getall.html.ini b/tests/wpt/metadata/url/urlsearchparams-getall.html.ini new file mode 100644 index 00000000000..c2205806057 --- /dev/null +++ b/tests/wpt/metadata/url/urlsearchparams-getall.html.ini @@ -0,0 +1,8 @@ +[urlsearchparams-getall.html] + type: testharness + [getAll() basics] + expected: FAIL + + [getAll() multiples] + expected: FAIL + diff --git a/tests/wpt/metadata/webstorage/event_case_sensitive.html.ini b/tests/wpt/metadata/webstorage/event_case_sensitive.html.ini index de86046b9c5..01ae1ddcc65 100644 --- a/tests/wpt/metadata/webstorage/event_case_sensitive.html.ini +++ b/tests/wpt/metadata/webstorage/event_case_sensitive.html.ini @@ -1,9 +1,8 @@ [event_case_sensitive.html] type: testharness - expected: TIMEOUT [sessionStorage storage events fire even when only the case of the value changes.] - expected: TIMEOUT + expected: FAIL [localStorage storage events fire even when only the case of the value changes.] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/web-platform-tests/.gitmodules b/tests/wpt/web-platform-tests/.gitmodules index 787d28dde64..d4eafdcc4d1 100644 --- a/tests/wpt/web-platform-tests/.gitmodules +++ b/tests/wpt/web-platform-tests/.gitmodules @@ -5,3 +5,4 @@ [submodule "tools"] path = tools url = https://github.com/w3c/wpt-tools.git + ignore = dirty \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_getAll.html b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getAll.html new file mode 100644 index 00000000000..507b6c9f860 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getAll.html @@ -0,0 +1,232 @@ + +IndexedDB: Test IDBIndex.getAll. + + + diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_getAllKeys.html b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getAllKeys.html new file mode 100644 index 00000000000..7653a515260 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getAllKeys.html @@ -0,0 +1,207 @@ + +IndexedDB: Test IDBIndex.getAllKeys. + + + diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbobjectstore_getAll.html b/tests/wpt/web-platform-tests/IndexedDB/idbobjectstore_getAll.html new file mode 100644 index 00000000000..f81e4caf3d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbobjectstore_getAll.html @@ -0,0 +1,174 @@ + +IndexedDB: Test IDBObjectStore.getAll. + + + diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html b/tests/wpt/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html new file mode 100644 index 00000000000..f4d317d4328 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html @@ -0,0 +1,167 @@ + +IndexedDB: Test IDBObjectStore.getAllKeys. + + + diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames.html b/tests/wpt/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames.html new file mode 100644 index 00000000000..b964248a692 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbtransaction_objectStoreNames.html @@ -0,0 +1,182 @@ + +IndexedDB: IDBTransaction.objectStoreNames attribute + + + diff --git a/tests/wpt/web-platform-tests/app-uri/appURI_test.html b/tests/wpt/web-platform-tests/app-uri/appURI_test.html index 1baaf06ac6a..8b83969bbc1 100644 --- a/tests/wpt/web-platform-tests/app-uri/appURI_test.html +++ b/tests/wpt/web-platform-tests/app-uri/appURI_test.html @@ -126,13 +126,13 @@ /** - * ContentType reponse + * ContentType response * * rules for dereferencing an app: URI => 8. Let potential-file be the result of attempting locate the file at path */ - TC_name = "Test: [HTTP] 200 reponse status (OK),value of content-type as the [HTTP] "; + TC_name = "Test: [HTTP] 200 response status (OK),value of content-type as the [HTTP] "; TC_name += "Content-Type header, and the contents of potential-file as the response body"; var ContentTypeResponsetests = [ /* scheme:[ TC name, URI, content-type] */ @@ -334,7 +334,7 @@ xhr.send(); }); } - Get_403_reponse(TC_name + " Access to resticted URI - 403 Forbidden error expected", + Get_403_reponse(TC_name + " Access to restricted URI - 403 Forbidden error expected", window.location.protocol + "//f15a6d20-cefa-13e5-1972-800e20d19a76/" + 'resources/ExamPLE/mmY/index.html', ""); diff --git a/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/self-doesnt-match-blob.sub.html b/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/self-doesnt-match-blob.sub.html index 487e8881bdd..5f388622c41 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/self-doesnt-match-blob.sub.html +++ b/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/self-doesnt-match-blob.sub.html @@ -31,6 +31,10 @@ connect-src 'self'; script-src 'self' 'unsafe-inline'; child-src 'self'; worker.onmessage = function(event) { alert_assert(event.data); }; + worker.onerror = function(event) { + alert_assert('TEST COMPLETE'); + event.preventDefault(); + } } catch (e) { alert_assert('TEST COMPLETE'); } diff --git a/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html b/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html index 57fec43b6bb..fac12b52a65 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html +++ b/tests/wpt/web-platform-tests/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html @@ -31,6 +31,10 @@ connect-src 'self'; script-src 'self' 'unsafe-inline'; child-src *; worker.onmessage = function(event) { alert_assert(event.data); }; + worker.onerror = function(event) { + event.preventDefault(); + alert_assert('TEST COMPLETE'); + } } catch (e) { alert_assert('TEST COMPLETE'); } diff --git a/tests/wpt/web-platform-tests/dom/collections/domstringmap-supported-property-names.html b/tests/wpt/web-platform-tests/dom/collections/domstringmap-supported-property-names.html index f84ee27ae29..430aa44c3af 100644 --- a/tests/wpt/web-platform-tests/dom/collections/domstringmap-supported-property-names.html +++ b/tests/wpt/web-platform-tests/dom/collections/domstringmap-supported-property-names.html @@ -40,15 +40,15 @@ test(function() { test(function() { var element = document.querySelector('#user2'); element.dataset.middleName = "mark"; - assert_array_equals(Object.getOwnPropertyNames(element.dataset), - ['uniqueId', 'middleName']); + assert_array_equals(Object.getOwnPropertyNames(element.dataset), + ['uniqueId', 'middleName']); }, "Object.getOwnPropertyNames on DOMStringMap, attribute set on dataset in JS"); test(function() { var element = document.querySelector('#user3'); element.setAttribute("data-age", 30); assert_array_equals(Object.getOwnPropertyNames(element.dataset), - ['uniqueId', 'age']); + ['uniqueId', 'age']); }, "Object.getOwnPropertyNames on DOMStringMap, attribute set on element in JS"); - \ No newline at end of file + diff --git a/tests/wpt/web-platform-tests/dom/nodes/Document-Element-getElementsByTagName.js b/tests/wpt/web-platform-tests/dom/nodes/Document-Element-getElementsByTagName.js index 7402bbe2cd2..cc2b73646ef 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/Document-Element-getElementsByTagName.js +++ b/tests/wpt/web-platform-tests/dom/nodes/Document-Element-getElementsByTagName.js @@ -50,19 +50,44 @@ function test_getElementsByTagName(context, element) { }, "Should be able to set expando shadowing a proto prop (namedItem)") test(function() { - var t = element.appendChild(document.createElement("pre")); - t.id = "x"; - this.add_cleanup(function() {element.removeChild(t)}); + var t1 = element.appendChild(document.createElement("pre")); + t1.id = "x"; + var t2 = element.appendChild(document.createElement("pre")); + t2.setAttribute("name", "y"); + var t3 = element.appendChild(document.createElementNS("", "pre")); + t3.setAttribute("id", "z"); + var t4 = element.appendChild(document.createElementNS("", "pre")); + t4.setAttribute("name", "w"); + this.add_cleanup(function() { + element.removeChild(t1) + element.removeChild(t2) + element.removeChild(t3) + element.removeChild(t4) + }); var list = context.getElementsByTagName('pre'); var pre = list[0]; assert_equals(pre.id, "x"); - assert_equals(list['x'], pre); - assert_true('x' in list, "'x' in list"); - assert_true(list.hasOwnProperty('x'), "list.hasOwnProperty('x')"); + var exposedNames = { 'x': 0, 'y': 1, 'z': 2 }; + for (var exposedName in exposedNames) { + assert_equals(list[exposedName], list[exposedNames[exposedName]]); + assert_equals(list[exposedName], list.namedItem(exposedName)); + assert_true(exposedName in list, "'" + exposedName + "' in list"); + assert_true(list.hasOwnProperty(exposedName), + "list.hasOwnProperty('" + exposedName + "')"); + } - assert_array_equals(Object.getOwnPropertyNames(list).sort(), ["0", "x"]); + var unexposedNames = ["w"]; + for (var unexposedName of unexposedNames) { + assert_false(unexposedName in list); + assert_false(list.hasOwnProperty(unexposedName)); + assert_equals(list[unexposedName], undefined); + assert_equals(list.namedItem(unexposedName), null); + } + + assert_array_equals(Object.getOwnPropertyNames(list).sort(), + ["0", "1", "2", "3", "x", "y", "z"]); var desc = Object.getOwnPropertyDescriptor(list, '0'); assert_equals(typeof desc, "object", "descriptor should be an object"); diff --git a/tests/wpt/web-platform-tests/dom/nodes/Element-children.html b/tests/wpt/web-platform-tests/dom/nodes/Element-children.html index b3ce08ceefe..c0210f9667a 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/Element-children.html +++ b/tests/wpt/web-platform-tests/dom/nodes/Element-children.html @@ -3,14 +3,27 @@
-
+
diff --git a/tests/wpt/web-platform-tests/hr-time/basic.worker.js b/tests/wpt/web-platform-tests/hr-time/basic.worker.js new file mode 100644 index 00000000000..6a9f7a3932a --- /dev/null +++ b/tests/wpt/web-platform-tests/hr-time/basic.worker.js @@ -0,0 +1,18 @@ +importScripts("/resources/testharness.js"); + +test(function() { + assert_true((performance !== undefined), "WorkerGlobalScope.performance exists"); + assert_equals((typeof performance.now), "function"); +}, "WorkerGlobalScope.performance.now() is a function"); + +test(function() { + assert_true(performance.now() > 0); +}, "WorkerGlobalScope.performance.now() returns a positive number"); + +test(function() { + var now1 = performance.now(); + var now2 = performance.now(); + assert_true((now2-now1) >= 0); + }, "WorkerGlobalScope.performance.now() difference is not negative"); + +done(); diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html index 73fcade5b04..d7131b00db9 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html @@ -1,5 +1,5 @@ -Triggering navigation from withing beforeunload event +Triggering navigation from within beforeunload event
diff --git a/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_beforeunload-1.html b/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_beforeunload-1.html index ff577f8de46..6f44d8a83ec 100644 --- a/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_beforeunload-1.html +++ b/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_beforeunload-1.html @@ -1,5 +1,6 @@ diff --git a/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_unload-1.html b/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_unload-1.html index 0c8f2f5749a..9a9e304e843 100644 --- a/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_unload-1.html +++ b/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_unload-1.html @@ -1,5 +1,6 @@ diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html b/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html index 0ee6783b4b4..a9fe824ef3c 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html @@ -38,7 +38,7 @@ function on_load() { if (data.name == "testcase3") { t3.step(function () { assert_equals(data.result, "window.frameElement = null", - "The frameElement attribute shoudl be null."); + "The frameElement attribute should be null."); }); t3.done(); } diff --git a/tests/wpt/web-platform-tests/html/dom/documents/resource-metadata-management/document-lastModified-01.html b/tests/wpt/web-platform-tests/html/dom/documents/resource-metadata-management/document-lastModified-01.html index a3d5990ea49..e67c04fc8dd 100644 --- a/tests/wpt/web-platform-tests/html/dom/documents/resource-metadata-management/document-lastModified-01.html +++ b/tests/wpt/web-platform-tests/html/dom/documents/resource-metadata-management/document-lastModified-01.html @@ -25,14 +25,18 @@ var minutes = d.getMinutes() var seconds = d.getSeconds() - test(function() { - var local_time = hours * 60 * 60 + minutes * 60 + seconds; - var m = pattern.exec(last_modified); - var last_modified_time = parseInt(m[1]) * 60 * 60 + parseInt(m[2]) * 60 + parseInt(m[3]); - assert_approx_equals(last_modified_time, local_time, 2, - "Hours and minutes should match local time."); - }, "Date returned by lastModified is in the user's local time zone."); - + // Checking whether d and and new instance of Date have the same timezone. + // Do not run the time zone test in the case daylight saving occurs. + var d2 = new Date(); + if (d2.getTimezoneOffset() == d.getTimezoneOffset()) { + test(function() { + var local_time = hours * 60 * 60 + minutes * 60 + seconds; + var m = pattern.exec(last_modified); + var last_modified_time = parseInt(m[1]) * 60 * 60 + parseInt(m[2]) * 60 + parseInt(m[3]); + assert_approx_equals(last_modified_time, local_time, 2, + "Hours and minutes should match local time."); + }, "Date returned by lastModified is in the user's local time zone."); + } var t = async_test("Date returned by lastModified is current after timeout."); setTimeout(function() { diff --git a/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html b/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html index 0c5913944c5..1a8c4a2f854 100644 --- a/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html +++ b/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/script-IDL-event-htmlfor.html @@ -16,8 +16,8 @@ test(function() { var script = document.createElement("script"); script.setAttribute("event", "blah"); script.setAttribute("for", "blah"); - assert_equals(script.event, ""); - assert_equals(script.htmlFor, ""); + assert_equals(script.event, "blah"); + assert_equals(script.htmlFor, "blah"); assert_equals(script.getAttribute("event"), "blah"); assert_equals(script.getAttribute("for"), "blah"); }) @@ -27,10 +27,10 @@ test(function() { script.setAttribute("for", "blah"); script.event = "foo"; script.htmlFor = "foo"; - assert_equals(script.event, ""); - assert_equals(script.htmlFor, ""); - assert_equals(script.getAttribute("event"), "blah"); - assert_equals(script.getAttribute("for"), "blah"); + assert_equals(script.event, "foo"); + assert_equals(script.htmlFor, "foo"); + assert_equals(script.getAttribute("event"), "foo"); + assert_equals(script.getAttribute("for"), "foo"); }) test(function() { var script = document.createElement("script"); @@ -38,10 +38,10 @@ test(function() { script.setAttribute("for", "blah"); script.event = null; script.htmlFor = null; - assert_equals(script.event, ""); - assert_equals(script.htmlFor, ""); - assert_equals(script.getAttribute("event"), "blah"); - assert_equals(script.getAttribute("for"), "blah"); + assert_equals(script.event, "null"); + assert_equals(script.htmlFor, "null"); + assert_equals(script.getAttribute("event"), "null"); + assert_equals(script.getAttribute("for"), "null"); }) test(function() { var script = document.createElement("script"); @@ -49,9 +49,9 @@ test(function() { script.setAttribute("for", "blah"); script.event = undefined; script.htmlFor = undefined; - assert_equals(script.event, ""); - assert_equals(script.htmlFor, ""); - assert_equals(script.getAttribute("event"), "blah"); - assert_equals(script.getAttribute("for"), "blah"); + assert_equals(script.event, "undefined"); + assert_equals(script.htmlFor, "undefined"); + assert_equals(script.getAttribute("event"), "undefined"); + assert_equals(script.getAttribute("for"), "undefined"); }) diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/constraints/support/validator.js b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/support/validator.js index cd9d96404f5..e969ce460da 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/constraints/support/validator.js +++ b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/support/validator.js @@ -285,30 +285,10 @@ var validator = { }, set_dirty: function(ctl) { - document.designMode = "on"; ctl.focus(); var old_value = ctl.value; ctl.value = "a"; ctl.value = old_value; - if ( - // See https://html.spec.whatwg.org/multipage/#input-type-attr-summary - // and https://html.spec.whatwg.org/multipage/#textFieldSelection - ( - ctl.tagName === "INPUT" && ( - ctl.type === "text" || - ctl.type === "search" || - ctl.type === "tel" || - ctl.type === "url" || - ctl.type === "password" - ) - ) || - ctl.tagName === "TEXTAREA" - ) { - ctl.value += "1"; - ctl.setSelectionRange(ctl.value.length - 1, ctl.value.length); - document.execCommand("Delete"); - } - document.designMode = "off"; }, pre_check: function(ctl, item) { diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html index 429c642a685..c5c8510a474 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html @@ -5,6 +5,8 @@ HTMLOptionsCollection + +
", "", " contents ignored"); +testText(" + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webdriver/user_input/res/text-form-landing.html b/tests/wpt/web-platform-tests/webdriver/user_input/res/text-form-landing.html new file mode 100644 index 00000000000..345e60e0409 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/user_input/res/text-form-landing.html @@ -0,0 +1,8 @@ + + + + Text Form Landing + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webdriver/user_input/res/text-form.html b/tests/wpt/web-platform-tests/webdriver/user_input/res/text-form.html new file mode 100644 index 00000000000..d99ec899dcd --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/user_input/res/text-form.html @@ -0,0 +1,25 @@ + + + Text Form + + + + +

+
+ + + + +
+ + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webdriver/user_input/sendkeys_test.py b/tests/wpt/web-platform-tests/webdriver/user_input/sendkeys_test.py new file mode 100644 index 00000000000..d2edcbabd9a --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/user_input/sendkeys_test.py @@ -0,0 +1,96 @@ +import os +import sys +import random +import unittest + +sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) +import base_test + +repo_root = os.path.abspath(os.path.join(__file__, "../../..")) +sys.path.insert(1, os.path.join(repo_root, "tools", "webdriver")) +from webdriver import exceptions + + +class SendKeysTest(base_test.WebDriverBaseTest): + def setUp(self): + self.driver.get(self.webserver.where_is("user_input/res/text-form.html")) + + def test_send_simple_string(self): + element = self.driver.find_element_by_id("Text1") + element.send_keys("lorem ipsum") + + self.assertEquals(self.driver.find_element_by_id("text").get_text(), u"lorem ipsum") + + def test_send_return(self): + element = self.driver.find_element_by_id("Text1") + returnkey = unichr(int("E006", 16)) + element.send_keys([returnkey]) + + self.assertEquals(u"" + self.driver.get_current_url(), u"" + self.webserver.where_is("user_input/res/text-form-landing.html?e=mc2")) + + def test_send_backspace(self): + element = self.driver.find_element_by_id("Text1") + element.send_keys("world ") + element.send_keys("wide ") + element.send_keys("web ") + element.send_keys("consortium") + + backspace= unichr(int("E003", 16)) + for i in range(0, 11): + element.send_keys([backspace]) + + self.assertEquals(self.driver.find_element_by_id("text").get_text(), u"world wide web") + + def test_send_tab(self): + element1 = self.driver.find_element_by_id("Text1") + element2 = self.driver.find_element_by_id("Text2") + element1.send_keys("typing here") + + tab= unichr(int("E004", 16)) + element1.send_keys([tab]) + + output = self.driver.find_element_by_id("output") + tab_pressed = output.get_attribute("checked") + self.assertEquals(tab_pressed, u"true") + + def test_send_shift(self): + element = self.driver.find_element_by_id("Text1") + element.send_keys("low ") + + shift= unichr(int("E008", 16)) + element.send_keys([shift , "u", "p", shift]) + + self.assertEquals(self.driver.find_element_by_id("text").get_text(), u"low UP") + + def test_send_arrow_keys(self): + element = self.driver.find_element_by_id("Text1") + + element.send_keys("internet") + + backspace= unichr(int("E003", 16)) + left= unichr(int("E012", 16)) + right= unichr(int("E014", 16)) + for i in range(0, 4): + element.send_keys([left]) + + element.send_keys([backspace]) + element.send_keys([right]) + element.send_keys("a") + + self.assertEquals(self.driver.find_element_by_id("text").get_text(), u"intranet") + + def test_select_text_with_shift(self): + element = self.driver.find_element_by_id("Text1") + + element.send_keys("WebDriver") + backspace= unichr(int("E003", 16)) + shift= unichr(int("E008", 16)) + left= unichr(int("E012", 16)) + + element.send_keys([shift, left, left, left, left, left, left, backspace]) + + self.assertEquals(self.driver.find_element_by_id("text").get_text(), u"Web") + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/wpt/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple.html b/tests/wpt/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple.html index f5b142b93c4..78ed9e4ca2a 100644 --- a/tests/wpt/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple.html +++ b/tests/wpt/web-platform-tests/websockets/interfaces/WebSocket/close/close-multiple.html @@ -14,9 +14,14 @@ async_test(function(t) { ws.close(); ws.close(); ws.close(); - setTimeout(t.step_func(function() { + var f = t.step_func(function() { + if (i < 1) { + setTimeout(f, 500); + return; + } assert_equals(i, 1); t.done() - }), 50); + }); + setTimeout(f, 500); }); diff --git a/tests/wpt/web-platform-tests/webstorage/eventTestHarness.js b/tests/wpt/web-platform-tests/webstorage/eventTestHarness.js index 6d1eee9336c..893d25058a2 100644 --- a/tests/wpt/web-platform-tests/webstorage/eventTestHarness.js +++ b/tests/wpt/web-platform-tests/webstorage/eventTestHarness.js @@ -33,6 +33,20 @@ function countStorageEvents(callback, expectedNumEvents, times) 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"); diff --git a/tests/wpt/web-platform-tests/webstorage/event_basic.js b/tests/wpt/web-platform-tests/webstorage/event_basic.js index 5dfbe032c87..fe8446cec6a 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_basic.js +++ b/tests/wpt/web-platform-tests/webstorage/event_basic.js @@ -4,15 +4,11 @@ testStorages(function(storageString) { var storage = window[storageString]; t.add_cleanup(function() { storage.clear() }); - storageEventList = new Array(); - storage.clear(); + clearStorage(storageString, t.step_func(step1)); assert_equals(storage.length, 0, "storage.length"); - runAfterNStorageEvents(t.step_func(step1), 0); - function step1(msg) { - storageEventList = new Array(); storage.setItem('FOO', 'BAR'); runAfterNStorageEvents(t.step_func(step2), 1); diff --git a/tests/wpt/web-platform-tests/webstorage/event_body_attribute.js b/tests/wpt/web-platform-tests/webstorage/event_body_attribute.js index 8220349f83b..d6256355622 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_body_attribute.js +++ b/tests/wpt/web-platform-tests/webstorage/event_body_attribute.js @@ -4,11 +4,14 @@ testStorages(function(storageString) { var storage = window[storageString]; t.add_cleanup(function() { storage.clear() }); - storage.clear(); + clearStorage(storageString, t.step_func(step0)); assert_equals(storage.length, 0, "storage.length"); - iframe.onload = t.step_func(step1); - iframe.src = "resources/event_body_handler.html"; + function step0(msg) + { + iframe.onload = t.step_func(step1); + iframe.src = "resources/event_body_handler.html"; + } function step1(msg) { diff --git a/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js b/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js index 0b7a9b22a32..2729a3bed3c 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js +++ b/tests/wpt/web-platform-tests/webstorage/event_case_sensitive.js @@ -4,11 +4,14 @@ testStorages(function(storageString) { var storage = window[storageString]; t.add_cleanup(function() { storage.clear() }); - storage.clear(); + clearStorage(storageString, t.step_func(step0)); assert_equals(storage.length, 0, "storage.length"); - storage.foo = "test"; - runAfterNStorageEvents(t.step_func(step1), 1); + function step0(msg) + { + storage.foo = "test"; + runAfterNStorageEvents(t.step_func(step1), 1); + } function step1(msg) { diff --git a/tests/wpt/web-platform-tests/webstorage/event_constructor_eventinit.html b/tests/wpt/web-platform-tests/webstorage/event_constructor_eventinit.html index 31b238acc19..3b4a77cb2cb 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_constructor_eventinit.html +++ b/tests/wpt/web-platform-tests/webstorage/event_constructor_eventinit.html @@ -9,21 +9,18 @@

event_Constructor

diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_key.html b/tests/wpt/web-platform-tests/webstorage/event_local_key.html index b2e89e25ad9..84512da2d2d 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_local_key.html +++ b/tests/wpt/web-platform-tests/webstorage/event_local_key.html @@ -4,40 +4,35 @@ WebStorage Test: localStorage event - key -

event_local_key

diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_newvalue.html b/tests/wpt/web-platform-tests/webstorage/event_local_newvalue.html index 67a6a5d218c..2b743c37bfc 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_local_newvalue.html +++ b/tests/wpt/web-platform-tests/webstorage/event_local_newvalue.html @@ -4,40 +4,35 @@ WebStorage Test: localStorage event - newValue -

event_local_newValue

diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_oldvalue.html b/tests/wpt/web-platform-tests/webstorage/event_local_oldvalue.html index d84d9e0a6e5..87c79aa07d4 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_local_oldvalue.html +++ b/tests/wpt/web-platform-tests/webstorage/event_local_oldvalue.html @@ -4,40 +4,35 @@ WebStorage Test: localStorage event - oldValue -

event_local_oldValue

diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_removeitem.html b/tests/wpt/web-platform-tests/webstorage/event_local_removeitem.html index ba911254d59..7b81ea2bac1 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_local_removeitem.html +++ b/tests/wpt/web-platform-tests/webstorage/event_local_removeitem.html @@ -9,10 +9,11 @@ diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_storagearea.html b/tests/wpt/web-platform-tests/webstorage/event_local_storagearea.html index 33788de88a5..db4b114a951 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_local_storagearea.html +++ b/tests/wpt/web-platform-tests/webstorage/event_local_storagearea.html @@ -4,41 +4,36 @@ WebStorage Test: localStorage event - storageArea -

event_local_storageArea

diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_storageeventinit.html b/tests/wpt/web-platform-tests/webstorage/event_local_storageeventinit.html index 1c0321e58ec..3a7e5d18f47 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_local_storageeventinit.html +++ b/tests/wpt/web-platform-tests/webstorage/event_local_storageeventinit.html @@ -9,20 +9,18 @@

event_local_StorageEventInit

diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_url.html b/tests/wpt/web-platform-tests/webstorage/event_local_url.html index ec2d04d0d99..7345ce3736b 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_local_url.html +++ b/tests/wpt/web-platform-tests/webstorage/event_local_url.html @@ -4,45 +4,40 @@ WebStorage Test: localStorage event - url -

event_local_url

diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_key.html b/tests/wpt/web-platform-tests/webstorage/event_session_key.html index 7e628390ffd..62600aa3942 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_session_key.html +++ b/tests/wpt/web-platform-tests/webstorage/event_session_key.html @@ -4,40 +4,35 @@ WebStorage Test: sessionStorage event - key -

event_session_key

diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_newvalue.html b/tests/wpt/web-platform-tests/webstorage/event_session_newvalue.html index a2824983f1f..1f367988e08 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_session_newvalue.html +++ b/tests/wpt/web-platform-tests/webstorage/event_session_newvalue.html @@ -4,23 +4,20 @@ WebStorage Test: sessionStorage event - newValue -

event_session_newValue

diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_oldvalue.html b/tests/wpt/web-platform-tests/webstorage/event_session_oldvalue.html index cd61b45fdcd..00400df2524 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_session_oldvalue.html +++ b/tests/wpt/web-platform-tests/webstorage/event_session_oldvalue.html @@ -4,40 +4,35 @@ WebStorage Test: sessionStorage event - oldValue -

event_session_oldValue

diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_removeitem.html b/tests/wpt/web-platform-tests/webstorage/event_session_removeitem.html index 268cfeb42a0..7b3c6446ed9 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_session_removeitem.html +++ b/tests/wpt/web-platform-tests/webstorage/event_session_removeitem.html @@ -9,10 +9,11 @@ diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_storagearea.html b/tests/wpt/web-platform-tests/webstorage/event_session_storagearea.html index 023866218c2..d2c2ba437e8 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_session_storagearea.html +++ b/tests/wpt/web-platform-tests/webstorage/event_session_storagearea.html @@ -4,40 +4,36 @@ WebStorage Test: sessionStorage event - storageArea -

event_session_storageArea

diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_storageeventinit.html b/tests/wpt/web-platform-tests/webstorage/event_session_storageeventinit.html index 454a03d3ea1..69539df41a4 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_session_storageeventinit.html +++ b/tests/wpt/web-platform-tests/webstorage/event_session_storageeventinit.html @@ -9,20 +9,17 @@

event_session_StorageEventInit

diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_url.html b/tests/wpt/web-platform-tests/webstorage/event_session_url.html index 9e312a882ee..85250acc2b9 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_session_url.html +++ b/tests/wpt/web-platform-tests/webstorage/event_session_url.html @@ -4,45 +4,40 @@ WebStorage Test: sessionStorage event - url -

event_session_url

diff --git a/tests/wpt/web-platform-tests/webstorage/event_setattribute.js b/tests/wpt/web-platform-tests/webstorage/event_setattribute.js index a143cd6b2ea..9d8e328fcaf 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_setattribute.js +++ b/tests/wpt/web-platform-tests/webstorage/event_setattribute.js @@ -4,16 +4,17 @@ testStorages(function(storageString) { var storage = window[storageString]; t.add_cleanup(function() { storage.clear() }); - storageEventList = new Array(); - storage.clear(); + clearStorage(storageString, t.step_func(step0)); assert_equals(storage.length, 0, "storage.length"); - iframe.onload = t.step_func(step1); - iframe.src = "resources/event_setattribute_handler.html"; + function step0(msg) + { + iframe.onload = t.step_func(step1); + iframe.src = "resources/event_setattribute_handler.html"; + } function step1(msg) { - storageEventList = new Array(); storage.setItem('FOO', 'BAR'); runAfterNStorageEvents(t.step_func(step2), 1); diff --git a/tests/wpt/web-platform-tests/webstorage/resources/local_set_item_remove_iframe.html b/tests/wpt/web-platform-tests/webstorage/resources/local_set_item_remove_iframe.html index 7a4962f8e58..7451594c898 100644 --- a/tests/wpt/web-platform-tests/webstorage/resources/local_set_item_remove_iframe.html +++ b/tests/wpt/web-platform-tests/webstorage/resources/local_set_item_remove_iframe.html @@ -2,7 +2,7 @@
diff --git a/tests/wpt/web-platform-tests/workers/constructors/SharedWorker/same-origin.html b/tests/wpt/web-platform-tests/workers/constructors/SharedWorker/same-origin.html index 196b53bedbe..2e0dd8db33a 100644 --- a/tests/wpt/web-platform-tests/workers/constructors/SharedWorker/same-origin.html +++ b/tests/wpt/web-platform-tests/workers/constructors/SharedWorker/same-origin.html @@ -12,35 +12,54 @@ // not propogate to the window before the tests finish setup({allow_uncaught_exception: true}); +function testSharedWorkerHelper(t, script) { + try { + var worker = new SharedWorker(script, ''); + worker.onerror = t.step_func_done(function(e) { + assert_true(e instanceof ErrorEvent); + }); + } catch (e) { + t.step_func_done(function(e) { assert_true(true); }); + } +} + test(function() { assert_throws("SecurityError", function() { new SharedWorker('unsupported:', ''); }); }, "unsupported_scheme"); + async_test(function() { var worker = new SharedWorker('data:,onconnect = function(e) { e.ports[0].postMessage(1); }', ''); worker.port.onmessage = this.step_func_done(function(e) { assert_equals(e.data, 1); }); }, "data_url"); -test(function() { - assert_throws("SecurityError", function() { new SharedWorker('javascript:""', ''); }); + +async_test(function(t) { + testSharedWorkerHelper(this, 'javascript:""'); }, "javascript_url"); -test(function() { - assert_throws("SecurityError", function() { new SharedWorker('about:blank', ''); }); + +async_test(function(t) { + testSharedWorkerHelper(this, 'about:blank'); }, "about_blank"); -test(function() { - assert_throws("SecurityError", function() { new SharedWorker('http://www.opera.com/', ''); }); + +async_test(function(t) { + testSharedWorkerHelper(this, 'http://www.opera.com/'); }, "opera_com"); -test(function() { - assert_throws("SecurityError", function() { new SharedWorker(location.protocol+'//'+location.hostname+':81/', ''); }); + +async_test(function(t) { + testSharedWorkerHelper(this, location.protocol+'//'+location.hostname+':81/'); }, "port_81"); -test(function() { - assert_throws("SecurityError", function() { new SharedWorker('https://'+location.hostname+':80/', ''); }); + +async_test(function(t) { + testSharedWorkerHelper(this, 'https://'+location.hostname+':80/'); }, "https_port_80"); -test(function() { - assert_throws("SecurityError", function() { new SharedWorker('https://'+location.hostname+':8000/', ''); }); + +async_test(function(t) { + testSharedWorkerHelper(this, 'https://'+location.hostname+':8000/'); }, "https_port_8000"); -test(function() { - assert_throws("SecurityError", function() { new SharedWorker('http://'+location.hostname+':8012/', ''); }); + +async_test(function(t) { + testSharedWorkerHelper(this, 'http://'+location.hostname+':8012/'); }, "http_port_8012");