Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIDOMWindow; |
michael@0 | 9 | interface nsIFile; |
michael@0 | 10 | |
michael@0 | 11 | [scriptable, uuid(B249B2C0-EE11-11DA-8AD9-0800200C9A66)] |
michael@0 | 12 | interface nsILayoutRegressionTester : nsISupports |
michael@0 | 13 | { |
michael@0 | 14 | /** |
michael@0 | 15 | * Dumps the content of a window |
michael@0 | 16 | * @param aWindowToDump the window to dump (may be an iframe etc) |
michael@0 | 17 | * @param aFile the file to dump to. It will be created if necessary, otherwise |
michael@0 | 18 | truncated. If nil, write to stdout. |
michael@0 | 19 | * @param aFlagsMask some flags that determine what to dump |
michael@0 | 20 | * @param aFlagsMask some flags that determine what to dump |
michael@0 | 21 | * @param aResult a status value indicating whether the dump happened, |
michael@0 | 22 | whether the page was still loading, or whether some other error happened. |
michael@0 | 23 | */ |
michael@0 | 24 | const short DUMP_FLAGS_MASK_DEFAULT = 0; |
michael@0 | 25 | const short DUMP_FLAGS_MASK_PRINT_MODE = 1; |
michael@0 | 26 | |
michael@0 | 27 | const long DUMP_RESULT_COMPLETED = 0; // loaded OK |
michael@0 | 28 | const long DUMP_RESULT_LOADING = 1; // still loading |
michael@0 | 29 | const long DUMP_RESULT_ERROR = 2; // an error occurred |
michael@0 | 30 | |
michael@0 | 31 | long dumpFrameModel(in nsIDOMWindow aWindowToDump, in nsIFile aFile, in unsigned long aFlagsMask); |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Compares the contents of frame model files |
michael@0 | 35 | * @param aBaseFile the baseline file, opened with read permissions |
michael@0 | 36 | * @param aVerFile file containing the results to verify, opened with read permissions |
michael@0 | 37 | * @param aFlags flags specifying output verbosity |
michael@0 | 38 | * @param aResult result of the comparison: zero if the files are same, non-zero if different |
michael@0 | 39 | */ |
michael@0 | 40 | const short COMPARE_FLAGS_VERBOSE = 0; |
michael@0 | 41 | const short COMPARE_FLAGS_BRIEF = 1; |
michael@0 | 42 | boolean compareFrameModels(in nsIFile aBaseFile, in nsIFile aVerFile, in unsigned long aFlags); |
michael@0 | 43 | }; |
michael@0 | 44 |