mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
parent
b2a5225831
commit
1a81b18b9f
12321 changed files with 544385 additions and 6 deletions
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>WebSockets: getting url</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../../../constants.js?pipe=sub></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals((new WebSocket(SCHEME_DOMAIN_PORT)).url, SCHEME_DOMAIN_PORT+'/');
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<title>WebSockets: setting url</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../../../constants.js?pipe=sub></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
|
||||
ws.url = SCHEME_DOMAIN_PORT+'/test';
|
||||
assert_equals(ws.url, SCHEME_DOMAIN_PORT+'/');
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<title>WebSockets: deleting url</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../../../constants.js?pipe=sub></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
|
||||
delete ws.url;
|
||||
assert_equals(ws.url, SCHEME_DOMAIN_PORT+'/');
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<title>WebSockets: 'URL'</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../../../constants.js?pipe=sub></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
|
||||
assert_equals(ws.URL, undefined);
|
||||
assert_equals('URL' in ws, false);
|
||||
assert_equals(WebSocket.prototype.URL, undefined);
|
||||
assert_equals('URL' in WebSocket.prototype, false);
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<title>WebSockets: defineProperty getter for url</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../../../constants.js?pipe=sub></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
Object.defineProperty(WebSocket.prototype, 'url', {
|
||||
get: function() { return 'foo'; }
|
||||
});
|
||||
var ws = new WebSocket('ws://example.invalid/');
|
||||
assert_equals(ws.url, 'foo');
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<title>WebSockets: defineProperty setter for url</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=../../../constants.js?pipe=sub></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
window.setter_ran = false;
|
||||
Object.defineProperty(WebSocket.prototype, 'url', {
|
||||
set: function(v) { window[v] = true; }
|
||||
});
|
||||
var ws = new WebSocket('ws://example.invalid/');
|
||||
ws.url = 'setter_ran';
|
||||
assert_true(setter_ran);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue