Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 <html>
2 <head>
3 <title>Subtest for Login Manager notifications (private browsing)</title>
4 <script type="text/javascript" src="pwmgr_common.js"></script>
5 </head>
6 <body>
7 <h2>Subtest 4</h2>
8 <!--
9 Make sure that the user/pass fields have manual filling enabled
10 in private mode.
11 -->
12 <form id="form" action="formsubmit.sjs">
13 <input id="user" name="user" type="text">
14 <input id="pass" name="pass" type="password">
15 <button type='submit'>Submit</button>
16 </form>
18 <script>
19 function startAutocomplete() {
20 userField.focus();
21 doKey("down");
22 setTimeout(submitForm, 100);
23 }
25 function submitForm() {
26 doKey("down");
27 doKey("return");
28 setTimeout(function(){ form.submit(); }, 100);
29 }
31 window.onload = startAutocomplete;
32 var form = document.getElementById("form");
33 var userField = document.getElementById("user");
35 </script>
36 </body>
37 </html>