michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDOMWindow; michael@0: interface nsIFile; michael@0: michael@0: [scriptable, uuid(B249B2C0-EE11-11DA-8AD9-0800200C9A66)] michael@0: interface nsILayoutRegressionTester : nsISupports michael@0: { michael@0: /** michael@0: * Dumps the content of a window michael@0: * @param aWindowToDump the window to dump (may be an iframe etc) michael@0: * @param aFile the file to dump to. It will be created if necessary, otherwise michael@0: truncated. If nil, write to stdout. michael@0: * @param aFlagsMask some flags that determine what to dump michael@0: * @param aFlagsMask some flags that determine what to dump michael@0: * @param aResult a status value indicating whether the dump happened, michael@0: whether the page was still loading, or whether some other error happened. michael@0: */ michael@0: const short DUMP_FLAGS_MASK_DEFAULT = 0; michael@0: const short DUMP_FLAGS_MASK_PRINT_MODE = 1; michael@0: michael@0: const long DUMP_RESULT_COMPLETED = 0; // loaded OK michael@0: const long DUMP_RESULT_LOADING = 1; // still loading michael@0: const long DUMP_RESULT_ERROR = 2; // an error occurred michael@0: michael@0: long dumpFrameModel(in nsIDOMWindow aWindowToDump, in nsIFile aFile, in unsigned long aFlagsMask); michael@0: michael@0: /** michael@0: * Compares the contents of frame model files michael@0: * @param aBaseFile the baseline file, opened with read permissions michael@0: * @param aVerFile file containing the results to verify, opened with read permissions michael@0: * @param aFlags flags specifying output verbosity michael@0: * @param aResult result of the comparison: zero if the files are same, non-zero if different michael@0: */ michael@0: const short COMPARE_FLAGS_VERBOSE = 0; michael@0: const short COMPARE_FLAGS_BRIEF = 1; michael@0: boolean compareFrameModels(in nsIFile aBaseFile, in nsIFile aVerFile, in unsigned long aFlags); michael@0: }; michael@0: