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 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test for Login Manager</title>
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script type="text/javascript" src="pwmgr_common.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 </head>
9 <body>
10 Login Manager test: forms with no password fields
11 <p id="display"></p>
13 <div id="content" style="display: none">
15 <!-- Form with no user field or password field -->
16 <form id="form1" action="formtest.js">
17 <button type="submit">Submit</button>
18 <button type="reset"> Reset </button>
19 </form>
21 <!-- Form with no user field or password field, but one other field -->
22 <form id="form2" action="formtest.js">
23 <input type="checkbox">
24 <button type="submit">Submit</button>
25 <button type="reset"> Reset </button>
26 </form>
28 <!-- Form with no user field or password field, but one other field -->
29 <form id="form3" action="formtest.js">
30 <input type="checkbox" name="uname" value="">
31 <button type="submit">Submit</button>
32 <button type="reset"> Reset </button>
33 </form>
35 <!-- Form with a text field, but no password field -->
36 <form id="form4" action="formtest.js">
37 <input type="text" name="yyyyy">
39 <button type="submit">Submit</button>
40 <button type="reset"> Reset </button>
41 </form>
43 <!-- Form with a user field, but no password field -->
44 <form id="form5" action="formtest.js">
45 <input type="text" name="uname">
47 <button type="submit">Submit</button>
48 <button type="reset"> Reset </button>
49 </form>
51 </div>
53 <pre id="test">
54 <script class="testbody" type="text/javascript">
56 /** Test for Login Manager: form fill, no password fields. **/
58 commonInit();
60 function startTest() {
61 is($_(3, "uname").value, "", "Checking for unfilled checkbox (form 3)");
62 is($_(4, "yyyyy").value, "", "Checking for unfilled text field (form 4)");
63 is($_(5, "uname").value, "", "Checking for unfilled text field (form 5)");
65 SimpleTest.finish();
66 }
68 window.onload = startTest;
70 SimpleTest.waitForExplicitFinish();
71 </script>
72 </pre>
73 </body>
74 </html>