diff options
author | Maksymilian Osowski <maxosowski@google.com> | 2010-09-15 11:27:49 +0100 |
---|---|---|
committer | Maksymilian Osowski <maxosowski@google.com> | 2010-09-15 11:27:49 +0100 |
commit | d96c5e0cb31f486fb30dc836f0e74b2216f2ccc2 (patch) | |
tree | 2ca588ea5443782410d011bad3e7ea94e4b265f9 /tests/DumpRenderTree2 | |
parent | fb5a2d736573ab4b03d615a2dbc3dd84cc78f414 (diff) | |
download | frameworks_base-d96c5e0cb31f486fb30dc836f0e74b2216f2ccc2.zip frameworks_base-d96c5e0cb31f486fb30dc836f0e74b2216f2ccc2.tar.gz frameworks_base-d96c5e0cb31f486fb30dc836f0e74b2216f2ccc2.tar.bz2 |
Added setXSSAuditorEnabled() LayoutTestController function.
Change-Id: I262e434573ee79c998f3ace5103c191fc0989bd2
Diffstat (limited to 'tests/DumpRenderTree2')
-rw-r--r-- | tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java | 4 | ||||
-rw-r--r-- | tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java index ec8409a..e608e2d 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestController.java @@ -106,6 +106,10 @@ public class LayoutTestController { MockGeolocation.getInstance().setPosition(latitude, longitude, accuracy); } + public void setXSSAuditorEnabled(boolean flag) { + mLayoutTestsExecutor.setXSSAuditorEnabled(flag); + } + 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 4c7124b..9a82f84 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java @@ -508,6 +508,7 @@ public class LayoutTestsExecutor extends Activity { private static final int MSG_DUMP_DATABASE_CALLBACKS = 5; private static final int MSG_SET_GEOLOCATION_PERMISSION = 6; private static final int MSG_OVERRIDE_PREFERENCE = 7; + private static final int MSG_SET_XSS_AUDITOR_ENABLED = 8; /** String constants for use with layoutTestController.overridePreference() */ private final String WEBKIT_OFFLINE_WEB_APPLICATION_CACHE_ENABLED = @@ -585,6 +586,10 @@ public class LayoutTestsExecutor extends Activity { } break; + case MSG_SET_XSS_AUDITOR_ENABLED: + mCurrentWebView.getSettings().setXSSAuditorEnabled(msg.arg1 == 1); + break; + case MSG_WAIT_UNTIL_DONE: mCurrentState = CurrentState.WAITING_FOR_ASYNCHRONOUS_TEST; break; @@ -658,6 +663,13 @@ public class LayoutTestsExecutor extends Activity { canProvideGamma, gamma); } + public void setXSSAuditorEnabled(boolean flag) { + Log.i(LOG_TAG, mCurrentTestRelativePath + ": setXSSAuditorEnabled(" + flag + ") called"); + Message msg = mLayoutTestControllerHandler.obtainMessage(MSG_SET_XSS_AUDITOR_ENABLED); + msg.arg1 = flag ? 1 : 0; + msg.sendToTarget(); + } + public void waitUntilDone() { Log.i(LOG_TAG, mCurrentTestRelativePath + ": waitUntilDone() called"); mLayoutTestControllerHandler.sendEmptyMessage(MSG_WAIT_UNTIL_DONE); |