зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1810392 - Upgrde spotless to 6.12.1 to use ktlint 0.47.1. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D166891
This commit is contained in:
Родитель
148d5639c3
Коммит
c86668c19c
|
@ -116,7 +116,7 @@ buildscript {
|
|||
classpath 'org.mozilla.apilint:apilint:0.5.2'
|
||||
classpath 'com.android.tools.build:gradle:7.2.2'
|
||||
classpath 'org.apache.commons:commons-exec:1.3'
|
||||
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.10.0'
|
||||
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.12.1'
|
||||
classpath 'org.tomlj:tomlj:1.0.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ subprojects {
|
|||
include '**/*.kt'
|
||||
exclude '**/thirdparty/**'
|
||||
}
|
||||
ktlint('0.46.1')
|
||||
ktlint('0.47.1')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1305,16 +1305,19 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
"#user2" to "bar",
|
||||
"#pass2" to "baz"
|
||||
) +
|
||||
if (Build.VERSION.SDK_INT >= 19) mapOf(
|
||||
"#email1" to "a@b.c",
|
||||
"#number1" to "24",
|
||||
"#tel1" to "42"
|
||||
)
|
||||
else mapOf(
|
||||
"#email1" to "bar",
|
||||
"#number1" to "",
|
||||
"#tel1" to "bar"
|
||||
)
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
mapOf(
|
||||
"#email1" to "a@b.c",
|
||||
"#number1" to "24",
|
||||
"#tel1" to "42"
|
||||
)
|
||||
} else {
|
||||
mapOf(
|
||||
"#email1" to "bar",
|
||||
"#number1" to "",
|
||||
"#tel1" to "bar"
|
||||
)
|
||||
}
|
||||
|
||||
// Set up promises to monitor the values changing.
|
||||
val promises = autoFills.flatMap { entry ->
|
||||
|
@ -1359,8 +1362,12 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
}
|
||||
|
||||
val args = Bundle(1)
|
||||
val value = if (child.isPassword) "baz" else {
|
||||
if (Build.VERSION.SDK_INT < 19) "bar" else {
|
||||
val value = if (child.isPassword) {
|
||||
"baz"
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT < 19) {
|
||||
"bar"
|
||||
} else {
|
||||
when (child.inputType) {
|
||||
InputType.TYPE_CLASS_TEXT or
|
||||
InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS -> "a@b.c"
|
||||
|
@ -1378,7 +1385,9 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
}
|
||||
val ACTION_SET_TEXT = if (Build.VERSION.SDK_INT >= 21) {
|
||||
AccessibilityNodeInfo.ACTION_SET_TEXT
|
||||
} else 0x200000
|
||||
} else {
|
||||
0x200000
|
||||
}
|
||||
|
||||
args.putCharSequence(ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, value)
|
||||
assertThat(
|
||||
|
@ -1415,14 +1424,19 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
): Int {
|
||||
val info = createNodeInfo(id)
|
||||
return (
|
||||
if (cond(info) && info.className != "android.webkit.WebView") 1
|
||||
else 0
|
||||
if (cond(info) && info.className != "android.webkit.WebView") {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
) + (
|
||||
if (info.childCount > 0) {
|
||||
(0 until info.childCount).sumOf {
|
||||
countAutoFillNodes(cond, info.getChildId(it))
|
||||
}
|
||||
} else 0
|
||||
} else {
|
||||
0
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -141,8 +141,11 @@ open class BaseSessionTest(noErrorCollector: Boolean = false) {
|
|||
|
||||
fun <T> assertThat(reason: String, v: T, m: Matcher<in T>) = sessionRule.checkThat(reason, v, m)
|
||||
fun <T> assertInAutomationThat(reason: String, v: T, m: Matcher<in T>) =
|
||||
if (sessionRule.env.isAutomation) assertThat(reason, v, m)
|
||||
else assumeThat(reason, v, m)
|
||||
if (sessionRule.env.isAutomation) {
|
||||
assertThat(reason, v, m)
|
||||
} else {
|
||||
assumeThat(reason, v, m)
|
||||
}
|
||||
|
||||
init {
|
||||
if (!noErrorCollector) {
|
||||
|
|
|
@ -1955,7 +1955,7 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
|
|||
|
||||
mainSession.reload()
|
||||
mainSession.waitForPageStop()
|
||||
mainSession.forCallbacksDuringWait(Runnable @AssertCalled(count = 1) {})
|
||||
mainSession.forCallbacksDuringWait(Runnable @AssertCalled(count = 1) {}) // ktlint-disable annotation
|
||||
|
||||
assertThat("Delegate should be unregistered after wait", delegate, nullValue())
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче