/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- / /* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #if BOOTSTRAP this.EXPORTED_SYMBOLS = ["OnRefTestLoad"]; #endif const CC = Components.classes; const CI = Components.interfaces; const CR = Components.results; const XHTML_NS = "http://www.w3.org/1999/xhtml"; const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const NS_LOCAL_FILE_CONTRACTID = "@mozilla.org/file/local;1"; const NS_GFXINFO_CONTRACTID = "@mozilla.org/gfx/info;1"; const IO_SERVICE_CONTRACTID = "@mozilla.org/network/io-service;1"; const DEBUG_CONTRACTID = "@mozilla.org/xpcom/debug;1"; const NS_LOCALFILEINPUTSTREAM_CONTRACTID = "@mozilla.org/network/file-input-stream;1"; const NS_SCRIPTSECURITYMANAGER_CONTRACTID = "@mozilla.org/scriptsecuritymanager;1"; const NS_REFTESTHELPER_CONTRACTID = "@mozilla.org/reftest-helper;1"; const NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX = "@mozilla.org/network/protocol;1?name="; const NS_XREAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1"; const NS_DIRECTORY_SERVICE_CONTRACTID = "@mozilla.org/file/directory_service;1"; const NS_OBSERVER_SERVICE_CONTRACTID = "@mozilla.org/observer-service;1"; Components.utils.import("resource://gre/modules/FileUtils.jsm"); var gLoadTimeout = 0; var gTimeoutHook = null; var gRemote = false; var gIgnoreWindowSize = false; var gTotalChunks = 0; var gThisChunk = 0; var gContainingWindow = null; var gURLFilterRegex = null; const FOCUS_FILTER_ALL_TESTS = "all"; const FOCUS_FILTER_NEEDS_FOCUS_TESTS = "needs-focus"; const FOCUS_FILTER_NON_NEEDS_FOCUS_TESTS = "non-needs-focus"; var gFocusFilterMode = FOCUS_FILTER_ALL_TESTS; // "" const BLANK_URL_FOR_CLEARING = "data:text/html;charset=UTF-8,%3C%21%2D%2DCLEAR%2D%2D%3E"; var gBrowser; // Are we testing web content loaded in a separate process? var gBrowserIsRemote; // bool // Are we using