The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.dumprendertree; |
| 18 | |
| 19 | public interface LayoutTestController { |
| 20 | |
Ben Murdoch | 357d280 | 2010-07-23 16:18:58 +0100 | [diff] [blame] | 21 | public void dumpAsText(boolean enablePixelTests); |
| 22 | public void dumpChildFramesAsText(); |
| 23 | public void waitUntilDone(); |
| 24 | public void notifyDone(); |
| 25 | |
| 26 | // Force a redraw of the page |
| 27 | public void display(); |
| 28 | // Used with pixel dumps of content |
| 29 | public void testRepaint(); |
| 30 | |
| 31 | // If the page title changes, add the information to the output. |
| 32 | public void dumpTitleChanges(); |
| 33 | public void dumpBackForwardList(); |
| 34 | public void dumpChildFrameScrollPositions(); |
| 35 | public void dumpEditingCallbacks(); |
| 36 | |
| 37 | // Show/Hide window for window.onBlur() testing |
| 38 | public void setWindowIsKey(boolean b); |
| 39 | // Mac function, used to disable events going to the window |
| 40 | public void setMainFrameIsFirstResponder(boolean b); |
| 41 | |
| 42 | public void dumpSelectionRect(); |
| 43 | |
| 44 | // invalidate and draw one line at a time of the web view. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 45 | public void repaintSweepHorizontally(); |
| 46 | |
| 47 | // History testing functions |
| 48 | public void keepWebHistory(); |
| 49 | public void clearBackForwardList(); |
| 50 | // navigate after page load has finished |
| 51 | public void queueBackNavigation(int howfar); |
| 52 | public void queueForwardNavigation(int howfar); |
| 53 | |
| 54 | // Reload when the page load has finished |
| 55 | public void queueReload(); |
| 56 | // Execute the provided script in current context when page load has finished. |
| 57 | public void queueScript(String scriptToRunInCurrentContext); |
| 58 | // Load the provided URL into the provided frame |
| 59 | public void queueLoad(String Url, String frameTarget); |
| 60 | |
| 61 | public void setAcceptsEditing(boolean b); |
Ben Murdoch | e6f3e45 | 2009-04-22 16:02:31 +0100 | [diff] [blame] | 62 | |
| 63 | // For storage tests |
| 64 | public void dumpDatabaseCallbacks(); |
| 65 | public void setCanOpenWindows(); |
Steve Block | dad347c | 2009-08-19 18:46:34 +0100 | [diff] [blame] | 66 | |
| 67 | // For Geolocation tests |
| 68 | public void setGeolocationPermission(boolean allow); |
Steve Block | fb0de34 | 2010-03-19 18:48:35 +0000 | [diff] [blame] | 69 | |
| 70 | public void overridePreference(String key, boolean value); |
Elliott Slaughter | 5dc0c82 | 2010-06-22 11:31:54 -0700 | [diff] [blame] | 71 | |
| 72 | // For XSSAuditor tests |
| 73 | public void setXSSAuditorEnabled(boolean flag); |
Steve Block | 68dede3 | 2010-08-04 10:28:46 +0100 | [diff] [blame] | 74 | |
| 75 | // For DeviceOrientation tests |
| 76 | public void setMockDeviceOrientation(boolean canProvideAlpha, double alpha, |
| 77 | boolean canProvideBeta, double beta, boolean canProvideGamma, double gamma); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 78 | } |