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,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";

View 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
}

View file

@ -0,0 +1,9 @@
try
{
importScripts("WorkerBasic.js");
}
catch(ex)
{
result = "Fail";
postMessage(result);
}

View file

@ -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);

View 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);
}
}

View file

@ -0,0 +1,7 @@
var result = "Fail";
onmessage = function(evt)
{
result = "Pass";
postMessage(result);
}

View file

@ -0,0 +1,5 @@
onmessage = function(evt)
{
postMessage(evt.data);
self.close();
}

View file

@ -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);

View 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);

View file

@ -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);

View file

@ -0,0 +1,10 @@
onmessage = function(evt)
{
for (var i=0; true; i++)
{
if (i%1000 == 0)
{
postMessage(i);
}
}
}

View file

@ -0,0 +1,2 @@
var result = "Pass";
postMessage(result);