browser/devtools/webconsole/test/test-bug-762593-insecure-passwords-about-blank-web-console-warning.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <!doctype html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <meta charset="utf8">
michael@0 5 <title>Bug 762593 - Add warning/error Message to Web Console when the
michael@0 6 page includes Insecure Password fields</title>
michael@0 7 <!-- Any copyright is dedicated to the Public Domain.
michael@0 8 http://creativecommons.org/publicdomain/zero/1.0/ -->
michael@0 9
michael@0 10 <!-- This test tests the scenario where a javascript adds password fields to
michael@0 11 an about:blank iframe inside an insecure web page. It ensures that
michael@0 12 insecure password fields like those are detected and a warning is sent to
michael@0 13 the web console. -->
michael@0 14 </head>
michael@0 15 <body>
michael@0 16 <p>This insecure page is served with an about:blank iframe. A script then adds a
michael@0 17 password field to it.</p>
michael@0 18 <iframe id = "myiframe" width = "300" height="300" >
michael@0 19 </iframe>
michael@0 20 <script>
michael@0 21 var doc = window.document;
michael@0 22 var myIframe = doc.getElementById("myiframe");
michael@0 23 myIframe.contentDocument.open();
michael@0 24 myIframe.contentDocument.write("<form><input type = 'password' name='pwd' value='test'> </form>");
michael@0 25 myIframe.contentDocument.close();
michael@0 26 </script>
michael@0 27 </body>
michael@0 28 </html>

mercurial