summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-08-14 12:08:33 +0100
committerSteve Block <steveblock@google.com>2009-08-14 16:43:28 +0100
commita8dfe24da014b52d7ae93c3fbd7a8b88ec336572 (patch)
tree5ce05e072d70a9eac1da723634ac103ff53bdb90 /tests/DumpRenderTree
parent68e530047786b4f9d219d17652d7429e6e5a21bd (diff)
downloadframeworks_base-a8dfe24da014b52d7ae93c3fbd7a8b88ec336572.zip
frameworks_base-a8dfe24da014b52d7ae93c3fbd7a8b88ec336572.tar.gz
frameworks_base-a8dfe24da014b52d7ae93c3fbd7a8b88ec336572.tar.bz2
Adds the ability to configure the mock Geolocation service from DumpRenderTree.
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java b/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java
index 97a8b25..b61b307 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java
@@ -18,6 +18,7 @@ package com.android.dumprendertree;
import android.os.Handler;
import android.os.Message;
+import android.webkit.MockGeolocation;
import android.webkit.WebStorage;
import java.util.HashMap;
@@ -325,7 +326,7 @@ public class CallbackProxy extends Handler implements EventSender, LayoutTestCon
}
public void setWindowIsKey(boolean b) {
- obtainMessage(LAYOUT_SET_WINDOW_KEY,b ? 1 : 0, 0).sendToTarget();
+ obtainMessage(LAYOUT_SET_WINDOW_KEY, b ? 1 : 0, 0).sendToTarget();
}
public void testRepaint() {
@@ -352,4 +353,15 @@ public class CallbackProxy extends Handler implements EventSender, LayoutTestCon
obtainMessage(LAYOUT_SET_CAN_OPEN_WINDOWS).sendToTarget();
}
+ public void setMockGeolocationPosition(double latitude,
+ double longitude,
+ double accuracy) {
+ MockGeolocation.getInstance().setPosition(latitude,
+ longitude,
+ accuracy);
+ }
+
+ public void setMockGeolocationError(int code, String message) {
+ MockGeolocation.getInstance().setError(code, message);
+ }
}