mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1476689 - [2.2] Add basic runtime telemetry test. r=jchen
This commit is contained in:
parent
9db162a5e5
commit
6e519bf333
@ -4,6 +4,7 @@
|
||||
|
||||
package org.mozilla.geckoview.test
|
||||
|
||||
import org.mozilla.gecko.util.GeckoBundle
|
||||
import org.mozilla.geckoview.GeckoResult
|
||||
import org.mozilla.geckoview.GeckoSession
|
||||
import org.mozilla.geckoview.GeckoSessionSettings
|
||||
@ -95,6 +96,23 @@ class NavigationDelegateTest : BaseSessionTest() {
|
||||
containsString(mobileSubStr))
|
||||
}
|
||||
|
||||
@Test fun telemetry() {
|
||||
sessionRule.session.loadTestPath(HELLO_HTML_PATH)
|
||||
sessionRule.waitForPageStop()
|
||||
|
||||
val telemetry = sessionRule.runtime.telemetry
|
||||
val result = sessionRule.waitForResult(telemetry.getSnapshots(true))
|
||||
|
||||
assertThat("Histograms should not be null",
|
||||
result?.get("histograms"), notNullValue())
|
||||
assertThat("Keyed histograms should not be null",
|
||||
result?.get("keyedHistograms"), notNullValue())
|
||||
assertThat("Scalars should not be null",
|
||||
result?.get("scalars"), notNullValue())
|
||||
assertThat("Keyed scalars should not be null",
|
||||
result?.get("keyedScalars"), notNullValue())
|
||||
}
|
||||
|
||||
@Test fun load() {
|
||||
sessionRule.session.loadTestPath(HELLO_HTML_PATH)
|
||||
sessionRule.waitForPageStop()
|
||||
|
Loading…
Reference in New Issue
Block a user