Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / mojo / android / javatests / src / org / chromium / mojo / MojoTestCase.java
index 3adb2fb..49ffd48 100644 (file)
@@ -38,12 +38,26 @@ public class MojoTestCase extends InstrumentationTestCase {
         super.tearDown();
     }
 
+    /**
+     * Runs the run loop for the given time.
+     */
+    protected void runLoop(long timeoutMS) {
+        nativeRunLoop(timeoutMS);
+    }
+
+    /**
+     * Runs the run loop until no handle or task are immediately available.
+     */
+    protected void runLoopUntilIdle() {
+        nativeRunLoop(0);
+    }
+
     private native void nativeInitApplicationContext(Context context);
 
     private native long nativeSetupTestEnvironment();
 
     private native void nativeTearDownTestEnvironment(long testEnvironment);
 
-    protected native void nativeRunLoop(long timeoutMS);
+    private native void nativeRunLoop(long timeoutMS);
 
 }