@@ -0,0 +1,974 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.%0A// Use of this source code is governed by a BSD-style license that can be%0A// found in the LICENSE file.%0A%0Apackage org.chromium.base.test;%0A%0Aimport android.app.Instrumentation;%0A%0Aimport java.util.concurrent.Callable;%0Aimport java.util.concurrent.ExecutionException;%0Aimport java.util.concurrent.FutureTask;%0A%0A/**%0A * Utility methods built around the android.app.Instrumentation class.%0A */%0Apublic final class InstrumentationUtils %7B%0A%0A    private InstrumentationUtils() %7B%0A    %7D%0A%0A    public static %3CR%3E R runOnMainSyncAndGetResult(Instrumentation instrumentation,%0A            Callable%3CR%3E callable) throws Throwable %7B%0A        FutureTask%3CR%3E task = new FutureTask%3CR%3E(callable);%0A        instrumentation.runOnMainSync(task);%0A        try %7B%0A            return task.get();%0A        %7D catch (ExecutionException e) %7B%0A            // Unwrap the cause of the exception and re-throw it.%0A            throw e.getCause();%0A        %7D%0A    %7D%0A%7D%0A

Add InstrumentationUtils class.