| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 var xhrStatus = -1; | 4 var xhrStatus = -1; |
| 5 var imgUrl = 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/images/bookmar
k_manager_search.png'; | 5 // An icon in the simple_with_icon test extension. |
| 6 var imgUrl = 'chrome-extension://ombfbiolafbecdcaofoilglhmobpdbnd/icon.png'; |
| 6 | 7 |
| 7 window.onload = function() { | 8 window.onload = function() { |
| 8 // The call to pushState with chrome-extension:// URL will succeed, since the | 9 // The call to pushState with chrome-extension:// URL will succeed, since the |
| 9 // test uses --disable-web-security. | 10 // test uses --disable-web-security. |
| 10 history.pushState('', '', | 11 history.pushState('', '', |
| 11 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html'); | 12 'chrome-extension://ombfbiolafbecdcaofoilglhmobpdbnd/'); |
| 12 var xhr = new XMLHttpRequest(); | 13 var xhr = new XMLHttpRequest(); |
| 13 xhr.onreadystatechange = function() { | 14 xhr.onreadystatechange = function() { |
| 14 if (xhr.readyState == 4) { | 15 if (xhr.readyState == 4) { |
| 15 xhrStatus = xhr.status; | 16 xhrStatus = xhr.status; |
| 16 if (xhrStatus == 200) { | 17 if (xhrStatus == 200) { |
| 17 document.getElementById('star').src = | 18 document.getElementById('star').src = |
| 18 window.URL.createObjectURL(this.response); | 19 window.URL.createObjectURL(this.response); |
| 19 } | 20 } |
| 20 domAutomationController.setAutomationId(0); | 21 domAutomationController.setAutomationId(0); |
| 21 domAutomationController.send(xhr.status); | 22 domAutomationController.send(xhr.status); |
| 22 } | 23 } |
| 23 } | 24 } |
| 24 xhr.open('GET', imgUrl); | 25 xhr.open('GET', imgUrl); |
| 25 xhr.responseType = 'blob'; | 26 xhr.responseType = 'blob'; |
| 26 xhr.send(); | 27 xhr.send(); |
| 27 } | 28 } |
| 28 </script> | 29 </script> |
| 29 </head> | 30 </head> |
| 30 <body> | 31 <body> |
| 31 <img id='star'> | 32 <img id='star'> |
| 32 </body> | 33 </body> |
| 33 </html> | 34 </html> |
| OLD | NEW |