Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <html> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title></title> |
michael@0 | 4 | |
michael@0 | 5 | <script type="text/javascript"> |
michael@0 | 6 | |
michael@0 | 7 | var scriptItem = "untouched"; |
michael@0 | 8 | |
michael@0 | 9 | function checkLoads() { |
michael@0 | 10 | // Make sure the javascript did not load. |
michael@0 | 11 | window.parent.is(scriptItem, "untouched", "Should not load bad javascript"); |
michael@0 | 12 | |
michael@0 | 13 | // Make sure the css did not load. |
michael@0 | 14 | var elt = document.getElementById("styleCheck"); |
michael@0 | 15 | var style = document.defaultView.getComputedStyle(elt, ""); |
michael@0 | 16 | window.parent.isnot(style.visibility, "hidden", "Should not load bad css"); |
michael@0 | 17 | |
michael@0 | 18 | // End (parent) test. |
michael@0 | 19 | window.parent.SimpleTest.finish(); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | </script> |
michael@0 | 23 | |
michael@0 | 24 | <!-- Try loading from a malware javascript URI --> |
michael@0 | 25 | <script type="text/javascript" src="http://malware.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js"></script> |
michael@0 | 26 | |
michael@0 | 27 | <!-- Try loading from a malware css URI --> |
michael@0 | 28 | <link rel="stylesheet" type="text/css" href="http://malware.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.css"></link> |
michael@0 | 29 | |
michael@0 | 30 | <!-- XXX How is this part of the test supposed to work (= be checked)? --> |
michael@0 | 31 | <!-- Try loading a marked-as-malware css through an @import from a clean URI --> |
michael@0 | 32 | <link rel="stylesheet" type="text/css" href="import.css"></link> |
michael@0 | 33 | </head> |
michael@0 | 34 | |
michael@0 | 35 | <body onload="checkLoads()"> |
michael@0 | 36 | The following should not be hidden: |
michael@0 | 37 | <div id="styleCheck">STYLE TEST</div> |
michael@0 | 38 | </body> |
michael@0 | 39 | </html> |