/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 2 0 ĠThe ĠAndroid ĠOpen ĠSource ĠProject Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ package Ġcom . android . tools . idea . emulator . actions Ċ Ċ import Ġcom . android . emulator . control . The ming Style Ċ import Ġcom . android . tools . adt ui . swing . enable Head less Dialog s Ċ import Ġcom . android . tools . idea . emulator . Em ulator View Rule Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġcom . intellij . test Framework . Ed t Rule Ċ import Ġcom . intellij . test Framework . Runs In Ed t Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . rules . Rule Chain Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ /** Ċ Ġ* ĠTests Ġfor Ġ[ Em ulator Show Extended Controls Action ]. Ċ Ġ*/ Ċ @ Runs In Ed t Ċ class ĠEm ulator Show Extended Controls Action Test Ġ{ ĊĠ Ġprivate Ġval Ġemulator View Rule Ġ= ĠEm ulator View Rule () ĊĠ Ġ@ get : Rule ĊĠ Ġval Ġrule Chain : ĠRule Chain Ġ= ĠRule Chain . outer Rule ( emulator View Rule ). around ( Ed t Rule ()) ĊĊĠ Ġ@ Before ĊĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠ Ġenable Head less Dialog s ( emulator View Rule . test Root Disposable ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Show Extended Controls () Ġ{ ĊĠĠĠ Ġval Ġview Ġ= Ġemulator View Rule . new Em ulator View () ĊĠĠĠ Ġemulator View Rule . execute Action (" android . emulator . extended . controls ", Ġview ) ĊĊĠĠĠ Ġval Ġemulator Ġ= Ġemulator View Rule . get Fake Em ulator ( view ) ĊĠĠĠ Ġvar Ġcall Ġ= Ġemulator . getNext Grpc Call ( 2 , ĠTimeUnit . SECONDS ) ĊĠĠĠ ĠassertThat ( call . methodName ). isEqualTo (" android . em ulation . control . Ui Controller / set Ui Theme ") ĊĠĠĠ ĠassertThat ( call . request ). isEqualTo ( The ming Style . getDefaultInstance ()) ĊĠĠĠ Ġcall Ġ= Ġemulator . getNext Grpc Call ( 1 , ĠTimeUnit . SECONDS ) ĊĠĠĠ ĠassertThat ( call . methodName ). isEqualTo (" android . em ulation . control . Ui Controller / show Extended Controls ") ĊĠ Ġ} Ċ } Ċ