mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
bug 466606 - JavaScript Tests - Do not force language version upon non-Gecko browsers.
This commit is contained in:
parent
565ac2694d
commit
730cb1c233
@ -654,11 +654,34 @@ function jsTestDriverBrowserInit()
|
||||
jit(false);
|
||||
}
|
||||
|
||||
var versionmatches = /version=([.0-9]*)/.exec(value);
|
||||
var versionmatches;
|
||||
|
||||
if (!versionmatches)
|
||||
if (attribute == 'type')
|
||||
{
|
||||
value = 'text/javascript;version=';
|
||||
versionmatches = /version=([.0-9]+)/.exec(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
versionmatches = /javascript([.0-9]+)/.exec(value);
|
||||
}
|
||||
|
||||
if (versionmatches)
|
||||
{
|
||||
gVersion = 10*parseInt(versionmatches[1].replace(/\./g, ''));
|
||||
}
|
||||
else if (navigator.userAgent.indexOf('Gecko/') != -1)
|
||||
{
|
||||
// If the version is not specified, and the browser is Gecko,
|
||||
// adjust the version to match the suite version.
|
||||
if (attribute == 'type')
|
||||
{
|
||||
value = 'text/javascript;version=';
|
||||
}
|
||||
else
|
||||
{
|
||||
value = 'javascript';
|
||||
}
|
||||
|
||||
if (testpath.match(/^js1_6/))
|
||||
{
|
||||
gVersion = 160;
|
||||
@ -685,10 +708,6 @@ function jsTestDriverBrowserInit()
|
||||
value += '1.5';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gVersion = 10*parseInt(versionmatches[1].replace(/\./g, ''));
|
||||
}
|
||||
|
||||
var testpathparts = testpath.split(/\//);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user