From f48f8ed0ee16fff112a3742f989cb867b1524460 Mon Sep 17 00:00:00 2001 From: James Willcox Date: Wed, 10 Jun 2020 05:44:48 +0000 Subject: [PATCH] Bug 1643129 - Add a reload to GV auth prompt test r=geckoview-reviewers,aklotz This is needed in order to catch certain problems with LoginStorage.jsm. Differential Revision: https://phabricator.services.mozilla.com/D78142 --- .../mozilla/geckoview/test/PromptDelegateTest.kt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/PromptDelegateTest.kt b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/PromptDelegateTest.kt index 964d43fcdaa6..8c8325970293 100644 --- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/PromptDelegateTest.kt +++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/PromptDelegateTest.kt @@ -102,16 +102,20 @@ class PromptDelegateTest : BaseSessionTest() { }) } - @Test fun authTest() { - sessionRule.session.loadTestPath("/basic-auth/foo/bar") - - sessionRule.waitUntilCalled(object : Callbacks.PromptDelegate { - @AssertCalled(count = 1) + @Test fun dismissAuthTest() { + sessionRule.delegateUntilTestEnd(object : Callbacks.PromptDelegate { + @AssertCalled(count = 2) override fun onAuthPrompt(session: GeckoSession, prompt: PromptDelegate.AuthPrompt): GeckoResult? { //TODO: Figure out some better testing here. return null } }) + + mainSession.loadTestPath("/basic-auth/foo/bar") + mainSession.waitForPageStop() + + mainSession.reload() + mainSession.waitForPageStop() } @Test fun buttonTest() {