/* -*- indent-tabs-mode: nil; js-indent-level: 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 var CC = Components.classes; const CI = Components.interfaces; const CR = Components.results; const CU = Components.utils; 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"; CU.import("resource://gre/modules/FileUtils.jsm"); CU.import("chrome://reftest/content/httpd.jsm", this); CU.import("resource://gre/modules/Services.jsm"); var gLoadTimeout = 0; var gTimeoutHook = null; var gRemote = false; var gIgnoreWindowSize = false; var gShuffle = false; var gTotalChunks = 0; var gThisChunk = 0; var gContainingWindow = null; var gURLFilterRegex = {}; 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 var gB2GisMulet; // bool // Are we using