2 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
28 interface LayoutTestController {
31 void dumpChildFramesAsText();
36 void dumpBackForwardList();
37 void dumpChildFrameScrollPositions();
38 void dumpEditingCallbacks();
39 void dumpSelectionRect();
40 void dumpStatusCallbacks();
41 void dumpTitleChanges();
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 void setAllowUniversalAccessFromFileURLs(in boolean value);
50 void setAllowFileAccessFromFileURLs(in boolean value);
52 // Special DOM functions.
53 void clearBackForwardList();
54 object computedStyleIncludingVisitedInfo(in object element);
55 DOMString counterValueForElementById(in DOMString elementId);
56 void execCommand(in DOMString name, in DOMString argument);
57 boolean isCommandEnabled(in DOMString name);
58 DOMString markerTextForListItem(in object element);
59 unsigned long windowCount();
60 object shadowRoot(in object element);
64 void repaintSweepHorizontally();
68 int numberOfPages(in double pageWidthInPixels, in double pageHeightInPixels);
69 int pageNumberForElementById(in DOMString id, in double pageWidthInPixels, in double pageHeightInPixels);
70 DOMString pageSizeAndMarginsInPixels(in int pageIndex, in int width, in int height, in int marginTop, in int marginRight, in int marginBottom, in int marginLeft);
73 int numberOfActiveAnimations();
74 boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
75 void suspendAnimations();
76 void resumeAnimations();
78 // UserContent testing.
79 void addUserScript(in DOMString source, in boolean runAtStart, in boolean allFrames);
80 void addUserStyleSheet(in DOMString source, in boolean allFrames);
83 void clearAllDatabases();
84 void setDatabaseQuota(in unsigned long long quota);
86 // Compositing testing.
87 DOMString layerTreeAsText();
89 // Text search testing.
90 boolean findString(in DOMString target, in object optionsArray);
92 // Evaluating script in a special context.
93 [PassContext] void evaluateScriptInIsolatedWorld(in unsigned long worldID, in DOMString script);
95 // For Web Inspector tests
96 void showWebInspector();
97 void closeWebInspector();
98 void evaluateInWebInspector(in long callID, in DOMString script);
99 void setTimelineProfilingEnabled(in boolean enabled);
101 void setPOSIXLocale(in DOMString locale);
103 void setWillSendRequestReturnsNull(in boolean flag);