diff options
author | Brian Muramatsu <btmura@android.com> | 2011-06-13 11:35:10 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2011-06-13 11:35:10 -0700 |
commit | 248ec83f3eacb98b3aa06709cbe4e3601ea17f65 (patch) | |
tree | c57aadf220bda4bad5f82fbd7fba5f8f3ed16e7b | |
parent | 0ff8994a12eaf311c840f51db0458562abcf78c7 (diff) | |
parent | ad6152527baa023c3d6e07f58042d48fb7e2ea1c (diff) | |
download | platform_cts-248ec83f3eacb98b3aa06709cbe4e3601ea17f65.tar.gz platform_cts-248ec83f3eacb98b3aa06709cbe4e3601ea17f65.tar.bz2 platform_cts-248ec83f3eacb98b3aa06709cbe4e3601ea17f65.zip |
Merge "Wait for completing the initialization of WebViewCore" into gingerbread
-rwxr-xr-x | tests/tests/webkit/src/android/webkit/cts/WebViewTest.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java index 05ff747006d..6e0be6c7c62 100755 --- a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java +++ b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java @@ -908,14 +908,21 @@ public class WebViewTest extends ActivityInstrumentationTestCase2<WebViewStubAct args = {String.class}, notes = "Cannot check highlighting" ) - @UiThreadTest - public void testFindAll() throws InterruptedException { - String p = "<p>Find all instances of find on the page and highlight them.</p>"; + public void testFindAll() throws Throwable { + getActivity().runOnUiThread(new Runnable() { + public void run() { + String p = "<p>Find all instances of find on the page and highlight them.</p>"; - mWebView.loadData("<html><body>" + p + "</body></html>", "text/html", "UTF-8"); + mWebView.loadData("<html><body>" + p +"</body></html>", "text/html", "UTF-8"); + } + }); waitForLoadComplete(mWebView, TEST_TIMEOUT); - assertEquals(2, mWebView.findAll("find")); + runTestOnUiThread(new Runnable() { + public void run() { + assertEquals(2, mWebView.findAll("find")); + } + }); } @TestTargets({ |