mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #9038 - servo:update-wpt, r=nox
Update web-platform-tests to revision 887399d3d0a85d0e27a6688ae384459376adf7ca <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9038) <!-- Reviewable:end -->
This commit is contained in:
commit
552df7e79e
44 changed files with 178 additions and 77 deletions
|
@ -13271,10 +13271,6 @@
|
|||
"path": "custom-elements/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html",
|
||||
"url": "/custom-elements/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html"
|
||||
},
|
||||
{
|
||||
"path": "custom-elements/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html",
|
||||
"url": "/custom-elements/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html"
|
||||
},
|
||||
{
|
||||
"path": "custom-elements/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html",
|
||||
"url": "/custom-elements/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html"
|
||||
|
@ -15051,10 +15047,6 @@
|
|||
"path": "html/browsers/browsing-the-web/scroll-to-fragid/006.html",
|
||||
"url": "/html/browsers/browsing-the-web/scroll-to-fragid/006.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/browsing-the-web/scroll-to-fragid/007.html",
|
||||
"url": "/html/browsers/browsing-the-web/scroll-to-fragid/007.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/browsing-the-web/unloading-documents/001.html",
|
||||
"url": "/html/browsers/browsing-the-web/unloading-documents/001.html"
|
||||
|
@ -15495,10 +15487,6 @@
|
|||
"path": "html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_unload.html",
|
||||
"url": "/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_unload.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html",
|
||||
"url": "/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_1.html",
|
||||
"url": "/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/discard_iframe_history_1.html"
|
||||
|
@ -28809,6 +28797,11 @@
|
|||
"timeout": "long",
|
||||
"url": "/custom-elements/concepts/custom-elements-type-allowed-chars.html"
|
||||
},
|
||||
{
|
||||
"path": "custom-elements/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html",
|
||||
"timeout": "long",
|
||||
"url": "/custom-elements/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html"
|
||||
},
|
||||
{
|
||||
"path": "dom/nodes/Document-characterSet-normalization.html",
|
||||
"timeout": "long",
|
||||
|
@ -28949,6 +28942,11 @@
|
|||
"timeout": "long",
|
||||
"url": "/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/browsing-the-web/scroll-to-fragid/007.html",
|
||||
"timeout": "long",
|
||||
"url": "/html/browsers/browsing-the-web/scroll-to-fragid/007.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/history/the-history-interface/007.html",
|
||||
"timeout": "long",
|
||||
|
@ -28959,6 +28957,11 @@
|
|||
"timeout": "long",
|
||||
"url": "/html/browsers/origin/cross-origin-objects/cross-origin-objects.sub.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html",
|
||||
"timeout": "long",
|
||||
"url": "/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html"
|
||||
},
|
||||
{
|
||||
"path": "html/dom/interfaces.html",
|
||||
"timeout": "long",
|
||||
|
@ -35866,7 +35869,7 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"rev": "0bb3d73f26aa5a21326b6c1c7aaf35029222223f",
|
||||
"rev": "887399d3d0a85d0e27a6688ae384459376adf7ca",
|
||||
"url_base": "/",
|
||||
"version": 2
|
||||
}
|
||||
|
|
|
@ -12,3 +12,18 @@
|
|||
[Basic functionality of setAttributeNodeNS]
|
||||
expected: FAIL
|
||||
|
||||
[getAttributeNames tests]
|
||||
expected: FAIL
|
||||
|
||||
[Own property correctness with basic attributes]
|
||||
expected: FAIL
|
||||
|
||||
[Own property correctness with non-namespaced attribute before same-name namespaced one]
|
||||
expected: FAIL
|
||||
|
||||
[Own property correctness with namespaced attribute before same-name non-namespaced one]
|
||||
expected: FAIL
|
||||
|
||||
[Own property correctness with two namespaced attributes with the same name-with-prefix]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
9c4ca39ebe57502b74d75aa9d6953b017d884f54
|
||||
a900196b3f56fac46f86d8a8157a61f14fdca364
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>XMLHttpRequest: worker scripts, origin and referrer</title>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::OL[1]/LI[3] following::OL[1]/LI[3]/ol[1]/li[1] following::OL[1]/LI[3]/ol[1]/li[2] following::OL[1]/LI[3]/ol[1]/li[3]" />
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>XMLHttpRequest: relative URLs in worker scripts resolved by script URL</title>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::OL[1]/LI[3] following::OL[1]/LI[3]/ol[1]/li[1]" />
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-timeout" data-tested-assertations="../.." />
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#abort-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-abort" data-tested-assertations="../.." />
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol/li[9]"/>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-ontimeout" data-tested-assertations="../.."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<title>XHR2 Timeout Property Tests</title>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#the-timeout-attribute" data-tested-assertations="following::ol[1]/li[1]" />
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[10]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<meta charset="utf-8" />
|
||||
<title>XHR2 Timeout Property Tests</title>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#the-timeout-attribute" data-tested-assertations="following::ol[1]/li[2]" />
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-ontimeout" data-tested-assertations="../.."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-timeout" data-tested-assertations="../.." />
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-ontimeout" data-tested-assertations="../.."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".."/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#request-error" data-tested-assertations="following::ol[1]/li[9]"/>
|
||||
<link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd following::dt[1] following::dd[1]" />
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -36,7 +36,7 @@ def main(request, response):
|
|||
|
||||
#Log that the preflight actually happened if we have an ident
|
||||
if 'token' in request.GET:
|
||||
request.server.stash.put(request.GET['token'])
|
||||
request.server.stash.put(request.GET['token'], True)
|
||||
|
||||
if 'location' in request.GET:
|
||||
if code is None:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Attached callback of a custom element should be called </title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
|
||||
<meta name="assert" content="attached callback ... must be enqueued whenever custom element is inserted into a document and this document has a browsing context.">
|
||||
<link rel="help" href="http://www.w3.org/TR/custom-elements/#types-of-callbacks">
|
||||
|
|
|
@ -459,4 +459,104 @@ test(function() {
|
|||
var el2 = document.createElement("div");
|
||||
assert_throws("INUSE_ATTRIBUTE_ERR", function(){el2.setAttributeNode(attrNode)});
|
||||
}, "setAttributeNode on bound attribute should throw InUseAttributeError")
|
||||
|
||||
test(function() {
|
||||
var el = document.createElement("div");
|
||||
el.setAttribute("foo", "bar");
|
||||
assert_equals(el.getAttributeNames().length, 1);
|
||||
assert_equals(el.getAttributeNames()[0], el.attributes[0].name);
|
||||
assert_equals(el.getAttributeNames()[0], "foo");
|
||||
|
||||
el.removeAttribute("foo");
|
||||
assert_equals(el.getAttributeNames().length, 0);
|
||||
|
||||
el.setAttribute("foo", "bar");
|
||||
el.setAttributeNS("", "FOO", "bar");
|
||||
el.setAttributeNS("dummy1", "foo", "bar");
|
||||
el.setAttributeNS("dummy2", "dummy:foo", "bar");
|
||||
assert_equals(el.getAttributeNames().length, 4);
|
||||
assert_equals(el.getAttributeNames()[0], "foo");
|
||||
assert_equals(el.getAttributeNames()[1], "FOO");
|
||||
assert_equals(el.getAttributeNames()[2], "foo");
|
||||
assert_equals(el.getAttributeNames()[3], "dummy:foo");
|
||||
assert_equals(el.getAttributeNames()[0], el.attributes[0].name);
|
||||
assert_equals(el.getAttributeNames()[1], el.attributes[1].name);
|
||||
assert_equals(el.getAttributeNames()[2], el.attributes[2].name);
|
||||
assert_equals(el.getAttributeNames()[3], el.attributes[3].name);
|
||||
|
||||
el.removeAttributeNS("", "FOO");
|
||||
assert_equals(el.getAttributeNames().length, 3);
|
||||
assert_equals(el.getAttributeNames()[0], "foo");
|
||||
assert_equals(el.getAttributeNames()[1], "foo");
|
||||
assert_equals(el.getAttributeNames()[2], "dummy:foo");
|
||||
assert_equals(el.getAttributeNames()[0], el.attributes[0].name);
|
||||
assert_equals(el.getAttributeNames()[1], el.attributes[1].name);
|
||||
assert_equals(el.getAttributeNames()[2], el.attributes[2].name);
|
||||
}, "getAttributeNames tests");
|
||||
|
||||
function getEnumerableOwnProps1(obj) {
|
||||
var arr = [];
|
||||
for (var prop in obj) {
|
||||
if (obj.hasOwnProperty(prop)) {
|
||||
arr.push(prop);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
function getEnumerableOwnProps2(obj) {
|
||||
return Object.getOwnPropertyNames(obj).filter(
|
||||
(name) => Object.getOwnPropertyDescriptor(obj, name).enumerable)
|
||||
}
|
||||
|
||||
test(function() {
|
||||
var el = document.createElement("div");
|
||||
el.setAttribute("a", "");
|
||||
el.setAttribute("b", "");
|
||||
assert_array_equals(getEnumerableOwnProps1(el.attributes),
|
||||
["0", "1"])
|
||||
assert_array_equals(getEnumerableOwnProps2(el.attributes),
|
||||
["0", "1"])
|
||||
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
|
||||
["0", "1", "a", "b"])
|
||||
}, "Own property correctness with basic attributes");
|
||||
|
||||
test(function() {
|
||||
var el = document.createElement("div");
|
||||
el.setAttributeNS("", "a", "");
|
||||
el.setAttribute("b", "");
|
||||
el.setAttributeNS("foo", "a", "");
|
||||
assert_array_equals(getEnumerableOwnProps1(el.attributes),
|
||||
["0", "1", "2"])
|
||||
assert_array_equals(getEnumerableOwnProps2(el.attributes),
|
||||
["0", "1", "2"])
|
||||
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
|
||||
["0", "1", "2", "a", "b"])
|
||||
}, "Own property correctness with non-namespaced attribute before same-name namespaced one");
|
||||
|
||||
test(function() {
|
||||
var el = document.createElement("div");
|
||||
el.setAttributeNS("foo", "a", "");
|
||||
el.setAttribute("b", "");
|
||||
el.setAttributeNS("", "a", "");
|
||||
assert_array_equals(getEnumerableOwnProps1(el.attributes),
|
||||
["0", "1", "2"])
|
||||
assert_array_equals(getEnumerableOwnProps2(el.attributes),
|
||||
["0", "1", "2"])
|
||||
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
|
||||
["0", "1", "2", "a", "b"])
|
||||
}, "Own property correctness with namespaced attribute before same-name non-namespaced one");
|
||||
|
||||
test(function() {
|
||||
var el = document.createElement("div");
|
||||
el.setAttributeNS("foo", "a:b", "");
|
||||
el.setAttributeNS("foo", "c:d", "");
|
||||
el.setAttributeNS("bar", "a:b", "");
|
||||
assert_array_equals(getEnumerableOwnProps1(el.attributes),
|
||||
["0", "1", "2"])
|
||||
assert_array_equals(getEnumerableOwnProps2(el.attributes),
|
||||
["0", "1", "2"])
|
||||
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
|
||||
["0", "1", "2", "a:b", "c:d"])
|
||||
}, "Own property correctness with two namespaced attributes with the same name-with-prefix");
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/hr-time/#sec-extenstions-performance-interface"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(typeof window.performance, "object");
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/hr-time/#sec-monotonic-clock"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
test(function() {
|
||||
assert_true(window.performance.now() > 0, "window.performance.now() returns positive numbers");
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<!doctype html>
|
||||
<!-- this tests the spec as it hopefully will be once bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=17155 is fixed -->
|
||||
<title>Fragment Navigation: hashchange event multiple changes old/newURL</title>
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var t = async_test(undefined, {timeout:30000});
|
||||
var t = async_test();
|
||||
t.step(function() {
|
||||
var original_url = location.href;
|
||||
assert_equals(location.hash, "", "Page must be loaded with no hash");
|
||||
|
@ -19,12 +20,12 @@ t.step(function() {
|
|||
|
||||
addEventListener("hashchange",
|
||||
t.step_func(function(e) {
|
||||
if (count < 1000) {
|
||||
if (count < 100) {
|
||||
location.hash = "test" + count++;
|
||||
hashes.push(location.hash);
|
||||
} else if (count === 1000) {
|
||||
} else if (count === 100) {
|
||||
expected = [];
|
||||
for (var i=0; i<1000; i++) {
|
||||
for (var i=0; i<100; i++) {
|
||||
expected.push("#test" + i);
|
||||
}
|
||||
assert_array_equals(hashes, expected);
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<title>[Browsing Context] : [APIs for creating browsing_contexts by name]</title>
|
||||
<link rel="author" title="Duhyeong Kim" href="mailto:dduskim@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#apis-for-creating-and-navigating-browsing-contexts-by-name">
|
||||
<meta name=timeout content=long>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var currentUrl = 'http://' + window.location.host + '/';
|
||||
var currentUrl = 'http://' + window.location.host + '/common/blank.html';
|
||||
var win = window.open(currentUrl, '', 'height=1,width=1');
|
||||
this.add_cleanup(function() { win.close(); });
|
||||
win.onload = this.step_func_done(function () {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/html5/dom.html#resource-metadata-management"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
setup({ explicit_done: true });
|
||||
var has_loading = (document.readyState == "loading");
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
function onload_test() {
|
||||
var objWindow =
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/webperftestharness.js"></script>
|
||||
<link rel="stylesheet" href="/resources/testharness.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Description</h1>
|
||||
|
|
|
@ -60,7 +60,7 @@ metadata, as described in the [metadata](#metadata) section below.
|
|||
|
||||
Testing asynchronous features is somewhat more complex since the result of
|
||||
a test may depend on one or more events or other callbacks. The API provided
|
||||
for testing these features is indended to be rather low-level but hopefully
|
||||
for testing these features is intended to be rather low-level but hopefully
|
||||
applicable to many situations.
|
||||
|
||||
To create a test, one starts by getting a Test object using async_test:
|
||||
|
@ -225,7 +225,7 @@ wrapping everything in functions for isolation becomes
|
|||
burdensome. For these cases `testharness.js` support "single page
|
||||
tests".
|
||||
|
||||
In order for a test to be interpreted as a single page test, the
|
||||
In order for a test to be interpreted as a single page test, then
|
||||
it must simply not call `test()` or `async_test()` anywhere on the page, and
|
||||
must call the `done()` function to indicate that the test is complete. All
|
||||
the `assert_*` functions are avaliable as normal, but are called without
|
||||
|
@ -243,7 +243,7 @@ the normal step function wrapper. For example:
|
|||
</script>
|
||||
```
|
||||
|
||||
The test title for sinple page tests is always taken from `document.title`.
|
||||
The test title for single page tests is always taken from `document.title`.
|
||||
|
||||
## Making assertions ##
|
||||
|
||||
|
@ -424,8 +424,8 @@ The framework provides callbacks corresponding to 4 events:
|
|||
|
||||
* `start` - triggered when the first Test is created
|
||||
* `test_state` - triggered when a test state changes
|
||||
* `result` - triggered when a test result is recieved
|
||||
* `complete` - triggered when all results are recieved
|
||||
* `result` - triggered when a test result is received
|
||||
* `complete` - triggered when all results are received
|
||||
|
||||
The page defining the tests may add callbacks for these events by calling
|
||||
the following methods:
|
||||
|
|
|
@ -2,17 +2,11 @@ import os
|
|||
import urlparse
|
||||
from abc import ABCMeta, abstractmethod, abstractproperty
|
||||
|
||||
from utils import from_os_path, to_os_path
|
||||
|
||||
item_types = ["testharness", "reftest", "manual", "stub", "wdspec"]
|
||||
|
||||
|
||||
def from_os_path(path):
|
||||
return path.replace(os.path.sep, "/")
|
||||
|
||||
|
||||
def to_os_path(path):
|
||||
return path.replace("/", os.path.sep)
|
||||
|
||||
|
||||
def get_source_file(source_files, tests_root, manifest, path):
|
||||
def make_new():
|
||||
from sourcefile import SourceFile
|
||||
|
|
|
@ -5,6 +5,7 @@ from collections import defaultdict
|
|||
from item import item_types, ManualTest, WebdriverSpecTest, Stub, RefTest, TestharnessTest
|
||||
from log import get_logger
|
||||
from sourcefile import SourceFile
|
||||
from utils import from_os_path, to_os_path
|
||||
|
||||
|
||||
CURRENT_VERSION = 2
|
||||
|
@ -207,7 +208,7 @@ class Manifest(object):
|
|||
for item_type, items in self._data.iteritems()
|
||||
}
|
||||
|
||||
reftest_nodes = {key:[v.to_json() for v in value]
|
||||
reftest_nodes = {from_os_path(key): [v.to_json() for v in value]
|
||||
for key, value in self.reftest_nodes.iteritems()}
|
||||
|
||||
rv = {"url_base": self.url_base,
|
||||
|
@ -246,6 +247,7 @@ class Manifest(object):
|
|||
self._add(manifest_item)
|
||||
|
||||
for path, values in obj["reftest_nodes"].iteritems():
|
||||
path = to_os_path(path)
|
||||
for v in values:
|
||||
item = RefTest.from_json(self, tests_root, v,
|
||||
source_files=source_files)
|
||||
|
@ -306,17 +308,16 @@ class LocalChanges(object):
|
|||
return self._data[item_type]
|
||||
|
||||
def to_json(self):
|
||||
reftest_nodes = {key:[v.to_json() for v in value]
|
||||
reftest_nodes = {from_os_path(key): [v.to_json() for v in value]
|
||||
for key, value in self.reftest_nodes.iteritems()}
|
||||
|
||||
rv = {"items": defaultdict(dict),
|
||||
"reftest_nodes": reftest_nodes,
|
||||
"deleted": []}
|
||||
|
||||
rv["deleted"].extend(self._deleted)
|
||||
"deleted": [from_os_path(path) for path in self._deleted]}
|
||||
|
||||
for test_type, paths in self._data.iteritems():
|
||||
for path, tests in paths.iteritems():
|
||||
path = from_os_path(path)
|
||||
rv["items"][test_type][path] = [test.to_json() for test in tests]
|
||||
|
||||
return rv
|
||||
|
@ -343,6 +344,7 @@ class LocalChanges(object):
|
|||
self.add(manifest_item)
|
||||
|
||||
for path, values in obj["reftest_nodes"].iteritems():
|
||||
path = to_os_path(path)
|
||||
for v in values:
|
||||
item = RefTest.from_json(self.manifest, tests_root, v,
|
||||
source_files=source_files)
|
||||
|
@ -350,7 +352,7 @@ class LocalChanges(object):
|
|||
self.reftest_nodes_by_url[item.url] = item
|
||||
|
||||
for item in obj["deleted"]:
|
||||
self.add_deleted(item)
|
||||
self.add_deleted(to_os_path(item))
|
||||
|
||||
return self
|
||||
|
||||
|
|
|
@ -21,6 +21,12 @@ def is_blacklisted(url):
|
|||
return True
|
||||
return False
|
||||
|
||||
def from_os_path(path):
|
||||
return path.replace(os.path.sep, "/")
|
||||
|
||||
def to_os_path(path):
|
||||
return path.replace("/", os.path.sep)
|
||||
|
||||
class ContextManagerStringIO(StringIO):
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
|
|
@ -137,7 +137,9 @@ class FileHandler(object):
|
|||
if "pipe" in query:
|
||||
pipeline = Pipeline(query["pipe"][-1])
|
||||
elif os.path.splitext(path)[0].endswith(".sub"):
|
||||
pipeline = Pipeline("sub")
|
||||
ml_extensions = {".html", ".htm", ".xht", ".xhtml", ".xml", ".svg"}
|
||||
escape_type = "html" if os.path.splitext(path)[1] in ml_extensions else "none"
|
||||
pipeline = Pipeline("sub(%s)" % escape_type)
|
||||
if pipeline is not None:
|
||||
response = pipeline(request, response)
|
||||
|
||||
|
@ -167,7 +169,7 @@ class FileHandler(object):
|
|||
return []
|
||||
else:
|
||||
if use_sub:
|
||||
data = template(request, data)
|
||||
data = template(request, data, escape_type="none")
|
||||
return [tuple(item.strip() for item in line.split(":", 1))
|
||||
for line in data.splitlines() if line]
|
||||
|
||||
|
|
|
@ -313,10 +313,13 @@ class FirstWrapper(object):
|
|||
return ""
|
||||
|
||||
|
||||
@pipe()
|
||||
def sub(request, response):
|
||||
@pipe(opt(nullable(str)))
|
||||
def sub(request, response, escape_type="html"):
|
||||
"""Substitute environment information about the server and request into the script.
|
||||
|
||||
:param escape_type: String detailing the type of escaping to use. Known values are
|
||||
"html" and "none", with "html" the default for historic reasons.
|
||||
|
||||
The format is a very limited template language. Substitutions are
|
||||
enclosed by {{ and }}. There are several avaliable substitutions:
|
||||
|
||||
|
@ -359,12 +362,12 @@ def sub(request, response):
|
|||
"""
|
||||
content = resolve_content(response)
|
||||
|
||||
new_content = template(request, content)
|
||||
new_content = template(request, content, escape_type=escape_type)
|
||||
|
||||
response.content = new_content
|
||||
return response
|
||||
|
||||
def template(request, content):
|
||||
def template(request, content, escape_type="html"):
|
||||
#TODO: There basically isn't any error handling here
|
||||
tokenizer = ReplacementTokenizer()
|
||||
|
||||
|
@ -419,9 +422,12 @@ def template(request, content):
|
|||
if variable is not None:
|
||||
variables[variable] = value
|
||||
|
||||
escape_func = {"html": lambda x:escape(x, quote=True),
|
||||
"none": lambda x:x}[escape_type]
|
||||
|
||||
#Should possibly support escaping for other contexts e.g. script
|
||||
#TODO: read the encoding of the response
|
||||
return escape(unicode(value), quote=True).encode("utf-8")
|
||||
return escape_func(unicode(value)).encode("utf-8")
|
||||
|
||||
template_regexp = re.compile(r"{{([^}]*)}}")
|
||||
new_content, count = template_regexp.subn(config_replacement, content)
|
||||
|
|
|
@ -119,7 +119,7 @@ class Stash(object):
|
|||
if internal_key in self.data:
|
||||
raise StashError("Tried to overwrite existing shared stash value "
|
||||
"for key %s (old value was %s, new value is %s)" %
|
||||
(internal_key, self[str(internal_key)], value))
|
||||
(internal_key, self.data[str(internal_key)], value))
|
||||
else:
|
||||
self.data[internal_key] = value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue