mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
<!--
|
||||
setTimeout(function() { postMessage(1) }, 10);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>setTimeout</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, 1);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
var t = setTimeout(function() { postMessage(1); }, 10);
|
||||
clearTimeout(t);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>clearTimeout</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
var gotMessage = false;
|
||||
worker.onmessage = function() { gotMessage = true; };
|
||||
setTimeout(this.step_func(function() { assert_false(gotMessage); this.done(); }), 100);
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<!--
|
||||
setInterval(function() { postMessage(1); }, 10);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>setInterval</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, 1);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<!--
|
||||
var t = setInterval(function() {
|
||||
postMessage(1);
|
||||
}, 10);
|
||||
clearInterval(t);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>clearInterval</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
var i = 0;
|
||||
worker.onmessage = function() { i++; }
|
||||
setTimeout(this.step_func(function() { assert_equals(i, 0); this.done(); }), 100);
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
|
||||
test(function() {
|
||||
importScripts();
|
||||
});
|
||||
|
||||
done();
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
|
||||
test(function() {
|
||||
var ran = false;
|
||||
assert_throws("SyntaxError", function() {
|
||||
importScripts('data:text/javascript,ran=true','http://foo bar');
|
||||
});
|
||||
assert_false(ran, 'first argument to importScripts ran');
|
||||
});
|
||||
|
||||
done();
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
var x = 'a';
|
||||
try {
|
||||
importScripts('data:text/javascript,x+="b"',
|
||||
'data:text/javascript,x+="c"');
|
||||
} catch(e) {
|
||||
x += "d"
|
||||
}
|
||||
postMessage(x);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts running scripts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, "abc");
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<!--
|
||||
var x = '';
|
||||
var exception;
|
||||
try {
|
||||
importScripts('data:text/javascript,x+="first script successful. "',
|
||||
'data:text/javascript,x+="FAIL (second script). "; for(;) break;', // doesn't compile
|
||||
'data:text/javascript,x+="FAIL (third script)"');
|
||||
} catch(ex) {
|
||||
if (ex instanceof SyntaxError)
|
||||
exception = true;
|
||||
else
|
||||
exception = String(ex);
|
||||
}
|
||||
postMessage([x, exception]);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts broken script</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data[0], "first script successful. ");
|
||||
assert_true(e.data[1], 'expected SyntaxError');
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<!--
|
||||
var x;
|
||||
var y;
|
||||
try {
|
||||
importScripts('data:text/javascript,x={',
|
||||
'data:text/javascript,}');
|
||||
} catch(e) {
|
||||
y = true;
|
||||
}
|
||||
postMessage([x, y]);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts separate scripts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data[0], undefined);
|
||||
assert_true(e.data[1]);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<!--
|
||||
var x;
|
||||
var y;
|
||||
var z;
|
||||
try {
|
||||
importScripts('data:text/javascript,x=1',
|
||||
'data:text/javascript,throw 2',
|
||||
'data:text/javascript,z=3');
|
||||
} catch(e) {
|
||||
y = e;
|
||||
}
|
||||
postMessage([x, y, z]);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts uncaught exception</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data[0], 1);
|
||||
assert_equals(e.data[1], 2);
|
||||
assert_equals(e.data[2], undefined);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<!--
|
||||
importScripts('data:text/javascript,postMessage(1)');
|
||||
postMessage(2);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>postMessage in importScripts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
var i = 0;
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
i++;
|
||||
assert_equals(e.data, i);
|
||||
if (i == 2)
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<!--
|
||||
var log = postMessage;
|
||||
importScripts('data:text/javascript,function run() { log(true) }');
|
||||
run();
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>variables and functions crossing importScripts boundary</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_true(e.data);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<!--
|
||||
var log = postMessage;
|
||||
importScripts('data:text/javascript,function run() { for(var i = 0; i < 1000; ++i) { if (i == 500) log(true); } return 1; }');
|
||||
postMessage(run());
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>variables and functions crossing importScripts boundary, take 2</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
var i = 0;
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
i++;
|
||||
if (i == 1) {
|
||||
assert_true(e.data);
|
||||
} else {
|
||||
assert_equals(e.data, 1);
|
||||
this.done();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<!--
|
||||
// prevent recursion
|
||||
if ('beenThere' in self) {
|
||||
throw 'undefined stringified to the empty string';
|
||||
}
|
||||
beenThere = true;
|
||||
try {
|
||||
importScripts(undefined);
|
||||
postMessage(got);
|
||||
} catch(ex) {
|
||||
postMessage(String(ex));
|
||||
}
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts(undefined)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, 'undefined');
|
||||
this.done();
|
||||
})
|
||||
worker.onerror = this.step_func(function(e) {
|
||||
assert_unreached(e.message);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<!--
|
||||
// prevent recursion
|
||||
if ('beenThere' in self) {
|
||||
throw 'null stringified to the empty string';
|
||||
}
|
||||
beenThere = true;
|
||||
try {
|
||||
importScripts(null);
|
||||
postMessage(got);
|
||||
} catch(ex) {
|
||||
postMessage(String(ex));
|
||||
}
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts(null)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, 'null');
|
||||
this.done();
|
||||
});
|
||||
worker.onerror = this.step_func(function(e) {
|
||||
assert_unreached(e.message);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<!--
|
||||
// prevent recursion
|
||||
if ('beenThere' in self) {
|
||||
throw '1 stringified to the empty string';
|
||||
}
|
||||
beenThere = true;
|
||||
try {
|
||||
importScripts(1);
|
||||
postMessage(got);
|
||||
} catch(ex) {
|
||||
postMessage(String(ex));
|
||||
}
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>importScripts(1)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, '1');
|
||||
this.done();
|
||||
});
|
||||
worker.onerror = this.step_func(function(e) {
|
||||
assert_unreached(e.message);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1 @@
|
|||
var got = '1';
|
||||
|
|
@ -0,0 +1 @@
|
|||
var got = 'null';
|
||||
|
|
@ -0,0 +1 @@
|
|||
var got = 'undefined';
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
postMessage(navigator.appName);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>navigator.appName</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, navigator.appName);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
postMessage(navigator.appVersion);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>navigator.appVersion</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, navigator.appVersion);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
postMessage(navigator.platform);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>navigator.platform</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, navigator.platform);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
postMessage(navigator.userAgent);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>navigator.userAgent</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, navigator.userAgent);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
postMessage(navigator.onLine);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>navigator.onLine</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, navigator.onLine);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<!--
|
||||
var log = [];
|
||||
var neverEncounteredValue = "This is not the value you are looking for.";
|
||||
for (x in navigator) {
|
||||
// this should silently fail and not throw per webidl
|
||||
navigator[x] = neverEncounteredValue;
|
||||
if (navigator[x] === neverEncounteredValue)
|
||||
log.push(x);
|
||||
}
|
||||
postMessage(log.join(', '));
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>readonlyness of members of Navigator</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, '');
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!--
|
||||
postMessage(navigator.language);
|
||||
/*
|
||||
-->
|
||||
<!doctype html>
|
||||
<title>navigator.language</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var worker = new Worker('#');
|
||||
worker.onmessage = this.step_func(function(e) {
|
||||
assert_equals(e.data, navigator.language);
|
||||
this.done();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
*/
|
||||
//-->
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
|
||||
var properties = [
|
||||
"appCodeName",
|
||||
"product",
|
||||
"productSub",
|
||||
"vendor",
|
||||
"vendorSub",
|
||||
|
||||
// Only exist in Window scopes if navigator compatibility mode is Gecko;
|
||||
// never exist in workers.
|
||||
"taintEnabled",
|
||||
"oscpu",
|
||||
];
|
||||
|
||||
properties.forEach(function(property) {
|
||||
test(function() {
|
||||
assert_false(property in navigator);
|
||||
}, "NavigatorID properties exposed only for Window: " + property);
|
||||
});
|
||||
|
||||
done();
|
||||
Loading…
Add table
Add a link
Reference in a new issue