diff options
author | Guang Zhu <guangzhu@google.com> | 2011-05-18 10:02:22 -0700 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2011-05-18 10:14:44 -0700 |
commit | c1635bf14ea1e7b388959b263bc21c0d8d77cda3 (patch) | |
tree | c9cae76cb764c386ccba9ca4c0557e28b4c9bbf4 /tests/DumpRenderTree | |
parent | 9516aee4c1b116e7c9d227a894f257a6b782880a (diff) | |
download | frameworks_base-c1635bf14ea1e7b388959b263bc21c0d8d77cda3.zip frameworks_base-c1635bf14ea1e7b388959b263bc21c0d8d77cda3.tar.gz frameworks_base-c1635bf14ea1e7b388959b263bc21c0d8d77cda3.tar.bz2 |
call clearCache from UI thread
according to the warning message, WebView#clearCache now should be
invoked from UI thread only
Change-Id: I089d9dcdcccc353b802a628c539e62f001d361f8
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java index ee5bb5d..d883a32 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LoadTestsAutoTest.java @@ -100,7 +100,7 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel throw new RuntimeException("No test specified"); } - TestShellActivity activity = (TestShellActivity) getActivity(); + final TestShellActivity activity = (TestShellActivity) getActivity(); Log.v(LOGTAG, "About to run tests, calling gc first..."); freeMem(); @@ -109,7 +109,13 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel runTestAndWaitUntilDone(activity, runner.mTestPath, runner.mTimeoutInMillis, runner.mGetDrawTime, runner.mSaveImagePath); - activity.clearCache(); + getInstrumentation().runOnMainSync(new Runnable() { + + @Override + public void run() { + activity.clearCache(); + } + }); if (mForwardServer != null) { mForwardServer.stop(); mForwardServer = null; |