Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / chrome / test / data / onload_change_favicon.html
blob49a894385f8703a6150eb4c99e9b58d7ef911d6f
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.
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);
28 function OnLoad() {
29 addLink("test1.png");
32 </script>
33 </head>
34 <body onload='OnLoad();'>
35 <a name='test'>
36 </body>
37 </html>