layout/tools/layout-debug/src/nsILayoutRegressionTester.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/tools/layout-debug/src/nsILayoutRegressionTester.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIDOMWindow;
    1.12 +interface nsIFile;
    1.13 +
    1.14 +[scriptable, uuid(B249B2C0-EE11-11DA-8AD9-0800200C9A66)]
    1.15 +interface nsILayoutRegressionTester : nsISupports
    1.16 +{
    1.17 +  /**
    1.18 +   * Dumps the content of a window
    1.19 +   * @param aWindowToDump       the window to dump (may be an iframe etc)
    1.20 +   * @param aFile               the file to dump to. It will be created if necessary, otherwise
    1.21 +                                truncated. If nil, write to stdout.
    1.22 +   * @param aFlagsMask          some flags that determine what to dump
    1.23 +   * @param aFlagsMask          some flags that determine what to dump
    1.24 +   * @param aResult             a status value indicating whether the dump happened, 
    1.25 +                                whether the page was still loading, or whether some other error happened.
    1.26 +   */
    1.27 +  const short DUMP_FLAGS_MASK_DEFAULT        = 0;
    1.28 +  const short DUMP_FLAGS_MASK_PRINT_MODE     = 1;
    1.29 +  
    1.30 +  const long DUMP_RESULT_COMPLETED           = 0;   // loaded OK
    1.31 +  const long DUMP_RESULT_LOADING             = 1;   // still loading
    1.32 +  const long DUMP_RESULT_ERROR               = 2;   // an error occurred
    1.33 +  
    1.34 +  long dumpFrameModel(in nsIDOMWindow aWindowToDump, in nsIFile aFile, in unsigned long aFlagsMask);
    1.35 +
    1.36 +  /**
    1.37 +   * Compares the contents of frame model files
    1.38 +   * @param aBaseFile           the baseline file, opened with read permissions
    1.39 +   * @param aVerFile            file containing the results to verify, opened with read permissions
    1.40 +   * @param aFlags              flags specifying output verbosity
    1.41 +   * @param aResult             result of the comparison: zero if the files are same, non-zero if different
    1.42 +   */
    1.43 +  const short COMPARE_FLAGS_VERBOSE        = 0;
    1.44 +  const short COMPARE_FLAGS_BRIEF          = 1;
    1.45 +  boolean compareFrameModels(in nsIFile aBaseFile, in nsIFile aVerFile, in unsigned long aFlags);
    1.46 +};
    1.47 +

mercurial