Bug 1627354: Part 4 - Update junit tests to reflect changes caused by the upgrade to platform 29; r=agi

Differential Revision: https://phabricator.services.mozilla.com/D69634

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Aaron Klotz 2020-04-04 03:15:57 +00:00
parent cbad7b5792
commit 914c70e06f
2 changed files with 3 additions and 2 deletions

View File

@ -1006,6 +1006,7 @@ class AccessibilityTest : BaseSessionTest() {
override fun onWinStateChanged(event: AccessibilityEvent) { }
@AssertCalled(count = 1)
@Suppress("deprecation")
override fun onFocused(event: AccessibilityEvent) {
nodeId = getSourceId(event)
var node = createNodeInfo(nodeId)

View File

@ -239,7 +239,7 @@ class SelectionActionDelegateTest : BaseSessionTest() {
private fun withClipboard(content: String = "", lambda: () -> Unit) {
val oldClip = clipboard.primaryClip
try {
clipboard.primaryClip = ClipData.newPlainText("", content)
clipboard.setPrimaryClip(ClipData.newPlainText("", content))
sessionRule.addExternalDelegateUntilTestEnd(
ClipboardManager.OnPrimaryClipChangedListener::class,
@ -248,7 +248,7 @@ class SelectionActionDelegateTest : BaseSessionTest() {
ClipboardManager.OnPrimaryClipChangedListener {})
lambda()
} finally {
clipboard.primaryClip = oldClip ?: ClipData.newPlainText("", "")
clipboard.setPrimaryClip(oldClip ?: ClipData.newPlainText("", ""))
}
}