Bug 521151 - /content/ unit tests fail on JavaScript 'strict' mode. r=smaug, r=jwalden

This commit is contained in:
Jae-Seong Lee 2009-11-17 18:08:21 -08:00
Родитель 2c262b74da
Коммит 5c1c575d5d
3 изменённых файлов: 13 добавлений и 13 удалений

Просмотреть файл

@ -75,8 +75,8 @@ function ParseFile(file) {
do_check_eq(file instanceof nsILocalFile, true);
fileStr = C["@mozilla.org/network/file-input-stream;1"]
.createInstance(nsIFileInputStream);
var fileStr = C["@mozilla.org/network/file-input-stream;1"]
.createInstance(nsIFileInputStream);
// Init for readonly reading
fileStr.init(file, 0x01, 0400, nsIFileInputStream.CLOSE_ON_EOF);
return ParseXML(fileStr);

Просмотреть файл

@ -262,7 +262,7 @@ function run_extract_test() {
var tests = doc.getElementsByTagName("test");
// Run our deletion, extraction tests.
for (i = 0; i < tests.length; i++) {
for (var i = 0; i < tests.length; i++) {
dump("Configuring for test " + i + "\n");
var currentTest = tests.item(i);
@ -315,10 +315,10 @@ function run_extract_test() {
do_check_true(baseFrag.isEqualNode(resultFrag));
dump("Ensure the original nodes weren't extracted - test " + i + "\n\n");
walker = doc.createTreeWalker(baseFrag,
C_i.nsIDOMNodeFilter.SHOW_ALL,
null,
false);
var walker = doc.createTreeWalker(baseFrag,
C_i.nsIDOMNodeFilter.SHOW_ALL,
null,
false);
var foundStart = false;
var foundEnd = false;
do {
@ -415,13 +415,13 @@ function run_miscellaneous_tests() {
// Let's try some invalid inputs to our DOM range and see what happens.
var currentTest = tests.item(0);
baseSource = currentTest.firstChild;
baseResult = baseSource.nextSibling;
baseExtract = baseResult.nextSibling;
var baseSource = currentTest.firstChild;
var baseResult = baseSource.nextSibling;
var baseExtract = baseResult.nextSibling;
baseFrag = getFragment(baseSource);
var baseFrag = getFragment(baseSource);
baseRange = getRange(baseSource, baseFrag);
var baseRange = getRange(baseSource, baseFrag);
var startContainer = baseRange.startContainer;
var endContainer = baseRange.endContainer;
var startOffset = baseRange.startOffset;

Просмотреть файл

@ -209,7 +209,7 @@ const fooContractID = xtfClass + "xtf-tests;foo";
const Module = {
// nsIModule
registerSelf: function registerSelf(compMgr, fileSpec, location, type) {
compReg = compMgr.QueryInterface(nsIComponentRegistrar);
var compReg = compMgr.QueryInterface(nsIComponentRegistrar);
compReg.registerFactoryLocation(fooClassID,
fooClassDesc,