mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1696873
- Enable ESLint rule no-undef on remaining docshell xhtml files. r=smaug
Depends on D100450 Differential Revision: https://phabricator.services.mozilla.com/D107423
This commit is contained in:
parent
db4c4dc4b7
commit
acb019156a
@ -394,7 +394,6 @@ module.exports = {
|
||||
"no-redeclare": "off",
|
||||
"no-sequences": "off",
|
||||
"no-shadow": "off",
|
||||
"no-undef": "off",
|
||||
"no-useless-call": "off",
|
||||
},
|
||||
},
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
<!-- test code goes here -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
/* globals SimpleTest, is, isnot, ok, snapshotWindow, compareSnapshots,
|
||||
onerror */
|
||||
var imports = [ "SimpleTest", "is", "isnot", "ok", "snapshotWindow",
|
||||
"compareSnapshots", "onerror" ];
|
||||
for (var name of imports) {
|
||||
|
@ -18,6 +18,7 @@
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
Services.prefs.setBoolPref("browser.navigation.requireUserInteraction", false);
|
||||
|
||||
/* globals SimpleTest, is, isnot, ok */
|
||||
var imports = [ "SimpleTest", "is", "isnot", "ok"];
|
||||
for (var name of imports) {
|
||||
window[name] = window.arguments[0][name];
|
||||
|
@ -11,7 +11,7 @@
|
||||
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
|
||||
<script type="application/javascript" src="docshell_helpers.js" />
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
||||
|
||||
// Define the generator-iterator for the tests.
|
||||
var tests = testIterator();
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
function $(id) { return TestWindow.getDocument().getElementById(id); }
|
||||
|
||||
////
|
||||
// Generator function for test steps for bug 294258:
|
||||
// Generator function for test steps for bug 294258:
|
||||
// Form values should be preserved on reload.
|
||||
//
|
||||
function* testIterator()
|
||||
@ -36,7 +36,7 @@
|
||||
onNavComplete: nextTest
|
||||
} );
|
||||
yield undefined;
|
||||
|
||||
|
||||
// Change the data for each of the form fields, and reload.
|
||||
$("text").value = "text value";
|
||||
$("checkbox").checked = true;
|
||||
@ -45,7 +45,7 @@
|
||||
.get("TmpD", Ci.nsIFile);
|
||||
file.append("294258_test.file");
|
||||
file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666);
|
||||
filePath = file.path;
|
||||
let filePath = file.path;
|
||||
$("file").value = filePath;
|
||||
$("textarea").value = "textarea value";
|
||||
$("radio1").checked = true;
|
||||
@ -55,7 +55,7 @@
|
||||
onNavComplete: nextTest
|
||||
} );
|
||||
yield undefined;
|
||||
|
||||
|
||||
// Verify that none of the form data has changed.
|
||||
is($("text").value, "text value", "Text value changed");
|
||||
is($("checkbox").checked, true, "Checkbox value changed");
|
||||
@ -67,7 +67,7 @@
|
||||
// Tell the framework the test is finished.
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
]]></script>
|
||||
|
||||
<browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
<script type="application/javascript" src="docshell_helpers.js"></script>
|
||||
<script type="application/javascript"><![CDATA[
|
||||
// `content` is the id of the browser element used for the test.
|
||||
/* global content */
|
||||
/*
|
||||
Regression test for bug 283733 and bug 307027.
|
||||
|
||||
@ -105,7 +107,7 @@ function step1B(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* Step 2: Load a HTTPS page, and confirm it's secure.
|
||||
* Step 2: Load a HTTPS page, and confirm it's secure.
|
||||
******************************************************************************/
|
||||
|
||||
function step2A() {
|
||||
|
@ -8,7 +8,8 @@
|
||||
|
||||
<!-- test code goes here -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
var imports = [ "SimpleTest", "is", "isnot", "ok", "onerror" ];
|
||||
/* globals SimpleTest, is */
|
||||
var imports = [ "SimpleTest", "is" ];
|
||||
for (var name of imports) {
|
||||
window[name] = window.arguments[0][name];
|
||||
}
|
||||
|
@ -8,7 +8,8 @@
|
||||
|
||||
<!-- test code goes here -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
var imports = [ "SimpleTest", "is", "isnot", "ok", "onerror" ];
|
||||
/* globals SimpleTest, is, isnot */
|
||||
var imports = [ "SimpleTest", "is", "isnot" ];
|
||||
for (var name of imports) {
|
||||
window[name] = window.arguments[0][name];
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
os = Cc["@mozilla.org/observer-service;1"].
|
||||
let os = Cc["@mozilla.org/observer-service;1"].
|
||||
getService(Ci.nsIObserverService);
|
||||
os.addObserver(observer, "content-document-global-created");
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
// Tell the framework the test is finished.
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
]]></script>
|
||||
<browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
|
||||
</window>
|
||||
|
@ -4,6 +4,7 @@ if (!window.opener && window.arguments) {
|
||||
/**
|
||||
* Import common SimpleTest methods so that they're usable in this window.
|
||||
*/
|
||||
/* globals SimpleTest, is, isnot, ok, onerror, todo, todo_is, todo_isnot */
|
||||
var imports = [
|
||||
"SimpleTest",
|
||||
"is",
|
||||
|
@ -22,7 +22,7 @@ SimpleTest.waitForExplicitFinish();
|
||||
|
||||
addLoadEvent(nextTest);
|
||||
|
||||
gen = doTest();
|
||||
let gen = doTest();
|
||||
|
||||
function nextTest() {
|
||||
gen.next();
|
||||
|
@ -91,7 +91,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=624883
|
||||
SimpleTest.finish();
|
||||
})
|
||||
.catch(function(e) {
|
||||
ok(false, "Unexpected exception thrown getting reference error message", exception);
|
||||
ok(false, "Unexpected exception thrown getting reference error message", e);
|
||||
});
|
||||
|
||||
refIframe.src = "wibble://example.com";
|
||||
@ -112,14 +112,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=624883
|
||||
testIframe.src = "about:blank";
|
||||
})
|
||||
.catch(function(e) {
|
||||
ok(false, testCase.desc + " - unexpected exception thrown", exception);
|
||||
ok(false, testCase.desc + " - unexpected exception thrown", e);
|
||||
});
|
||||
|
||||
testIframe.src = testCase.protocols + "://example.com/!/";
|
||||
}
|
||||
|
||||
var testCaseIndex = -1;
|
||||
testCases = [
|
||||
let testCases = [
|
||||
{
|
||||
desc: "Test 1: view-source should not be allowed in an iframe",
|
||||
protocols: "view-source:http",
|
||||
|
Loading…
Reference in New Issue
Block a user