Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: chrome/test/data/safe_browsing/prefetch_malware.html

Issue 6334131: Turn off safebrowsing for PREFETCH requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up unit test, per pending fix to 75507 Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 function log(message)
5 {
6 var item = document.createElement("li");
7 item.appendChild(document.createTextNode(message));
8 document.getElementById("console").appendChild(item);
9 }
10
11 function return_malware_prefetch() {
12 var pathArray = window.location.pathname.split('/');
13 var newPathname = "";
14 for ( i=0; i < pathArray.length - 1; i++ ) {
15 newPathname += pathArray[i];
16 newPathname += "/";
17 }
18 newPathname += "malware.html";
19 var href = window.location.protocol + "//" + window.location.host + newPathn ame;
20 var link = document.createElement("link");
21 link.rel = "prefetch";
22 link.href = href;
23 log(link.outerHTML);
24 return link; }
25
26 function add_prefetch(element) {
27 var head = document.getElementsByTagName("head")[0];
28 head.appendChild(element);
29 }
30 </script>
31 </head>
32 <body onload="add_prefetch(return_malware_prefetch());">
33 This page is not malware, <a href="malware.html">but this page is</a>. If
34 prefetches don't trigger safe browsing interstitials, then this page
35 should work in a dandy manner.
36 <p><ol id="console"></ol></p>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698