summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree2/src
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-09-14 14:42:31 +0100
committerSteve Block <steveblock@google.com>2010-09-14 14:44:29 +0100
commit5de8b998f571b4318104ec9a3e2f780459ce09e2 (patch)
treedaed84f6ec889c0c8517016a4c8343120706c1c1 /tests/DumpRenderTree2/src
parentd210fd26b2f32fec26c2e7bb355de8b5b3e25b79 (diff)
downloadframeworks_base-5de8b998f571b4318104ec9a3e2f780459ce09e2.zip
frameworks_base-5de8b998f571b4318104ec9a3e2f780459ce09e2.tar.gz
frameworks_base-5de8b998f571b4318104ec9a3e2f780459ce09e2.tar.bz2
Sort LayoutTestController methods alphabetically
This makes it easier to keep trac of which methods are implemented. No functional changes. Change-Id: I389ec5c0f7e77def6a479e387d1373b2b87f60c2
Diffstat (limited to 'tests/DumpRenderTree2/src')
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java58
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java98
2 files changed, 77 insertions, 79 deletions
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java
index a82037e..c9e194f 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java
@@ -35,12 +35,9 @@ public class LayoutTestController {
mLayoutTestsExecutor = layoutTestsExecutor;
}
- public void waitUntilDone() {
- mLayoutTestsExecutor.waitUntilDone();
- }
-
- public void notifyDone() {
- mLayoutTestsExecutor.notifyDone();
+ public void clearAllDatabases() {
+ Log.i(LOG_TAG, "clearAllDatabases() called");
+ WebStorage.getInstance().deleteAllData();
}
public void dumpAsText() {
@@ -55,17 +52,20 @@ public class LayoutTestController {
mLayoutTestsExecutor.dumpChildFramesAsText();
}
- public void clearAllDatabases() {
- Log.i(LOG_TAG, "clearAllDatabases() called");
- WebStorage.getInstance().deleteAllData();
+ public void dumpDatabaseCallbacks() {
+ mLayoutTestsExecutor.dumpDatabaseCallbacks();
}
- public void setCanOpenWindows() {
- mLayoutTestsExecutor.setCanOpenWindows();
+ public void notifyDone() {
+ mLayoutTestsExecutor.notifyDone();
}
- public void dumpDatabaseCallbacks() {
- mLayoutTestsExecutor.dumpDatabaseCallbacks();
+ public void overridePreference(String key, boolean value) {
+ mLayoutTestsExecutor.overridePreference(key, value);
+ }
+
+ public void setCanOpenWindows() {
+ mLayoutTestsExecutor.setCanOpenWindows();
}
public void setDatabaseQuota(long quota) {
@@ -79,21 +79,6 @@ public class LayoutTestController {
mLayoutTestsExecutor.setGeolocationPermission(allow);
}
- public void overridePreference(String key, boolean value) {
- mLayoutTestsExecutor.overridePreference(key, value);
- }
-
- public void setMockGeolocationPosition(double latitude, double longitude, double accuracy) {
- Log.i(LOG_TAG, "setMockGeolocationPosition(): " + "latitude=" + latitude +
- " longitude=" + longitude + " accuracy=" + accuracy);
- MockGeolocation.getInstance().setPosition(latitude, longitude, accuracy);
- }
-
- public void setMockGeolocationError(int code, String message) {
- Log.i(LOG_TAG, "setMockGeolocationError(): " + "code=" + code + " message=" + message);
- MockGeolocation.getInstance().setError(code, message);
- }
-
public void setMockDeviceOrientation(boolean canProvideAlpha, double alpha,
boolean canProvideBeta, double beta, boolean canProvideGamma, double gamma) {
// Configuration is in WebKit, so stay on WebCore thread, but go via LayoutTestsExecutor
@@ -104,4 +89,19 @@ public class LayoutTestController {
mLayoutTestsExecutor.setMockDeviceOrientation(
canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
}
-} \ No newline at end of file
+
+ public void setMockGeolocationError(int code, String message) {
+ Log.i(LOG_TAG, "setMockGeolocationError(): " + "code=" + code + " message=" + message);
+ MockGeolocation.getInstance().setError(code, message);
+ }
+
+ public void setMockGeolocationPosition(double latitude, double longitude, double accuracy) {
+ Log.i(LOG_TAG, "setMockGeolocationPosition(): " + "latitude=" + latitude +
+ " longitude=" + longitude + " accuracy=" + accuracy);
+ MockGeolocation.getInstance().setPosition(latitude, longitude, accuracy);
+ }
+
+ public void waitUntilDone() {
+ mLayoutTestsExecutor.waitUntilDone();
+ }
+}
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
index c997911..4c7124b 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java
@@ -519,24 +519,12 @@ public class LayoutTestsExecutor extends Activity {
assert mCurrentState.isRunningState() : "mCurrentState = " + mCurrentState.name();
switch (msg.what) {
- case MSG_WAIT_UNTIL_DONE:
- mCurrentState = CurrentState.WAITING_FOR_ASYNCHRONOUS_TEST;
- break;
-
- case MSG_NOTIFY_DONE:
- if (mCurrentState == CurrentState.WAITING_FOR_ASYNCHRONOUS_TEST) {
- onTestFinished();
- }
- break;
-
case MSG_DUMP_AS_TEXT:
if (mCurrentResult == null) {
mCurrentResult = new TextResult(mCurrentTestRelativePath);
}
-
assert mCurrentResult instanceof TextResult
: "mCurrentResult instanceof" + mCurrentResult.getClass().getName();
-
break;
case MSG_DUMP_CHILD_FRAMES_AS_TEXT:
@@ -551,27 +539,13 @@ public class LayoutTestsExecutor extends Activity {
((TextResult)mCurrentResult).setDumpChildFramesAsText(true);
break;
- case MSG_SET_CAN_OPEN_WINDOWS:
- mCanOpenWindows = true;
- break;
-
case MSG_DUMP_DATABASE_CALLBACKS:
mDumpDatabaseCallbacks = true;
break;
- case MSG_SET_GEOLOCATION_PERMISSION:
- mIsGeolocationPermissionSet = true;
- mGeolocationPermission = msg.arg1 == 1;
-
- if (mPendingGeolocationPermissionCallbacks != null) {
- Iterator<GeolocationPermissions.Callback> iter =
- mPendingGeolocationPermissionCallbacks.keySet().iterator();
- while (iter.hasNext()) {
- GeolocationPermissions.Callback callback = iter.next();
- String origin = mPendingGeolocationPermissionCallbacks.get(callback);
- callback.invoke(origin, mGeolocationPermission, false);
- }
- mPendingGeolocationPermissionCallbacks = null;
+ case MSG_NOTIFY_DONE:
+ if (mCurrentState == CurrentState.WAITING_FOR_ASYNCHRONOUS_TEST) {
+ onTestFinished();
}
break;
@@ -591,6 +565,30 @@ public class LayoutTestsExecutor extends Activity {
}
break;
+ case MSG_SET_CAN_OPEN_WINDOWS:
+ mCanOpenWindows = true;
+ break;
+
+ case MSG_SET_GEOLOCATION_PERMISSION:
+ mIsGeolocationPermissionSet = true;
+ mGeolocationPermission = msg.arg1 == 1;
+
+ if (mPendingGeolocationPermissionCallbacks != null) {
+ Iterator<GeolocationPermissions.Callback> iter =
+ mPendingGeolocationPermissionCallbacks.keySet().iterator();
+ while (iter.hasNext()) {
+ GeolocationPermissions.Callback callback = iter.next();
+ String origin = mPendingGeolocationPermissionCallbacks.get(callback);
+ callback.invoke(origin, mGeolocationPermission, false);
+ }
+ mPendingGeolocationPermissionCallbacks = null;
+ }
+ break;
+
+ case MSG_WAIT_UNTIL_DONE:
+ mCurrentState = CurrentState.WAITING_FOR_ASYNCHRONOUS_TEST;
+ break;
+
default:
assert false : "msg.what=" + msg.what;
break;
@@ -605,16 +603,6 @@ public class LayoutTestsExecutor extends Activity {
mPendingGeolocationPermissionCallbacks = null;
}
- public void waitUntilDone() {
- Log.i(LOG_TAG, mCurrentTestRelativePath + ": waitUntilDone() called");
- mLayoutTestControllerHandler.sendEmptyMessage(MSG_WAIT_UNTIL_DONE);
- }
-
- public void notifyDone() {
- Log.i(LOG_TAG, mCurrentTestRelativePath + ": notifyDone() called");
- mLayoutTestControllerHandler.sendEmptyMessage(MSG_NOTIFY_DONE);
- }
-
public void dumpAsText(boolean enablePixelTest) {
Log.i(LOG_TAG, mCurrentTestRelativePath + ": dumpAsText(" + enablePixelTest + ") called");
/** TODO: Implement */
@@ -629,22 +617,14 @@ public class LayoutTestsExecutor extends Activity {
mLayoutTestControllerHandler.sendEmptyMessage(MSG_DUMP_CHILD_FRAMES_AS_TEXT);
}
- public void setCanOpenWindows() {
- Log.i(LOG_TAG, mCurrentTestRelativePath + ": setCanOpenWindows() called");
- mLayoutTestControllerHandler.sendEmptyMessage(MSG_SET_CAN_OPEN_WINDOWS);
- }
-
public void dumpDatabaseCallbacks() {
Log.i(LOG_TAG, mCurrentTestRelativePath + ": dumpDatabaseCallbacks() called");
mLayoutTestControllerHandler.sendEmptyMessage(MSG_DUMP_DATABASE_CALLBACKS);
}
- public void setGeolocationPermission(boolean allow) {
- Log.i(LOG_TAG, mCurrentTestRelativePath + ": setGeolocationPermission(" + allow +
- ") called");
- Message msg = mLayoutTestControllerHandler.obtainMessage(MSG_SET_GEOLOCATION_PERMISSION);
- msg.arg1 = allow ? 1 : 0;
- msg.sendToTarget();
+ public void notifyDone() {
+ Log.i(LOG_TAG, mCurrentTestRelativePath + ": notifyDone() called");
+ mLayoutTestControllerHandler.sendEmptyMessage(MSG_NOTIFY_DONE);
}
public void overridePreference(String key, boolean value) {
@@ -656,6 +636,19 @@ public class LayoutTestsExecutor extends Activity {
msg.sendToTarget();
}
+ public void setCanOpenWindows() {
+ Log.i(LOG_TAG, mCurrentTestRelativePath + ": setCanOpenWindows() called");
+ mLayoutTestControllerHandler.sendEmptyMessage(MSG_SET_CAN_OPEN_WINDOWS);
+ }
+
+ public void setGeolocationPermission(boolean allow) {
+ Log.i(LOG_TAG, mCurrentTestRelativePath + ": setGeolocationPermission(" + allow +
+ ") called");
+ Message msg = mLayoutTestControllerHandler.obtainMessage(MSG_SET_GEOLOCATION_PERMISSION);
+ msg.arg1 = allow ? 1 : 0;
+ msg.sendToTarget();
+ }
+
public void setMockDeviceOrientation(boolean canProvideAlpha, double alpha,
boolean canProvideBeta, double beta, boolean canProvideGamma, double gamma) {
Log.i(LOG_TAG, mCurrentTestRelativePath + ": setMockDeviceOrientation(" + canProvideAlpha +
@@ -664,4 +657,9 @@ public class LayoutTestsExecutor extends Activity {
mCurrentWebView.setMockDeviceOrientation(canProvideAlpha, alpha, canProvideBeta, beta,
canProvideGamma, gamma);
}
+
+ public void waitUntilDone() {
+ Log.i(LOG_TAG, mCurrentTestRelativePath + ": waitUntilDone() called");
+ mLayoutTestControllerHandler.sendEmptyMessage(MSG_WAIT_UNTIL_DONE);
+ }
}