mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Update web-platform-tests to revision ee40b886c701ffa25a673240cabdedd59ee3ace4
This commit is contained in:
parent
a00f2d6310
commit
3a79c9b53f
44 changed files with 631 additions and 75 deletions
|
@ -393,6 +393,10 @@
|
|||
"path": "html/browsers/the-window-object/the-windowproxy-object/test-window-proxy-toolbar-manual.html",
|
||||
"url": "/html/browsers/the-window-object/the-windowproxy-object/test-window-proxy-toolbar-manual.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/windows/noreferrer-cross-origin-manual.html",
|
||||
"url": "/html/browsers/windows/noreferrer-cross-origin-manual.html"
|
||||
},
|
||||
{
|
||||
"path": "html/editing/dnd/datastore/015-manual.html",
|
||||
"url": "/html/editing/dnd/datastore/015-manual.html"
|
||||
|
@ -13097,6 +13101,14 @@
|
|||
"path": "cors/status.htm",
|
||||
"url": "/cors/status.htm"
|
||||
},
|
||||
{
|
||||
"path": "cssom-view/elementFromPoint.html",
|
||||
"url": "/cssom-view/elementFromPoint.html"
|
||||
},
|
||||
{
|
||||
"path": "cssom-view/elementsFromPoint.html",
|
||||
"url": "/cssom-view/elementsFromPoint.html"
|
||||
},
|
||||
{
|
||||
"path": "custom-elements/concepts/custom-elements-type-naming.html",
|
||||
"url": "/custom-elements/concepts/custom-elements-type-naming.html"
|
||||
|
@ -15317,6 +15329,10 @@
|
|||
"path": "html/browsers/offline/manifest_url_check.html",
|
||||
"url": "/html/browsers/offline/manifest_url_check.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html",
|
||||
"url": "/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-01.html",
|
||||
"url": "/html/browsers/the-window-object/accessing-other-browsing-contexts/indexed-browsing-contexts-01.html"
|
||||
|
@ -15441,6 +15457,18 @@
|
|||
"path": "html/browsers/windows/nested-browsing-contexts/window-top-001.html",
|
||||
"url": "/html/browsers/windows/nested-browsing-contexts/window-top-001.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/windows/noreferrer-window-name.html",
|
||||
"url": "/html/browsers/windows/noreferrer-window-name.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/windows/noreferrer.html",
|
||||
"url": "/html/browsers/windows/noreferrer.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.sub.html",
|
||||
"url": "/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.sub.html"
|
||||
},
|
||||
{
|
||||
"path": "html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html",
|
||||
"url": "/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html"
|
||||
|
@ -17717,6 +17745,10 @@
|
|||
"path": "html/semantics/forms/form-control-infrastructure/form.html",
|
||||
"url": "/html/semantics/forms/form-control-infrastructure/form.html"
|
||||
},
|
||||
{
|
||||
"path": "html/semantics/forms/form-submission-0/url-encoded.html",
|
||||
"url": "/html/semantics/forms/form-submission-0/url-encoded.html"
|
||||
},
|
||||
{
|
||||
"path": "html/semantics/forms/resetting-a-form/reset-form.html",
|
||||
"url": "/html/semantics/forms/resetting-a-form/reset-form.html"
|
||||
|
@ -27601,6 +27633,10 @@
|
|||
"path": "websockets/unload-a-document/003.html",
|
||||
"url": "/websockets/unload-a-document/003.html"
|
||||
},
|
||||
{
|
||||
"path": "webstorage/document-domain.html",
|
||||
"url": "/webstorage/document-domain.html"
|
||||
},
|
||||
{
|
||||
"path": "webstorage/event_constructor.html",
|
||||
"url": "/webstorage/event_constructor.html"
|
||||
|
@ -28757,9 +28793,9 @@
|
|||
"url": "/html/browsers/history/the-history-interface/007.html"
|
||||
},
|
||||
{
|
||||
"path": "html/browsers/origin/cross-origin-objects/cross-origin-objects.html",
|
||||
"path": "html/browsers/origin/cross-origin-objects/cross-origin-objects.sub.html",
|
||||
"timeout": "long",
|
||||
"url": "/html/browsers/origin/cross-origin-objects/cross-origin-objects.html"
|
||||
"url": "/html/browsers/origin/cross-origin-objects/cross-origin-objects.sub.html"
|
||||
},
|
||||
{
|
||||
"path": "html/dom/interfaces.html",
|
||||
|
@ -29951,22 +29987,7 @@
|
|||
},
|
||||
"local_changes": {
|
||||
"deleted": [],
|
||||
"items": {
|
||||
"testharness": {
|
||||
"html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html": [
|
||||
{
|
||||
"path": "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html",
|
||||
"url": "/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html"
|
||||
}
|
||||
],
|
||||
"html/semantics/forms/form-submission-0/url-encoded.html": [
|
||||
{
|
||||
"path": "html/semantics/forms/form-submission-0/url-encoded.html",
|
||||
"url": "/html/semantics/forms/form-submission-0/url-encoded.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"items": {},
|
||||
"reftest_nodes": {}
|
||||
},
|
||||
"reftest_nodes": {
|
||||
|
@ -35527,7 +35548,7 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"rev": "5a754b40cd49c0404863c431b58cc311dc5d167c",
|
||||
"rev": "ee40b886c701ffa25a673240cabdedd59ee3ace4",
|
||||
"url_base": "/",
|
||||
"version": 2
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Document-createElement-namespace.html]
|
||||
disabled: extremely frequent intermittent crash #8614
|
||||
disabled: extremely frequent intermittent crash
|
||||
type: testharness
|
||||
[Created element's namespace in empty.xhtml]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[cross-origin-objects.html]
|
||||
[cross-origin-objects.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
|
@ -2,3 +2,4 @@
|
|||
type: testharness
|
||||
[new document]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[noreferrer-window-name.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[rel=noreferrer and reuse of names]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
[noreferrer.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[rel=noreferrer nullifies window.opener]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
[targeting-cross-origin-nested-browsing-contexts.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Targeting nested browsing contexts]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -150,3 +150,30 @@
|
|||
[impp is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[username is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[new-password is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[current-password is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[address-level4 is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[address-level3 is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[address-level2 is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[address-level1 is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[transaction-currency is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
[transaction-amount is an allowed autocomplete field name]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
8950345e0e2c803cfa87105374dfdb30a550cfe0
|
||||
a00f2d6310f42d641151d8aa46aef53338e568cc
|
5
tests/wpt/metadata/webstorage/document-domain.html.ini
Normal file
5
tests/wpt/metadata/webstorage/document-domain.html.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[document-domain.html]
|
||||
type: testharness
|
||||
[localStorage and document.domain]
|
||||
expected: FAIL
|
||||
|
|
@ -1 +1,3 @@
|
|||
prefs: ["layout.viewport.enabled:true"]
|
||||
prefs: [layout.viewport.enabled:true]
|
||||
[viewport_meta.html]
|
||||
type: reftest
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
prefs: ["layout.viewport.enabled:true"]
|
||||
prefs: [layout.viewport.enabled:true]
|
||||
[viewport_rule.html]
|
||||
type: reftest
|
||||
|
|
|
@ -16,26 +16,35 @@ function run_test() {
|
|||
}, "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")
|
||||
var arrays = {
|
||||
'Int8Array': Int8Array,
|
||||
'Int16Array': Int16Array,
|
||||
'Int32Array': Int32Array,
|
||||
'Uint8Array': Uint8Array,
|
||||
'Uint8ClampedArray': Uint8ClampedArray,
|
||||
'Uint16Array': Uint16Array,
|
||||
'Uint32Array': Uint32Array,
|
||||
};
|
||||
|
||||
test(function() {
|
||||
assert_throws("QuotaExceededError", function() {
|
||||
self.crypto.getRandomValues(new Int8Array(65537))
|
||||
}, "crypto.getRandomValues length over 65536")
|
||||
for (var array in arrays) {
|
||||
assert_equals(self.crypto.getRandomValues(new arrays[array](8)).constructor,
|
||||
arrays[array], "crypto.getRandomValues(new " + array + "(8))")
|
||||
}
|
||||
}, "Integer array")
|
||||
|
||||
test(function() {
|
||||
for (var array in arrays) {
|
||||
var maxlength = 65536 / (arrays[array].BYTES_PER_ELEMENT);
|
||||
assert_throws("QuotaExceededError", function() {
|
||||
self.crypto.getRandomValues(new arrays[array](maxlength + 1))
|
||||
}, "crypto.getRandomValues length over 65536")
|
||||
}
|
||||
}, "Large length")
|
||||
|
||||
test(function() {
|
||||
for (var array in arrays) {
|
||||
assert_true(self.crypto.getRandomValues(new arrays[array](0)).length == 0)
|
||||
}
|
||||
}, "Null arrays")
|
||||
}
|
||||
|
|
157
tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html
Normal file
157
tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html
Normal file
|
@ -0,0 +1,157 @@
|
|||
<!DOCTYPE html>
|
||||
<title>cssom-view - elementFromPoint</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
.size {
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
.overlay {
|
||||
position:absolute;
|
||||
top:109px;
|
||||
pointer-events:none;
|
||||
}
|
||||
.purple {
|
||||
background-color: rebeccapurple;
|
||||
}
|
||||
.yellow {
|
||||
background-color: yellow;
|
||||
}
|
||||
.teal {
|
||||
background-color: teal;
|
||||
}
|
||||
.pink {
|
||||
background-color: pink;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id='purple' class="size purple" > </div>
|
||||
<div id='yellow' class="size yellow"> </div>
|
||||
<div id='teal' class="size overlay teal"> </div>
|
||||
<iframe id=iframe-1 src="iframe.html" style='display:none;position:absolute; left:300px;'></iframe>
|
||||
<iframe id=iframe-2 src="iframe.html" width="" height=""></iframe>
|
||||
<iframe id=iframe-3 width="" height=""></iframe>
|
||||
<svg id=squiggle xmlns="http://www.w3.org/2000/svg" height="98" width="581" viewBox="0 0 581 98">
|
||||
<path stroke-dashoffset="0.00" stroke-dasharray="" d="M62.9 14.9c-25-7.74-56.6 4.8-60.4 24.3-3.73 19.6 21.6 35 39.6 37.6 42.8 6.2 72.9-53.4 116-58.9 65-18.2 191 101 215 28.8 5-16.7-7-49.1-34-44-34 11.5-31 46.5-14 69.3 9.38 12.6 24.2 20.6 39.8 22.9 91.4 9.05 102-98.9 176-86.7 18.8 3.81 33 17.3 36.7 34.6 2.01 10.2.124 21.1-5.18 30.1" stroke="#000" stroke-width="4.3" fill="none">
|
||||
</path>
|
||||
</svg>
|
||||
<svg id=svg-transform width="180" height="200"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<!-- Now we add a text element and apply rotate and translate to both -->
|
||||
<rect x="50" y="50" height="100" width="100" style="stroke:#000; fill: #0086B2" transform="translate(30) rotate(45 50 50)"></rect>
|
||||
<text x="60" y="105" transform="translate(30) rotate(45 50 50)"> Hello WPT! </text>
|
||||
|
||||
</svg>
|
||||
<div id='pink' class='size pink' style='transform: translate(10px)'> </div>
|
||||
<div id='anotherteal' class='size teal' style='pointer-events:none'>Another teal</div>
|
||||
<img id="dinos" src="/images/blue-area.png" usemap="#dinos_map" border="0" width="364" height="126"/>
|
||||
<map id="dinos_map" name="dinos_map">
|
||||
<area id="rectG" shape="rect" coords="0,0,90,100" href="#" alt="area 1"/>
|
||||
<area id="circleO" shape="circle" coords="120,60,30" href="#" alt="area 2"/>
|
||||
<area id="polyLE" shape="poly" coords="280,0,310,0,360,30,360,90,280,90" href="#" alt="area 3"/>
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
window.onload = function () {
|
||||
test(function () {
|
||||
assert_equals(document.elementFromPoint(-1, -1), null,
|
||||
"both co-ordinates passed in are negative so should have returned a null");
|
||||
assert_equals(document.elementFromPoint(-1, -1), null,
|
||||
"x co-ordinates passed in are negative so should have returned a null");
|
||||
assert_equals(document.elementFromPoint(-1, -1), null,
|
||||
"y co-ordinates passed in are negative so should have returned a null");
|
||||
}, "Negative co-ordinates");
|
||||
|
||||
test(function () {
|
||||
var viewportX = window.innerWidth;
|
||||
var viewportY = window.innerHeight;
|
||||
assert_equals(document.elementFromPoint(viewportX + 100, 10), null,
|
||||
"X co-ordinates larger than viewport");
|
||||
assert_equals(document.elementFromPoint(10, viewportY + 100), null,
|
||||
"Y co-ordinates larger than viewport");
|
||||
assert_equals(document.elementFromPoint(viewportX + 100, viewportY + 100), null,
|
||||
"X, Y co-ordinates larger than viewport");
|
||||
}, "co-ordinates larger than the viewport");
|
||||
|
||||
test(function () {
|
||||
var viewportX = window.frames[1].innerWidth;
|
||||
var viewportY = window.frames[1].innerHeight;
|
||||
var iframeRect = document.getElementById('iframe-2').getBoundingClientRect();
|
||||
assert_equals(null, window.frames[1].document.elementFromPoint(iframeRect.right + viewportX + 100, 10),
|
||||
"X co-ordinates larger than viewport");
|
||||
assert_equals(null, window.frames[1].document.elementFromPoint(10, iframeRect.bottom + viewportY + 100),
|
||||
"Y co-ordinates larger than viewport");
|
||||
assert_equals(null, window.frames[1].document.elementFromPoint(iframeRect.right + viewportX + 100,
|
||||
iframeRect.bottom + viewportY + 100),
|
||||
"X, Y co-ordinates larger than viewport");
|
||||
}, "co-ordinates larger than the viewport from in iframe");
|
||||
|
||||
test(function () {
|
||||
assert_equals(document.elementFromPoint(10, 10), document.getElementById('purple'),
|
||||
"Should have returned the element with id `purple`");
|
||||
}, "Return first element that is the target for hit testing");
|
||||
|
||||
test(function () {
|
||||
assert_equals(document.elementFromPoint(10, 120), document.getElementById('yellow'),
|
||||
"Should have returned the element with id `yellow` as element with `teal` has `pointer-events:none`");
|
||||
}, "First element to get mouse events with pointer-events css");
|
||||
|
||||
test(function () {
|
||||
var svg = document.getElementById('squiggle');
|
||||
var svgRect = svg.getBoundingClientRect();
|
||||
assert_equals(document.elementFromPoint(svgRect.left + Math.round(svgRect.width/2),
|
||||
svgRect.top + Math.round(svgRect.height/2)),
|
||||
svg,
|
||||
"Should have returned the line SVG");
|
||||
}, "SVG element at x,y");
|
||||
|
||||
test(function () {
|
||||
var svg = document.getElementById('svg-transform');
|
||||
var svgRect = svg.getBoundingClientRect();
|
||||
assert_equals(document.elementFromPoint(svgRect.left + Math.round(svgRect.width/2),
|
||||
svgRect.top + Math.round(svgRect.height/2)),
|
||||
svg.querySelector("rect"),
|
||||
"Should have returned SVG with Hello WPT! that has a transform");
|
||||
|
||||
var pink = document.getElementById('pink');
|
||||
var pinkRect = pink.getBoundingClientRect();
|
||||
assert_equals(document.elementFromPoint(pinkRect.left + Math.round(pinkRect.width/2),
|
||||
pinkRect.top + Math.round(pinkRect.height/2)),
|
||||
pink,
|
||||
"Should have returned pink element that has a transform");
|
||||
|
||||
}, "transformed element at x,y");
|
||||
|
||||
test(function () {
|
||||
var anotherteal = document.getElementById('anotherteal');
|
||||
var anothertealRect = anotherteal.getBoundingClientRect();
|
||||
assert_equals(document.elementFromPoint(anothertealRect.left + Math.round(anothertealRect.width/2),
|
||||
anothertealRect.top + Math.round(anothertealRect.height/2)),
|
||||
document.body,
|
||||
"Should have returned the root");
|
||||
|
||||
var doc = frames[2].document;
|
||||
doc.removeChild(doc.documentElement);
|
||||
assert_equals(doc.elementFromPoint(0, 0), null,
|
||||
"Should have returned null as no root element");
|
||||
}, "no hit target at x,y");
|
||||
|
||||
test(function () {
|
||||
var doc = document.implementation.createHTMLDocument('foo');
|
||||
assert_equals(doc.elementFromPoint(0, 0), null,
|
||||
"Should have returned the documentElement for the document")
|
||||
}, "No viewport available");
|
||||
|
||||
test(function () {
|
||||
var area = document.getElementById('rectG');
|
||||
var areaRect = area.getBoundingClientRect();
|
||||
assert_equals(document.elementFromPoint(areaRect.left + Math.round(areaRect.width/2),
|
||||
areaRect.top + Math.round(areaRect.height/2)),
|
||||
area,
|
||||
"Should have returned the image element");
|
||||
}, "Image Maps");
|
||||
done();
|
||||
}
|
||||
</script>
|
150
tests/wpt/web-platform-tests/cssom-view/elementsFromPoint.html
Normal file
150
tests/wpt/web-platform-tests/cssom-view/elementsFromPoint.html
Normal file
|
@ -0,0 +1,150 @@
|
|||
<!DOCTYPE html>
|
||||
<title>cssom-view - elementsFromPoint</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
.size {
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
.overlay {
|
||||
position:absolute;
|
||||
top:109px;
|
||||
pointer-events:none;
|
||||
}
|
||||
.purple {
|
||||
background-color: rebeccapurple;
|
||||
}
|
||||
.yellow {
|
||||
background-color: yellow;
|
||||
}
|
||||
.teal {
|
||||
background-color: teal;
|
||||
}
|
||||
.pink {
|
||||
background-color: pink;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id='purple' class="size purple" > </div>
|
||||
<div id='yellow' class="size yellow"> </div>
|
||||
<div id='teal' class="size overlay teal"> </div>
|
||||
<iframe id=iframe-1 src="iframe.html" style='display:none;position:absolute; left:300px;'></iframe>
|
||||
<iframe id=iframe-2 src="iframe.html" width="" height=""></iframe>
|
||||
<iframe id=iframe-3 width="" height=""></iframe>
|
||||
<svg id=squiggle xmlns="http://www.w3.org/2000/svg" height="98" width="581" viewBox="0 0 581 98">
|
||||
<path stroke-dashoffset="0.00" stroke-dasharray="" d="M62.9 14.9c-25-7.74-56.6 4.8-60.4 24.3-3.73 19.6 21.6 35 39.6 37.6 42.8 6.2 72.9-53.4 116-58.9 65-18.2 191 101 215 28.8 5-16.7-7-49.1-34-44-34 11.5-31 46.5-14 69.3 9.38 12.6 24.2 20.6 39.8 22.9 91.4 9.05 102-98.9 176-86.7 18.8 3.81 33 17.3 36.7 34.6 2.01 10.2.124 21.1-5.18 30.1" stroke="#000" stroke-width="4.3" fill="none">
|
||||
</path>
|
||||
</svg>
|
||||
<svg id=svg-transform width="180" height="200"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<!-- Now we add a text element and apply rotate and translate to both -->
|
||||
<rect x="50" y="50" height="100" width="100" style="stroke:#000; fill: #0086B2" transform="translate(30) rotate(45 50 50)"></rect>
|
||||
<text x="60" y="105" transform="translate(30) rotate(45 50 50)"> Hello WPT! </text>
|
||||
|
||||
</svg>
|
||||
<div id='pink' class='size pink' style='transform: translate(10px)'> </div>
|
||||
<div id='anotherteal' class='size teal' style='pointer-events:none'>Another teal</div>
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
window.onload = function () {
|
||||
test(function () {
|
||||
assert_array_equals(document.elementsFromPoint(-1, -1), [],
|
||||
"both co-ordinates passed in are negative so should have returned a []");
|
||||
assert_array_equals(document.elementsFromPoint(-1, -1), [],
|
||||
"x co-ordinates passed in are negative so should have returned a []");
|
||||
assert_array_equals(document.elementsFromPoint(-1, -1), [],
|
||||
"y co-ordinates passed in are negative so should have returned a []");
|
||||
}, "Negative co-ordinates");
|
||||
|
||||
test(function () {
|
||||
var viewportX = window.innerWidth;
|
||||
var viewportY = window.innerHeight;
|
||||
assert_array_equals(document.elementsFromPoint(viewportX + 100, 10), [],
|
||||
"X co-ordinates larger than viewport so should have returned a []");
|
||||
assert_array_equals(document.elementsFromPoint(10, viewportY + 100), [],
|
||||
"Y co-ordinates larger than viewport so should have returned a []");
|
||||
assert_array_equals(document.elementsFromPoint(viewportX + 100, viewportY + 100), [],
|
||||
"X, Y co-ordinates larger than viewport so should have returned a []");
|
||||
}, "co-ordinates larger than the viewport");
|
||||
|
||||
test(function () {
|
||||
var viewportX = window.frames[1].innerWidth;
|
||||
var viewportY = window.frames[1].innerHeight;
|
||||
var iframeRect = document.getElementById('iframe-2').getBoundingClientRect();
|
||||
assert_array_equals([], window.frames[1].document.elementsFromPoint(iframeRect.right + viewportX + 100, 10),
|
||||
"X co-ordinates larger than viewport so should have returned a []");
|
||||
assert_array_equals([], window.frames[1].document.elementsFromPoint(10, iframeRect.bottom + viewportY + 100),
|
||||
"Y co-ordinates larger than viewport so should have returned a []");
|
||||
assert_array_equals([], window.frames[1].document.elementsFromPoint(iframeRect.right + viewportX + 100,
|
||||
iframeRect.bottom + viewportY + 100),
|
||||
"X, Y co-ordinates larger than viewport so should have returned a []");
|
||||
}, "co-ordinates larger than the viewport from in iframe");
|
||||
|
||||
test(function () {
|
||||
assert_array_equals(document.elementsFromPoint(10, 10),
|
||||
[document.getElementById('purple'), document.body, document.querySelector('html')],
|
||||
"Should have returned a sequence with `[purple element, document.body, html]`");
|
||||
}, "Return first element that is the target for hit testing");
|
||||
|
||||
test(function () {
|
||||
assert_array_equals(document.elementsFromPoint(10, 120),
|
||||
[document.getElementById('yellow'), document.body, document.querySelector('html')],
|
||||
"Should have returned a sequence with `[yellow element, document.body, html]`");
|
||||
}, "First element to get mouse events with pointer-events css");
|
||||
|
||||
test(function () {
|
||||
var svg = document.getElementById('squiggle');
|
||||
var svgRect = svg.getBoundingClientRect();
|
||||
assert_array_equals(document.elementsFromPoint(svgRect.left + Math.round(svgRect.width/2),
|
||||
svgRect.top + Math.round(svgRect.height/2)),
|
||||
[svg, document.body, document.querySelector('html')],
|
||||
"Should have returned a sequence with [svg, body, html]");
|
||||
}, "SVG element at x,y");
|
||||
|
||||
test(function () {
|
||||
var svg = document.getElementById('svg-transform');
|
||||
var svgRect = svg.getBoundingClientRect();
|
||||
assert_array_equals(document.elementsFromPoint(svgRect.left + Math.round(svgRect.width/2),
|
||||
svgRect.top + Math.round(svgRect.height/2)),
|
||||
[svg.querySelector("rect"), svg, document.body, document.querySelector('html')],
|
||||
"Should have returned [svg rect, svg, body, html]");
|
||||
|
||||
var pink = document.getElementById('pink');
|
||||
var pinkRect = pink.getBoundingClientRect();
|
||||
assert_array_equals(document.elementsFromPoint(pinkRect.left + Math.round(pinkRect.width/2),
|
||||
pinkRect.top + Math.round(pinkRect.height/2)),
|
||||
[pink, document.body, document.querySelector('html')],
|
||||
"Should have returned a sequence with [pink, body, html]");
|
||||
|
||||
}, "transformed element at x,y");
|
||||
|
||||
test(function () {
|
||||
var anotherteal = document.getElementById('anotherteal');
|
||||
var anothertealRect = anotherteal.getBoundingClientRect();
|
||||
assert_array_equals(document.elementsFromPoint(anothertealRect.left + Math.round(anothertealRect.width/2),
|
||||
anothertealRect.top + Math.round(anothertealRect.height/2)),
|
||||
[document.body, document.querySelector('html')],
|
||||
"Should have returned the sequence [body, html]");
|
||||
|
||||
var doc = frames[1].document;
|
||||
assert_array_equals([doc.querySelector('html')], doc.elementsFromPoint(0, 100),
|
||||
"Should have returned the sequence [html]")
|
||||
|
||||
var doc = frames[2].document;
|
||||
doc.removeChild(doc.documentElement);
|
||||
assert_array_equals(doc.elementsFromPoint(0, 0), [],
|
||||
"Should have returned [] as no root element");
|
||||
|
||||
}, "no hit target at x,y");
|
||||
|
||||
test(function () {
|
||||
var doc = document.implementation.createHTMLDocument('foo');
|
||||
assert_array_equals(doc.elementsFromPoint(0, 0), [],
|
||||
"Should have returned []")
|
||||
}, "No viewport available");
|
||||
done();
|
||||
}
|
||||
</script>
|
4
tests/wpt/web-platform-tests/cssom-view/iframe.html
Normal file
4
tests/wpt/web-platform-tests/cssom-view/iframe.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
html, body { padding:9px; border:1px solid }
|
||||
</style>
|
|
@ -15,7 +15,6 @@
|
|||
//
|
||||
// TODO:
|
||||
//
|
||||
// * replaceWholeText() tests
|
||||
// * Lots and lots and lots more different types of ranges
|
||||
// * insertBefore() with DocumentFragments
|
||||
// * Fill out other insert/remove tests
|
||||
|
|
|
@ -22,7 +22,7 @@ path = location.pathname.substring(0, location.pathname.lastIndexOf('/')) + '/fr
|
|||
var B = document.getElementById('B').contentWindow;
|
||||
var C = document.getElementById('C').contentWindow;
|
||||
B.frameElement.uriToLoad = path;
|
||||
C.frameElement.uriToLoad = 'http://www1.web-platform.test:' + location.port + path;
|
||||
C.frameElement.uriToLoad = '//{{domains[www1]}}:' + location.port + path;
|
||||
|
||||
function reloadSubframes(cb) {
|
||||
var iframes = document.getElementsByTagName('iframe');
|
||||
|
@ -51,7 +51,7 @@ function addTest(fun, desc) { testList.push([fun, desc]); }
|
|||
*/
|
||||
|
||||
addTest(function() {
|
||||
assert_equals(location.host, 'web-platform.test:8000', 'Need to run the top-level test from web-platform.test:8000');
|
||||
assert_equals(location.host, '{{domains[]}}:{{location[port]}}', 'Need to run the top-level test from {{domains[]}}:{{location[port]}}');
|
||||
assert_equals(B.parent, window, "window.parent works same-origin");
|
||||
assert_equals(C.parent, window, "window.parent works cross-origin");
|
||||
assert_equals(B.location.pathname, path, "location.href works same-origin");
|
||||
|
@ -317,7 +317,7 @@ function doDocumentDomainTest(cb) {
|
|||
win.close();
|
||||
cb();
|
||||
});
|
||||
var win = window.open('win-documentdomain.html');
|
||||
var win = window.open('win-documentdomain.sub.html');
|
||||
}
|
||||
|
||||
// We do a fresh load of the subframes for each test to minimize side-effects.
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
var path = location.pathname.substring(0, location.pathname.lastIndexOf('/')) + '/frame.html';
|
||||
A.location = 'frame.html';
|
||||
B.location = frameURI = 'http://www2.web-platform.test:' + location.port + path;
|
||||
C.location = frameURI = 'http://www2.web-platform.test:' + location.port + path;
|
||||
D.location = frameURI = 'http://www1.web-platform.test:' + location.port + path;
|
||||
B.location = '//{{domains[www2]}}:' + location.port + path;
|
||||
C.location = '//{{domains[www2]}}:' + location.port + path;
|
||||
D.location = '//{{domains[www1]}}:' + location.port + path;
|
||||
|
||||
var loadCount = 0;
|
||||
function frameLoaded() {
|
|
@ -0,0 +1,3 @@
|
|||
<meta charset=utf-8>
|
||||
<p>Follow this link to open a new browsing context and then confirm it can be closed:
|
||||
<a rel=noreferrer target=reallydoesnotmatter href="//天気の良い日.{{location[host]}}/html/browsers/windows/support-close.html">link</a>.
|
|
@ -0,0 +1,10 @@
|
|||
<ol>
|
||||
<li><p>After clicking these two links in order a single browsing context should be open showing
|
||||
<code>example.org</code>:
|
||||
<a target=doesnotmatter href="http://example.com/">one</a>,
|
||||
<a target=doesnotmatter href="http://example.org/">two</a>.
|
||||
|
||||
<li><p>After clicking these two links two browsing contexts should have been opened:
|
||||
<a rel=noreferrer target=reallydoesnotmatter href="http://example.com/">one</a>,
|
||||
<a rel=noreferrer target=reallydoesnotmatter href="http://example.com/">two</a>.
|
||||
</ol>
|
|
@ -0,0 +1,3 @@
|
|||
<meta charset=utf-8>
|
||||
<p>Follow this link to open a new browsing context and then confirm it says "idonteven":
|
||||
<a rel=noreferrer target=idonteven href="//天気の良い日.{{location[host]}}/html/browsers/windows/support-window-name-echo.html">link</a>.
|
|
@ -0,0 +1,40 @@
|
|||
<!doctype html>
|
||||
<title>rel=noreferrer and reuse of names</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
localStorage.clear()
|
||||
|
||||
function makeHyperlink(n) {
|
||||
var hyperlink = document.body.appendChild(document.createElement("a"))
|
||||
hyperlink.rel = "noreferrer"
|
||||
hyperlink.target = "sufficientlyrandomwindownameamiright"
|
||||
hyperlink.href = "support-named-null-opener.html#" + n
|
||||
return hyperlink
|
||||
}
|
||||
|
||||
var hyperlink1 = makeHyperlink(1),
|
||||
hyperlink2 = makeHyperlink(2)
|
||||
|
||||
t.add_cleanup(function() {
|
||||
localStorage.setItem("x", "close")
|
||||
localStorage.clear()
|
||||
document.body.removeChild(hyperlink1)
|
||||
document.body.removeChild(hyperlink2)
|
||||
})
|
||||
|
||||
addEventListener("storage", function(e) {
|
||||
t.step(function() {
|
||||
if(localStorage.getItem("window1") && localStorage.getItem("window2")) {
|
||||
localStorage.setItem("x", "close")
|
||||
t.done()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
hyperlink1.click()
|
||||
hyperlink2.click()
|
||||
})
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype html>
|
||||
<title>rel=noreferrer nullifies window.opener</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
localStorage.clear()
|
||||
|
||||
var hyperlink = document.body.appendChild(document.createElement("a"))
|
||||
hyperlink.rel = "noreferrer"
|
||||
hyperlink.target = "_blank"
|
||||
hyperlink.href = "support-opener-null.html"
|
||||
hyperlink.click()
|
||||
document.body.removeChild(hyperlink)
|
||||
|
||||
addEventListener("storage", function(e) {
|
||||
t.step(function() {
|
||||
assert_equals(e.newValue, "null")
|
||||
localStorage.clear()
|
||||
t.done()
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
<p>Clicking this button should close this browsing context: <button onclick=window.close()>button</button>
|
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
addEventListener("storage", function(e) {
|
||||
if(e.newValue === "close") {
|
||||
close()
|
||||
}
|
||||
})
|
||||
localStorage.setItem("window" + location.hash.slice(1), "tralala")
|
||||
</script>
|
|
@ -0,0 +1,12 @@
|
|||
<body>
|
||||
<script>
|
||||
var i = document.createElement("iframe");
|
||||
i.name = "nested1";
|
||||
document.body.appendChild(i);
|
||||
|
||||
window.opener.postMessage({
|
||||
"name": window.name,
|
||||
"isTop": window.top === window
|
||||
}, "*");
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,4 @@
|
|||
<script>
|
||||
localStorage.setItem("opener", window.opener)
|
||||
window.close()
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
<script>
|
||||
if (window.opener) {
|
||||
window.opener.postMessage({
|
||||
"name": window.name,
|
||||
"isTop": window.top === window
|
||||
}, "*");
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1 @@
|
|||
<script>document.write(name)</script>
|
|
@ -0,0 +1,38 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Targeting nested browsing contexts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
async_test(function (t) {
|
||||
var windowsToClose = [];
|
||||
window.onmessage = t.step_func(function (e) {
|
||||
if (e.data.name == "openee") {
|
||||
var a = document.body.appendChild(document.createElement('a'));
|
||||
a.target = "nested1";
|
||||
a.href = "support-post-to-opener.html";
|
||||
a.click();
|
||||
windowsToClose.push(e.source);
|
||||
} else {
|
||||
assert_equals(e.data.name, "nested1");
|
||||
assert_equals(e.data.isTop, true);
|
||||
windowsToClose.push(e.source);
|
||||
windowsToClose.forEach(function (w) {
|
||||
w.close();
|
||||
});
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
|
||||
var a = document.body.appendChild(document.createElement('a'));
|
||||
a.target = "openee";
|
||||
a.href = "http://{{domains[www2]}}:{{location[port]}}/html/browsers/windows/support-nested-browsing-contexts.html";
|
||||
a.click();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,4 @@
|
|||
<!DOCTYPE html><html><head><title>javascript: URL creating a document in an about:blank iframe</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-iframe-element">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/embedded-content.html#process-the-iframe-attributes">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-iframe-element">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#process-the-iframe-attributes">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>DOM Image constructor Test</title>
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element" />
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element" />
|
||||
<meta name="assert" content="Tests the Image constructor for the img-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
autocompletetest(document.forms.autocomplete_off, ["off", "off", "on", "off", ""], "form autocomplete attribute off");
|
||||
autocompletetest(document.forms.autocomplete_invalid, ["on", "on", "on", "off", ""], "form autocomplete attribute invalid");
|
||||
|
||||
var keywords = [ "name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname", "organization-title", "organization", "street-address", "address-line1", "address-line2", "address-line3", "locality", "region", "country", "country-name", "postal-code", "cc-name", "cc-given-name", "cc-additional-name", "cc-family-name", "cc-number", "cc-exp", "cc-exp-month", "cc-exp-year", "cc-csc", "cc-type", "language", "bday", "bday-day", "bday-month", "bday-year", "sex", "url", "photo", "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-local-prefix", "tel-local-suffix", "tel-extension", "email", "impp" ];
|
||||
var keywords = [ "name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname", "username", "new-password", "current-password", "organization-title", "organization", "street-address", "address-line1", "address-line2", "address-line3", "address-level4", "address-level3", "address-level2", "address-level1", "country", "country-name", "postal-code", "cc-name", "cc-given-name", "cc-additional-name", "cc-family-name", "cc-number", "cc-exp", "cc-exp-month", "cc-exp-year", "cc-csc", "cc-type", "transaction-currency", "transaction-amount", "language", "bday", "bday-day", "bday-month", "bday-year", "sex", "url", "photo", "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-local-prefix", "tel-local-suffix", "tel-extension", "email", "impp" ];
|
||||
|
||||
keywords.forEach(function(keyword) {
|
||||
test(function(){
|
||||
var input = document.createElement("input");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<meta charset=utf-8>
|
||||
<title>HTMLOptionElement.selected</title>
|
||||
<link rel=author title="Corey Farwell" href="mailto:coreyf@rwell.org">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/forms.html#dom-option-selected">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/#dom-option-selected">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>HTML Templates: Template element as a descendant of the frameset element.</title>
|
||||
<meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru">
|
||||
<meta name="assert" content="Template element can not be a descendant of the frameset element">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inframeset">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing-main-inframeset">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src='/html/resources/common.js'></script>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AnimationTiming Test: multiple calls to requestAnimationFrame with the same callback</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#dom-window-requestanimationframe">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-requestanimationframe">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Task and Microtask Ordering </title>
|
||||
<link rel=author title="Joshua Bell" href="mailto:jsbell@google.com">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loops">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/#event-loops">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/common.js"></script>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Task and Microtask Ordering </title>
|
||||
<link rel=author title="Joshua Bell" href="mailto:jsbell@google.com">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loops">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/#event-loops">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/common.js"></script>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<meta charset="utf-8">
|
||||
<title>NavigatorLanguage: navigator.language returns the user's preferred language</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#navigatorlanguage">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#navigatorlanguage">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<h2>Precondition</h2>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<meta charset="utf-8">
|
||||
<title>NavigatorLanguage: the most preferred language is the one returned by navigator.language</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#navigatorlanguage">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#navigatorlanguage">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
Extending the W3C testharness.js with locally useful functionality.
|
||||
*/
|
||||
|
||||
function assert_type_error(f, msg) {
|
||||
assert_throws(TypeError(), f, msg);
|
||||
}
|
||||
|
||||
function assert_syntax_error(f, msg) {
|
||||
assert_throws(SyntaxError(), f, msg);
|
||||
}
|
|
@ -5,7 +5,6 @@
|
|||
<link rel="help" href="http://url.spec.whatwg.org/#urlsearchparams">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/testharness-extras.js"></script>
|
||||
<script>
|
||||
test(function() {
|
||||
var params = new URLSearchParams();
|
||||
|
@ -19,8 +18,9 @@ test(function() {
|
|||
}, 'Basic URLSearchParams construction');
|
||||
|
||||
test(function() {
|
||||
assert_type_error(function () { URLSearchParams(); }, 'Failed to construct \'URLSearchParams\': Please use the \'new\' operator, this DOM object constructor cannot be called as a function.');
|
||||
assert_type_error(function () { new URLSearchParams(DOMException.prototype); });
|
||||
assert_throws(new TypeError(), function () { URLSearchParams(); },
|
||||
'Calling \'URLSearchParams\' without \'new\' should throw.');
|
||||
assert_throws(new TypeError(), function () { new URLSearchParams(DOMException.prototype); });
|
||||
var params = new URLSearchParams('');
|
||||
assert_true(params != null, 'constructor returned non-null value.');
|
||||
assert_equals(params.__proto__, URLSearchParams.prototype, 'expected URLSearchParams.prototype as prototype.');
|
||||
|
|
20
tests/wpt/web-platform-tests/webstorage/document-domain.html
Normal file
20
tests/wpt/web-platform-tests/webstorage/document-domain.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<title>localStorage and document.domain</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<iframe></iframe>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
frames[0].addEventListener("storage", function(e) {
|
||||
t.step(function() {
|
||||
localStorage.clear()
|
||||
t.done()
|
||||
})
|
||||
})
|
||||
frames[0].document.domain = document.domain
|
||||
localStorage.setItem("test", "test")
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue