mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
cleaned whitespace
This commit is contained in:
parent
76a24d8a5b
commit
54e984c763
89 changed files with 56 additions and 126 deletions
|
@ -102,7 +102,7 @@ limitations under the License.
|
|||
try {
|
||||
result = test.run();
|
||||
} catch (e) {
|
||||
console.error('test run failed: ' + e);
|
||||
console.error('test run failed: ' + e);
|
||||
result = { output: 'Failed', emulated: '?' };
|
||||
}
|
||||
if (result.then)
|
||||
|
@ -111,6 +111,6 @@ limitations under the License.
|
|||
publish(result);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -25,7 +25,7 @@ Promise.prototype = {
|
|||
resolve: function (result) {
|
||||
if ('result' in this) return;
|
||||
this.result = result;
|
||||
if ('callback' in this) this.callback(result);
|
||||
if ('callback' in this) this.callback(result);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -665,4 +665,3 @@ function checkCanvas(font) {
|
|||
colors[2][2] * 3 < counts[2][2];
|
||||
return isPlus;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,4 +37,3 @@ onmessage = function (e) {
|
|||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -99,4 +99,3 @@
|
|||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['browser.ini']
|
||||
|
||||
|
|
1
test/resources/browser_manifests/.gitignore
vendored
1
test/resources/browser_manifests/.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
browser_manifest.json
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ function MozillaLogger(aPath) {
|
|||
MozillaLogger.prototype = {
|
||||
|
||||
init : function(path) {},
|
||||
|
||||
|
||||
getLogCallback : function() {
|
||||
return function (msg) {
|
||||
var data = msg.num + " " + msg.level + " " + msg.info.join(' ') + "\n";
|
||||
|
@ -76,7 +76,7 @@ function MozillaFileLogger(aPath) {
|
|||
}
|
||||
|
||||
MozillaFileLogger.prototype = {
|
||||
|
||||
|
||||
init : function (path) {
|
||||
var PR_WRITE_ONLY = 0x02; // Open for writing only.
|
||||
var PR_CREATE_FILE = 0x08;
|
||||
|
@ -110,7 +110,7 @@ MozillaFileLogger.prototype = {
|
|||
close : function() {
|
||||
if(this._foStream)
|
||||
this._foStream.close();
|
||||
|
||||
|
||||
this._foStream = null;
|
||||
this._file = null;
|
||||
}
|
||||
|
|
|
@ -240,10 +240,10 @@ SpecialPowersObserverAPI.prototype = {
|
|||
case "BOOL":
|
||||
if (aMessage.json.op == "get")
|
||||
return(prefs.getBoolPref(prefName));
|
||||
else
|
||||
else
|
||||
return(prefs.setBoolPref(prefName, prefValue));
|
||||
case "INT":
|
||||
if (aMessage.json.op == "get")
|
||||
if (aMessage.json.op == "get")
|
||||
return(prefs.getIntPref(prefName));
|
||||
else
|
||||
return(prefs.setIntPref(prefName, prefValue));
|
||||
|
@ -297,7 +297,7 @@ SpecialPowersObserverAPI.prototype = {
|
|||
break;
|
||||
case "has":
|
||||
let hasPerm = Services.perms.testPermissionFromPrincipal(principal, msg.type);
|
||||
if (hasPerm == Ci.nsIPermissionManager.ALLOW_ACTION)
|
||||
if (hasPerm == Ci.nsIPermissionManager.ALLOW_ACTION)
|
||||
return true;
|
||||
return false;
|
||||
break;
|
||||
|
@ -411,4 +411,3 @@ SpecialPowersObserverAPI.prototype = {
|
|||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -695,7 +695,7 @@ SpecialPowersAPI.prototype = {
|
|||
we will revert the permission back to the original.
|
||||
|
||||
inPermissions is an array of objects where each object has a type, action, context, ex:
|
||||
[{'type': 'SystemXHR', 'allow': 1, 'context': document},
|
||||
[{'type': 'SystemXHR', 'allow': 1, 'context': document},
|
||||
{'type': 'SystemXHR', 'allow': Ci.nsIPermissionManager.PROMPT_ACTION, 'context': document}]
|
||||
|
||||
Allow can be a boolean value of true/false or ALLOW_ACTION/DENY_ACTION/PROMPT_ACTION/UNKNOWN_ACTION
|
||||
|
@ -1706,7 +1706,7 @@ SpecialPowersAPI.prototype = {
|
|||
var msg = {
|
||||
'op': 'test',
|
||||
'type': type,
|
||||
'value': value,
|
||||
'value': value,
|
||||
'url': url,
|
||||
'appId': appId,
|
||||
'isInBrowserElement': isInBrowserElement
|
||||
|
|
|
@ -330,7 +330,7 @@ function objEquiv(a, b) {
|
|||
// The same set of keys (although not necessarily the same order),
|
||||
ka.sort();
|
||||
kb.sort();
|
||||
// Equivalent values for every corresponding key, and possibly expensive deep
|
||||
// Equivalent values for every corresponding key, and possibly expensive deep
|
||||
// test
|
||||
for (i = ka.length - 1; i >= 0; i--) {
|
||||
key = ka[i];
|
||||
|
|
|
@ -49,10 +49,10 @@ this.MockPermissionPrompt = {
|
|||
registrar.registerFactory(newClassID, "", CONTRACT_ID, newFactory);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
reset: function() {
|
||||
},
|
||||
|
||||
|
||||
cleanup: function() {
|
||||
this.reset();
|
||||
if (oldFactory) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<em:version>2010.07.23</em:version>
|
||||
<em:type>2</em:type>
|
||||
|
||||
<!-- Target Application this extension can install into,
|
||||
<!-- Target Application this extension can install into,
|
||||
with minimum and maximum supported versions. -->
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
|
@ -22,5 +22,5 @@
|
|||
<em:name>Special Powers</em:name>
|
||||
<em:description>Special powers for use in testing.</em:description>
|
||||
<em:creator>Mozilla</em:creator>
|
||||
</Description>
|
||||
</Description>
|
||||
</RDF>
|
||||
|
|
|
@ -96,11 +96,11 @@ Original author: L. David Baron <dbaron@dbaron.org>
|
|||
<form id="imgcontrols">
|
||||
<label>
|
||||
<input type="radio" name="which" id="testImage" value="0" checked="checked"> Test
|
||||
</label>
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="which" id="referenceImage" value="1"> Reference
|
||||
</label>
|
||||
<label>
|
||||
<label>
|
||||
<input type="checkbox" id="differences"> Circle differences
|
||||
</label>
|
||||
</form>
|
||||
|
@ -146,12 +146,12 @@ Original author: L. David Baron <dbaron@dbaron.org>
|
|||
<feComposite result="c" in="c1" in2="c2" operator="arithmetic" k2="255" k3="255" />
|
||||
<!-- a will be opaque for every pixel with differences and transparent for all others -->
|
||||
<feColorMatrix result="a" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0" />
|
||||
|
||||
|
||||
<!-- a, dilated by 4 pixels -->
|
||||
<feMorphology result="dila4" in="a" operator="dilate" radius="4" />
|
||||
<!-- a, dilated by 1 pixel -->
|
||||
<feMorphology result="dila1" in="a" operator="dilate" radius="1" />
|
||||
|
||||
|
||||
<!-- all the pixels in the 3-pixel dilation of a but not in the 1-pixel dilation of a, to highlight the diffs -->
|
||||
<feComposite result="highlight" in="dila4" in2="dila1" operator="out" />
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ window.onload = function() {
|
|||
ID("logEntry").value = params.log;
|
||||
logPasted();
|
||||
} else if (params.web) {
|
||||
loadFromWeb(params.web);
|
||||
loadFromWeb(params.web);
|
||||
}
|
||||
ID("logEntry").focus();
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ window.onload = function() {
|
|||
var random = match[2];
|
||||
var url = match[3];
|
||||
var extra = match[4];
|
||||
|
||||
|
||||
gTestItems.push({
|
||||
pass: !state.match(/FAIL$/),
|
||||
// only one of the following three should ever be true
|
||||
|
@ -220,7 +220,7 @@ window.onload = function() {
|
|||
var table = document.getElementById("itemtable");
|
||||
while (table.childNodes.length > 0) {
|
||||
table.removeChild(table.childNodes[table.childNodes.length - 1]);
|
||||
}
|
||||
}
|
||||
var tbody = document.createElement("tbody");
|
||||
table.appendChild(tbody);
|
||||
|
||||
|
@ -234,7 +234,7 @@ window.onload = function() {
|
|||
var rowclass = item.pass ? "pass" : "fail";
|
||||
var td = document.createElement("td");
|
||||
var text = "";
|
||||
|
||||
|
||||
if (item.unexpected) {
|
||||
text += "!";
|
||||
rowclass += " unexpected";
|
||||
|
@ -253,7 +253,7 @@ window.onload = function() {
|
|||
td = document.createElement("td");
|
||||
td.id = "url" + i;
|
||||
td.className = "url";
|
||||
|
||||
|
||||
var match = item.url.match(/\/mozilla\/(.*)/);
|
||||
text = document.createTextNode(match ? match[1] : item.url);
|
||||
if (item.images.length > 0) {
|
||||
|
|
1
test/stats/results/.gitignore
vendored
1
test/stats/results/.gitignore
vendored
|
@ -2,4 +2,3 @@
|
|||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
|
||||
|
|
|
@ -45,4 +45,3 @@ limitations under the License.
|
|||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -108,4 +108,3 @@ describe('cmap', function() {
|
|||
expect(cmap.builtInCMap).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -229,4 +229,3 @@ describe('evaluator', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -520,4 +520,3 @@ describe('function', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -148,4 +148,3 @@ describe('obj', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ describe('parser', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -41,4 +41,3 @@ describe('stream', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -104,4 +104,3 @@
|
|||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ describe('util', function() {
|
|||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue