зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1363795 - Enable some Mozilla ESLint recommended rules for dom/indexedDB/test (no-undef). r=bevis
MozReview-Commit-ID: G6uRTV9i0uX --HG-- extra : rebase_source : d882067602831bc2a257283aa2e70529568ddf0f
This commit is contained in:
Родитель
0d5c0e796c
Коммит
e123b6dfb8
|
@ -0,0 +1,29 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended",
|
||||
"plugin:mozilla/browser-test",
|
||||
"plugin:mozilla/chrome-test",
|
||||
"plugin:mozilla/mochitest-test",
|
||||
],
|
||||
"plugins": [
|
||||
"mozilla"
|
||||
],
|
||||
"rules": {
|
||||
"brace-style": "off",
|
||||
"consistent-return": "off",
|
||||
"key-spacing": "off",
|
||||
"keyword-spacing": "off",
|
||||
"no-extra-semi": "off",
|
||||
"no-native-reassign": "off",
|
||||
"no-shadow": "off",
|
||||
"no-trailing-spaces": "off",
|
||||
"no-unused-vars": "off",
|
||||
"object-shorthand": "off",
|
||||
"quotes": "off",
|
||||
"spaced-comment": "off",
|
||||
"space-before-blocks": "off",
|
||||
"space-before-function-paren": "off",
|
||||
}
|
||||
};
|
|
@ -52,6 +52,7 @@ dump("EXCEPTION IN CREATION: " + e + "\n " + e.stack + "\n");
|
|||
{ type: "text/fancy" });
|
||||
|
||||
function workerScript() {
|
||||
/* eslint-env worker */
|
||||
onmessage = function(event) {
|
||||
// Save the Blob to the worker's global scope.
|
||||
self.holdOntoBlob = event.data;
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
// testSteps is expected to be defined by the file including this file.
|
||||
/* global testSteps */
|
||||
|
||||
var testGenerator = testSteps();
|
||||
|
||||
var testResult;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from browserHelpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
let request = indexedDB.open("browser_forgetThisSite.js", 11);
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from browserHelpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
let request = indexedDB.open("browser_forgetThisSite.js");
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from browserHelpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
// testFinishedCallback is expected to be set in the scope by head.js.
|
||||
/* global testFinishedCallback */
|
||||
let testIsIDBDatabase;
|
||||
let testException;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint-env worker */
|
||||
|
||||
onconnect = function(e) {
|
||||
e.ports[0].onmessage = function(e) {
|
||||
var request = indexedDB.open(e.data, { version: 1,
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<title>Indexed Database Test</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
// testFinishedCallback is expected to be set in the scope by head.js.
|
||||
/* global testFinishedCallback */
|
||||
let testIsIDBDatabase;
|
||||
let testException;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint-env worker */
|
||||
|
||||
onmessage = function(e) {
|
||||
var request = indexedDB.open(e.data, { version: 1,
|
||||
storage: "persistent" });
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
|
||||
var { 'classes': Cc, 'interfaces': Ci, 'utils': Cu } = Components;
|
||||
|
||||
// testSteps is expected to be defined by the file including this file.
|
||||
/* global testSteps */
|
||||
|
||||
var testGenerator = testSteps();
|
||||
|
||||
if (!window.runTest) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* import-globals-from helpers.js */
|
||||
|
||||
var bufferCache = [];
|
||||
var utils = SpecialPowers.getDOMWindowUtils(window);
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
// testSteps is expected to be defined by the test using this file.
|
||||
/* global testSteps:false */
|
||||
|
||||
var testGenerator = testSteps();
|
||||
// The test js is shared between xpcshell (which has no SpecialPowers object)
|
||||
// and content mochitests (where the |Components| object is accessible only as
|
||||
|
@ -188,7 +191,7 @@ function* testHarnessSteps() {
|
|||
} else if (testScriptFilename) {
|
||||
todo(false,
|
||||
"Skipping test in a worker because it is explicitly disabled: " +
|
||||
disableWorkerTest);
|
||||
window.disableWorkerTest);
|
||||
} else {
|
||||
todo(false,
|
||||
"Skipping test in a worker because it's not structured properly");
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
var gOrigMaxTotalViewers = undefined;
|
||||
function setCachePref(enabled) {
|
||||
if (enabled) {
|
||||
|
@ -44,7 +45,7 @@
|
|||
is(event.data, "go", "set up database successfully");
|
||||
|
||||
iframe.src = "bfcache_iframe2.html";
|
||||
res = JSON.parse((yield).data);
|
||||
let res = JSON.parse((yield).data);
|
||||
is(res.version, 2, "version was set correctly");
|
||||
is(res.storeCount, 1, "correct set of stores");
|
||||
ok(!("blockedFired" in res), "blocked shouldn't fire");
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
info("Setting up test fixtures: create an IndexedDB database and object store.");
|
||||
|
@ -207,6 +208,7 @@
|
|||
info("Send blob to a worker, read its contents there, and verify results.");
|
||||
|
||||
function workerScript() {
|
||||
/* eslint-env worker */
|
||||
onmessage = function(event) {
|
||||
var reader = new FileReaderSync();
|
||||
postMessage(reader.readAsText(event.data));
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
/*
|
||||
* This tests ensures that if the last live reference to a Blob is on the
|
||||
* worker and the database has already been shutdown, that there is no crash
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const BLOB_DATA = ["fun ", "times ", "all ", "around!"];
|
||||
|
@ -71,6 +72,7 @@
|
|||
info("Sending slice to a worker");
|
||||
|
||||
function workerScript() {
|
||||
/* eslint-env worker */
|
||||
onmessage = function(event) {
|
||||
var blob = event.data;
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
/**
|
||||
* Create a composite/multi-file Blob on the worker, then post it as an XHR
|
||||
* payload and ensure that we don't hang/generate an assertion/etc. but
|
||||
|
@ -69,6 +70,7 @@
|
|||
is(blob.type, BLOB_TYPE, "Correct type");
|
||||
|
||||
function workerScript() {
|
||||
/* eslint-env worker */
|
||||
onmessage = function(event) {
|
||||
var blob = event.data;
|
||||
var compositeBlob = new Blob(["preceding string. ", blob],
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
/**
|
||||
* Create an IndexedDB-backed Blob, send it to the worker, try and read the
|
||||
* contents of the Blob from the worker using an XHR. Ideally, we don't
|
||||
|
@ -70,6 +71,7 @@
|
|||
info("Sending blob to a worker");
|
||||
|
||||
function workerScript() {
|
||||
/* eslint-env worker */
|
||||
onmessage = function(event) {
|
||||
var blob = event.data;
|
||||
var blobUrl = URL.createObjectURL(blob);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
/**
|
||||
* Create an IndexedDB-backed Blob, send it to the worker, try and read the
|
||||
* *SLICED* contents of the Blob from the worker using an XHR. This is
|
||||
|
@ -71,6 +72,7 @@
|
|||
info("Sending blob to a worker");
|
||||
|
||||
function workerScript() {
|
||||
/* eslint-env worker */
|
||||
onmessage = function(event) {
|
||||
var blob = event.data;
|
||||
var slicedBlob = blob.slice(0, 3, "text/plain");
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
@ -75,7 +77,7 @@
|
|||
let objectStore = db.transaction([objectStoreName], READ_WRITE)
|
||||
.objectStore(objectStoreName);
|
||||
|
||||
request = objectStore.add(refResult, 2);
|
||||
let request = objectStore.add(refResult, 2);
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
event = yield undefined;
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
@ -80,8 +82,8 @@
|
|||
let db = event.target.result;
|
||||
db.onerror = errorHandler;
|
||||
|
||||
trans = db.transaction([objectStoreName], READ_WRITE);
|
||||
objectStore = trans.objectStore(objectStoreName);
|
||||
let trans = db.transaction([objectStoreName], READ_WRITE);
|
||||
let objectStore = trans.objectStore(objectStoreName);
|
||||
|
||||
request = objectStore.get(fileData2.key);
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
/**
|
||||
* Test that a put of a file-backed Blob/File whose backing file has been
|
||||
* deleted results in a failure of that put failure.
|
||||
|
@ -109,7 +111,7 @@
|
|||
let trans = db.transaction([objectStoreName], READ_WRITE);
|
||||
let objectStore = trans.objectStore(objectStoreName);
|
||||
|
||||
request = objectStore.add(fileBackedFile, 2);
|
||||
let request = objectStore.add(fileBackedFile, 2);
|
||||
request.onsuccess = unexpectedSuccessHandler;
|
||||
request.onerror = expectedErrorHandler("UnknownError");
|
||||
trans.onsuccess = unexpectedSuccessHandler;
|
||||
|
@ -133,7 +135,7 @@
|
|||
|
||||
// Attempt to fetch the key to verify there's nothing in the DB rather
|
||||
// than the value which could return undefined as a misleading error.
|
||||
request = objectStore.getKey(2);
|
||||
let request = objectStore.getKey(2);
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
request.onerror = errorHandler;
|
||||
event = yield undefined;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
@ -82,7 +84,7 @@
|
|||
db.onerror = errorHandler;
|
||||
|
||||
let trans = db.transaction([objectStoreName], READ_WRITE);
|
||||
objectStore = trans.objectStore(objectStoreName);
|
||||
let objectStore = trans.objectStore(objectStoreName);
|
||||
|
||||
request = objectStore.get(fileData.key);
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const databaseName = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const dbName = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const READ_WRITE = "readwrite";
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
@ -43,6 +45,7 @@
|
|||
let mutableFile = event.target.result;
|
||||
|
||||
function dummyWorkerScript() {
|
||||
/* eslint-env worker */
|
||||
onmessage = function(event) {
|
||||
throw("Shouldn't be called!");
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from file.js */
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
let id = getFileId(null);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -15,9 +15,10 @@
|
|||
<a id="a" href="leaving_page_iframe.html"></a>
|
||||
|
||||
<script type="text/javascript">
|
||||
onmessage = function(e) {
|
||||
/* import-globals-from helpers.js */
|
||||
window.addEventListener("message", function(e) {
|
||||
ok(false, "gotmessage: " + e.data);
|
||||
}
|
||||
});
|
||||
|
||||
function* testSteps()
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"use strict";
|
||||
|
||||
function childFrameScript() {
|
||||
/* eslint-env mozilla/frame-script */
|
||||
"use strict";
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
is("open" in indexedDB, true, "open() defined");
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* import-globals-from helpers.js */
|
||||
function* testSteps()
|
||||
{
|
||||
const name = window.location.pathname;
|
||||
|
|
|
@ -70,6 +70,8 @@ function get(k) {
|
|||
function runInSandbox(sandbox, testFunc) {
|
||||
is(typeof testFunc, 'function');
|
||||
var resolvePromise;
|
||||
// Step-done is defined in the sandbox and used in the add() function above.
|
||||
/* global step_done */
|
||||
var testPromise = new Promise(r => resolvePromise = r);
|
||||
SpecialPowers.Cu.exportFunction(_ => resolvePromise(), sandbox,
|
||||
{ defineAs: 'step_done' });
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/recommended",
|
||||
"plugin:mozilla/xpcshell-test",
|
||||
],
|
||||
"plugins": [
|
||||
"mozilla"
|
||||
],
|
||||
"rules": {
|
||||
"brace-style": "off",
|
||||
"no-shadow": "off",
|
||||
}
|
||||
};
|
||||
|
|
|
@ -16,7 +16,9 @@ module.exports = {
|
|||
"ChromeWindow": false,
|
||||
"ChromeWorker": false,
|
||||
"Components": false,
|
||||
"DOMRequest": false,
|
||||
"DedicatedWorkerGlobalScope": false,
|
||||
"IDBFileRequest": false,
|
||||
"IDBLocaleAwareKeyRange": false,
|
||||
"IDBMutableFile": false,
|
||||
"ImageDocument": false,
|
||||
|
|
Загрузка…
Ссылка в новой задаче