1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/nsIFrameUtil.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 +/* utilities for regression tests based on frame tree comparison */ 1.10 + 1.11 +#ifndef nsIFrameUtil_h___ 1.12 +#define nsIFrameUtil_h___ 1.13 + 1.14 +#include <stdio.h> 1.15 +#include "nsISupports.h" 1.16 + 1.17 +/* a6cf90d4-15b3-11d2-932e-00805f8add32 */ 1.18 +#define NS_IFRAME_UTIL_IID \ 1.19 + { 0xa6cf90d6, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}} 1.20 + 1.21 +/** 1.22 + * Frame utility interface 1.23 + */ 1.24 +class nsIFrameUtil : public nsISupports { 1.25 +public: 1.26 + NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFRAME_UTIL_IID) 1.27 + /** 1.28 + * Compare two regression data dumps. The return status will be NS_OK 1.29 + * if the trees compare favoribly, otherwise the return will indicate 1.30 + * NS_ERROR_FAILURE. Other return status's will indicate some other 1.31 + * type of failure. The files, aFile1 and aFile2 are closed before 1.32 + * returning. 1.33 + * aRegressionOutput will vary output, 0 is full output, 1 is brief 1.34 + */ 1.35 + NS_IMETHOD CompareRegressionData(FILE* aFile1, FILE* aFile2,int32_t aRegressionOutput) = 0; 1.36 + 1.37 + /** 1.38 + * Display the regression dump data stored in aInputFile1 to 1.39 + * aOutputFile . The file is closed before returning. If the 1.40 + * regression data is in error somehow then NS_ERROR_FAILURE will be 1.41 + * returned. 1.42 + */ 1.43 + NS_IMETHOD DumpRegressionData(FILE* aInputFile, FILE* aOutputFile) = 0; 1.44 +}; 1.45 + 1.46 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIFrameUtil, NS_IFRAME_UTIL_IID) 1.47 + 1.48 +#endif /* nsIFrameUtil_h___ */