mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +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,9 @@
|
|||
onerror = function(message, location, line, col, error) {
|
||||
postMessage({ source: "onerror", value: error });
|
||||
}
|
||||
|
||||
addEventListener("error", function(e) {
|
||||
postMessage({ source: "event listener", value: e.error });
|
||||
});
|
||||
|
||||
throw "hello";
|
||||
10
testing/web-platform/tests/workers/support/ErrorEvent.js
Normal file
10
testing/web-platform/tests/workers/support/ErrorEvent.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
onmessage = function(evt)
|
||||
{
|
||||
throw(new Error(evt.data));
|
||||
}
|
||||
|
||||
onerror = function(message, location, line, col)
|
||||
{
|
||||
postMessage( {"message": message, "filename": location, "lineno": line, "colno": col} );
|
||||
return false; // "not handled" so the error propagates up to the Worker object
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
try
|
||||
{
|
||||
importScripts("WorkerBasic.js");
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
result = "Fail";
|
||||
postMessage(result);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
var result = "Fail";
|
||||
|
||||
try
|
||||
{
|
||||
importScripts("NonExistentFile.js");
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
if (ex.code != null && ex.code == ex.NETWORK_ERR)
|
||||
{
|
||||
result = "Pass";
|
||||
}
|
||||
}
|
||||
|
||||
postMessage(result);
|
||||
50
testing/web-platform/tests/workers/support/Timer.js
Normal file
50
testing/web-platform/tests/workers/support/Timer.js
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
var count = 0;
|
||||
var id;
|
||||
|
||||
onmessage = function(evt)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch(evt.data)
|
||||
{
|
||||
case "TimeoutHandler":
|
||||
count = 0;
|
||||
id = setTimeout("TimeoutHandler()", 10);
|
||||
postMessage('hello');
|
||||
break;
|
||||
case "IntervalHandler":
|
||||
count = 0;
|
||||
id = setInterval("IntervalHandler()", 10);
|
||||
postMessage('hello');
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
postMessage("Fail");
|
||||
}
|
||||
}
|
||||
|
||||
function TimeoutHandler()
|
||||
{
|
||||
count++;
|
||||
postMessage("worker");
|
||||
|
||||
id = setTimeout("TimeoutHandler()", 10);
|
||||
|
||||
if (count >= 2)
|
||||
{
|
||||
clearTimeout(id);
|
||||
}
|
||||
}
|
||||
|
||||
function IntervalHandler()
|
||||
{
|
||||
count++;
|
||||
postMessage("worker");
|
||||
|
||||
if (count >= 2)
|
||||
{
|
||||
clearInterval(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
var result = "Fail";
|
||||
|
||||
onmessage = function(evt)
|
||||
{
|
||||
result = "Pass";
|
||||
postMessage(result);
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
onmessage = function(evt)
|
||||
{
|
||||
postMessage(evt.data);
|
||||
self.close();
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
var result = "Fail";
|
||||
|
||||
try
|
||||
{
|
||||
postMessage(navigator);
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
if(ex.code != null && ex.code == ex.DATA_CLONE_ERR)
|
||||
{
|
||||
result = "Pass";
|
||||
}
|
||||
}
|
||||
|
||||
postMessage(result);
|
||||
12
testing/web-platform/tests/workers/support/WorkerLocation.js
Normal file
12
testing/web-platform/tests/workers/support/WorkerLocation.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
var obj = new Object();
|
||||
obj.location = location.toString();
|
||||
obj.href = location.href;
|
||||
obj.protocol = location.protocol;
|
||||
obj.host = location.host;
|
||||
obj.hostname = location.hostname;
|
||||
obj.port = location.port;
|
||||
obj.pathname = location.pathname;
|
||||
obj.search = location.search;
|
||||
obj.hash = location.hash;
|
||||
|
||||
postMessage(obj);
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
var obj = new Object();
|
||||
obj.appName = navigator.appName;
|
||||
obj.appVersion = navigator.appVersion;
|
||||
obj.platform = navigator.platform;
|
||||
obj.userAgent = navigator.userAgent;
|
||||
obj.onLine = navigator.onLine;
|
||||
|
||||
postMessage(obj);
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
onmessage = function(evt)
|
||||
{
|
||||
for (var i=0; true; i++)
|
||||
{
|
||||
if (i%1000 == 0)
|
||||
{
|
||||
postMessage(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
var result = "Pass";
|
||||
postMessage(result);
|
||||
Loading…
Add table
Add a link
Reference in a new issue