LayoutTestController.idl revision 2fc2651226baac27029e38c9d6ef883fa32084db
1/* 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 23 * THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26module WTR { 27 28 interface LayoutTestController { 29 // The basics. 30 void dumpAsText(); 31 void dumpChildFramesAsText(); 32 void waitUntilDone(); 33 void notifyDone(); 34 35 // Other dumping. 36 void dumpBackForwardList(); 37 void dumpChildFrameScrollPositions(); 38 void dumpEditingCallbacks(); 39 void dumpSelectionRect(); 40 void dumpStatusCallbacks(); 41 void dumpTitleChanges(); 42 43 // Special options. 44 void keepWebHistory(); 45 void setAcceptsEditing(in boolean value); 46 void setCanOpenWindows(in boolean value); 47 void setCloseRemainingWindowsWhenComplete(in boolean value); 48 void setXSSAuditorEnabled(in boolean value); 49 50 // Special DOM functions. 51 void clearBackForwardList(); 52 object computedStyleIncludingVisitedInfo(in object element); 53 DOMString counterValueForElementById(in DOMString elementId); 54 void execCommand(in DOMString name, in DOMString argument); 55 boolean isCommandEnabled(in DOMString name); 56 DOMString markerTextForListItem(in object element); 57 unsigned long windowCount(); 58 59 // Repaint testing. 60 void testRepaint(); 61 void repaintSweepHorizontally(); 62 void display(); 63 64 // Animation testing. 65 int numberOfActiveAnimations(); 66 boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId); 67 void suspendAnimations(); 68 void resumeAnimations(); 69 70 // UserContent testing. 71 void addUserScript(in DOMString source, in boolean runAtStart, in boolean allFrames); 72 void addUserStyleSheet(in DOMString source, in boolean allFrames); 73 74 // Compositing testing. 75 DOMString layerTreeAsText(); 76 77 // Text search testing. 78 boolean findString(in DOMString target, in object optionsArray); 79 80 // Evaluating script in a special context. 81 [PassContext] void evaluateScriptInIsolatedWorld(in unsigned long worldID, in DOMString script); 82 83 // For Web Inspector tests 84 void showWebInspector(); 85 void closeWebInspector(); 86 void evaluateInWebInspector(in long callID, in DOMString script); 87 void setTimelineProfilingEnabled(in boolean enabled); 88 89 void setPOSIXLocale(in DOMString locale); 90 91 void setWillSendRequestReturnsNull(in boolean flag); 92 }; 93 94} 95