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

Side by Side Diff: chrome/test/data/onload_change_favicon.html

Issue 1747015: Add support for new webkit capability allowing us to update (Closed)
Patch Set: Created 10 years, 7 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title></title>
4 <link rel='icon' href='test.png'>
5 <script type='text/javascript' language='javascript'>
6 function removeLinkIfExists() {
7 var docHead = document.getElementsByTagName("head")[0];
8 var links = docHead.getElementsByTagName("link");
9 for (var i=0; i<links.length; i++) {
10 var link = links[i];
11 if (link.type=="image/x-icon" && link.rel=="shortcut icon") {
12 docHead.removeChild(link);
13 return; // Assuming only one match at most.
14 }
15 }
16 }
17
18 function addLink(iconURL) {
19 var docHead = document.getElementsByTagName("head")[0];
20 var link = document.createElement("link");
21 link.type = "image/x-icon";
22 link.rel = "shortcut icon";
23 link.href = iconURL;
24 removeLinkIfExists();
25 docHead.appendChild(link);
26 }
27
28 function OnLoad() {
29 addLink("test1.png");
30 }
31
32 </script>
33 </head>
34 <body onload='OnLoad();'>
35 <a name='test'>
36 </body>
37 </html>
OLDNEW
« chrome/renderer/render_view.cc ('K') | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698