Bug 1492308 - 3. Add test for tapping after content crash; r=snorp
authorJim Chen <nchen@mozilla.com>
Tue, 02 Oct 2018 19:59:34 +0000
changeset 439284 7893e8aae29590b426a71fb7fe151dc75b385143
parent 439283 8ab31240dbec5dbe913462a7d68dfa3f5526cdce
child 439285 17a45b4d6fd5c7f36c6ba8004e615d4d348c3cbd
push id34760
push userdvarga@mozilla.com
push dateWed, 03 Oct 2018 04:19:01 +0000
treeherdermozilla-central@9e0a27bf253e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1492308
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1492308 - 3. Add test for tapping after content crash; r=snorp Add a test for the crash scenario where PZC is used after content crashes and restarts. Differential Revision: https://phabricator.services.mozilla.com/D7108
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
@@ -101,16 +101,43 @@ class ContentDelegateTest : BaseSessionT
             override fun onPageStop(session: GeckoSession, success: Boolean) {
                 assertThat("Page should load successfully", success, equalTo(true))
             }
         })
     }
 
     @IgnoreCrash
     @ReuseSession(false)
+    @WithDisplay(width = 10, height = 10)
+    @Test fun crashContent_tapAfterCrash() {
+        // This test doesn't make sense without multiprocess
+        assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
+        // Cannot test x86 debug builds due to Gecko's "ah_crap_handler"
+        // that waits for debugger to attach during a SIGSEGV.
+        assumeThat(sessionRule.env.isDebugBuild && sessionRule.env.cpuArch == "x86",
+                   equalTo(false))
+
+        mainSession.delegateUntilTestEnd(object : Callbacks.ContentDelegate {
+            override fun onCrash(session: GeckoSession) {
+                mainSession.open()
+                mainSession.loadTestPath(HELLO_HTML_PATH)
+            }
+        })
+
+        mainSession.synthesizeTap(5, 5)
+        mainSession.loadUri(CONTENT_CRASH_URL)
+        mainSession.waitForPageStop()
+
+        mainSession.synthesizeTap(5, 5)
+        mainSession.reload()
+        mainSession.waitForPageStop()
+    }
+
+    @IgnoreCrash
+    @ReuseSession(false)
     @Test fun crashContentMultipleSessions() {
         // This test doesn't make sense without multiprocess
         assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
         // Cannot test x86 debug builds due to Gecko's "ah_crap_handler"
         // that waits for debugger to attach during a SIGSEGV.
         assumeThat(sessionRule.env.isDebugBuild && sessionRule.env.cpuArch == "x86",
                    equalTo(false))