import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<!doctype html>
<title>WebSockets: wasClean, true</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=../../constants.js?pipe=sub></script>
<meta name="variant" content="">
<meta name="variant" content="?wss">
<div id=log></div>
<script>
async_test(function(t) {
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
ws.onopen = t.step_func(function(e) {
ws.send('Test');
});
ws.onmessage = t.step_func(function(e) {
ws.close();
});
ws.onclose = t.step_func(function(e) {
assert_equals(e.wasClean,true);
t.done();
});
}, null, {timeout:2000});
</script>

View file

@ -0,0 +1,35 @@
<!doctype html>
<meta charset=utf-8>
<title>CloseEvent: constructor</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
var event = new CloseEvent("foo");
assert_true(event instanceof CloseEvent, "should be a CloseEvent");
assert_equals(event.type, "foo");
assert_false(event.bubbles, "bubbles");
assert_false(event.cancelable, "cancelable");
assert_false(event.wasClean, "wasClean");
assert_equals(event.code, 0);
assert_equals(event.reason, "");
}, "new CloseEvent() without dictionary");
test(function() {
var event = new CloseEvent("foo", {
bubbles: true,
cancelable: true,
wasClean: true,
code: 7,
reason: "x",
});
assert_true(event instanceof CloseEvent, "should be a CloseEvent");
assert_equals(event.type, "foo");
assert_true(event.bubbles, "bubbles");
assert_true(event.cancelable, "cancelable");
assert_true(event.wasClean, "wasClean");
assert_equals(event.code, 7);
assert_equals(event.reason, "x");
}, "new CloseEvent() with dictionary");
</script>

View file

@ -0,0 +1,12 @@
<!doctype html>
<meta charset=utf-8>
<title>CloseEvent: historical initialization</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
assert_false("initCloseEvent" in CloseEvent.prototype);
assert_false("initCloseEvent" in new CloseEvent('close'));
}, "initCloseEvent");
</script>