Bug 1538458 - Part 2. Update tests that includes fieldset r=geckoview-reviewers,snorp
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 07 May 2019 20:17:28 +0000
changeset 532005 84191877561ed6ad1e5905b703c2c5865836c45b
parent 532004 b0c3aa221224b5f3c6f60079756791a04fe33602
child 532006 93a295bd607a733eab067b252399fa53c1872608
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, snorp
bugs1538458
milestone68.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 1538458 - Part 2. Update tests that includes fieldset r=geckoview-reviewers,snorp Update this junit test with this bug's test case. Actually, autofill_userpass doesn't work with the latest GV, so I should like to update this to fix focus timing. Also, this does't run on our test infra because this requires API 26. Differential Revision: https://phabricator.services.mozilla.com/D30178
mobile/android/geckoview/src/androidTest/assets/www/forms2.html
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt
--- a/mobile/android/geckoview/src/androidTest/assets/www/forms2.html
+++ b/mobile/android/geckoview/src/androidTest/assets/www/forms2.html
@@ -1,16 +1,18 @@
 <html>
     <head><title>Forms2</title></head>
     <body>
         <form>
-            <input type="text" id="firstname">
-            <input type="text" id="lastname">
-            <input type="text" id="user1" value="foo">
-            <input type="password" id="pass1" value="foo">
+            <fieldset>
+                <input type="text" id="firstname">
+                <input type="text" id="lastname">
+                <input type="text" id="user1" value="foo">
+                <input type="password" id="pass1" value="foo" autofocus>
+            </fieldset>
         </form>
         <iframe id="iframe"></iframe>
     <script>
         addEventListener("load", function(e) {
             if (window.parent === window) {
                 document.getElementById("iframe").contentWindow.location.href = window.location.href;
             }
         });
--- 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
@@ -417,23 +417,16 @@ class ContentDelegateTest : BaseSessionT
         mainSession.loadTestPath(FORMS2_HTML_PATH)
         // Wait for the auto-fill nodes to populate.
         sessionRule.waitUntilCalled(object : Callbacks.TextInputDelegate {
             @AssertCalled(count = 2)
             override fun notifyAutoFill(session: GeckoSession, notification: Int, virtualId: Int) {
             }
         })
 
-        mainSession.evaluateJS("$('#pass1').focus()")
-        sessionRule.waitUntilCalled(object : Callbacks.TextInputDelegate {
-            @AssertCalled(count = 1)
-            override fun notifyAutoFill(session: GeckoSession, notification: Int, virtualId: Int) {
-            }
-        })
-
         val rootNode = ViewNode.newInstance()
         val rootStructure = ViewNodeBuilder.newInstance(AssistStructure(), rootNode,
                 /* async */ false) as ViewStructure
 
         // Perform auto-fill and return number of auto-fills performed.
         fun checkAutoFillChild(child: AssistStructure.ViewNode): Int {
             var sum = 0
             // Seal the node info instance so we can perform actions on it.