Loading packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java +0 −28 Original line number Original line Diff line number Diff line Loading @@ -654,34 +654,6 @@ public class VolumeDialogImplTest extends SysuiTestCase { } } } } /** * The click should be a single tap, thus we inject a down and an up event. */ @Test public void clickCaptionsButton_logsUiEvent() { UiEventLoggerFake logger = new UiEventLoggerFake(); Events.sUiEventLogger = logger; MotionEvent down = MotionEventBuilder.newBuilder() .setAction(MotionEvent.ACTION_DOWN).build(); MotionEvent up = MotionEventBuilder.newBuilder() .setAction(MotionEvent.ACTION_UP).build(); mODICaptionsIcon.onTouchEvent(down); mODICaptionsIcon.onTouchEvent(up); mTestableLooper.moveTimeForward(300); // to confirm it was only a single tap mTestableLooper.processAllMessages(); boolean foundCaptionLog = false; for (UiEventLoggerFake.FakeUiEvent event : logger.getLogs()) { if (event.eventId == Events.VolumeDialogEvent.VOLUME_DIALOG_ODI_CAPTIONS_CLICKED.getId()) { foundCaptionLog = true; break; } } Assert.assertTrue("Did not log the captions button click.", foundCaptionLog); } /** /** * Pressing the small x button at top right dismisses the captions tooltip. * Pressing the small x button at top right dismisses the captions tooltip. */ */ Loading Loading
packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java +0 −28 Original line number Original line Diff line number Diff line Loading @@ -654,34 +654,6 @@ public class VolumeDialogImplTest extends SysuiTestCase { } } } } /** * The click should be a single tap, thus we inject a down and an up event. */ @Test public void clickCaptionsButton_logsUiEvent() { UiEventLoggerFake logger = new UiEventLoggerFake(); Events.sUiEventLogger = logger; MotionEvent down = MotionEventBuilder.newBuilder() .setAction(MotionEvent.ACTION_DOWN).build(); MotionEvent up = MotionEventBuilder.newBuilder() .setAction(MotionEvent.ACTION_UP).build(); mODICaptionsIcon.onTouchEvent(down); mODICaptionsIcon.onTouchEvent(up); mTestableLooper.moveTimeForward(300); // to confirm it was only a single tap mTestableLooper.processAllMessages(); boolean foundCaptionLog = false; for (UiEventLoggerFake.FakeUiEvent event : logger.getLogs()) { if (event.eventId == Events.VolumeDialogEvent.VOLUME_DIALOG_ODI_CAPTIONS_CLICKED.getId()) { foundCaptionLog = true; break; } } Assert.assertTrue("Did not log the captions button click.", foundCaptionLog); } /** /** * Pressing the small x button at top right dismisses the captions tooltip. * Pressing the small x button at top right dismisses the captions tooltip. */ */ Loading