Convert LooperExecutorTest in AppRTC Demo into JUnit test
LooperExecutorTest now uses Robolectric instead of being instrumentation test. This allows the test to be run faster and easier. Review-Url: https://codereview.webrtc.org/1989813002 Cr-Commit-Position: refs/heads/master@{#12825}
This commit is contained in:
@ -72,7 +72,7 @@ public class LooperExecutor extends Thread implements Executor {
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Looper.myLooper().quit();
|
||||
handler.getLooper().quit();
|
||||
Log.d(TAG, "Looper thread finished.");
|
||||
}
|
||||
});
|
||||
@ -131,4 +131,10 @@ public class LooperExecutor extends Thread implements Executor {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to the handler for testing purposes.
|
||||
*/
|
||||
Handler getHandler() {
|
||||
return handler;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user