mirror of
https://github.com/servo/servo.git
synced 2025-09-15 01:18:22 +01:00
Update web-platform-tests.
This commit is contained in:
parent
74afd086d2
commit
71008d816d
62 changed files with 793 additions and 150 deletions
|
@ -8,15 +8,17 @@
|
|||
<script>
|
||||
var cookie_id = ((new Date())-0) + '.' + Math.random();
|
||||
async_test(function(t) {
|
||||
t.add_cleanup(function() {
|
||||
// remove cookie
|
||||
document.cookie = 'ws_test_'+cookie_id+'; Path=/; Expires=Sun, 06 Nov 1994 08:49:37 GMT';
|
||||
});
|
||||
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/set-cookie?'+cookie_id);
|
||||
ws.onopen = t.step_func(function(e) {
|
||||
ws.close();
|
||||
assert_regexp_match(document.cookie, new RegExp('ws_test_'+cookie_id+'=test'));
|
||||
// remove cookie
|
||||
document.cookie = 'ws_test_'+cookie_id+'; Path=/; Expires=Sun, 06 Nov 1994 08:49:37 GMT';
|
||||
t.done();
|
||||
});
|
||||
ws.onclose = t.step_func(function() {assert_unreached()});
|
||||
ws.onerror = ws.onclose = t.step_func(function() {assert_unreached()});
|
||||
|
||||
// sleep for 2 seconds with sync xhr
|
||||
var sleep = new XMLHttpRequest();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue