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

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

Issue 2924383003: [MD Bookmarks] Enable by default. (Closed)
Patch Set: rebase, address comments Created 3 years, 6 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
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 var imgUrl = 'chrome-extension://ombfbiolafbecdcaofoilglhmobpdbnd/icon.png';
alexmos 2017/06/21 18:09:01 nit: maybe add a comment mentioning which extensio
calamity 2017/06/22 04:24:49 Done.
6 6
7 window.onload = function() { 7 window.onload = function() {
8 // The call to pushState with chrome-extension:// URL will succeed, since the 8 // The call to pushState with chrome-extension:// URL will succeed, since the
9 // test uses --disable-web-security. 9 // test uses --disable-web-security.
10 history.pushState('', '', 10 history.pushState('', '',
11 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html'); 11 'chrome-extension://ombfbiolafbecdcaofoilglhmobpdbnd/');
12 var xhr = new XMLHttpRequest(); 12 var xhr = new XMLHttpRequest();
13 xhr.onreadystatechange = function() { 13 xhr.onreadystatechange = function() {
14 if (xhr.readyState == 4) { 14 if (xhr.readyState == 4) {
15 xhrStatus = xhr.status; 15 xhrStatus = xhr.status;
16 if (xhrStatus == 200) { 16 if (xhrStatus == 200) {
17 document.getElementById('star').src = 17 document.getElementById('star').src =
18 window.URL.createObjectURL(this.response); 18 window.URL.createObjectURL(this.response);
19 } 19 }
20 domAutomationController.setAutomationId(0); 20 domAutomationController.setAutomationId(0);
21 domAutomationController.send(xhr.status); 21 domAutomationController.send(xhr.status);
22 } 22 }
23 } 23 }
24 xhr.open('GET', imgUrl); 24 xhr.open('GET', imgUrl);
25 xhr.responseType = 'blob'; 25 xhr.responseType = 'blob';
26 xhr.send(); 26 xhr.send();
27 } 27 }
28 </script> 28 </script>
29 </head> 29 </head>
30 <body> 30 <body>
31 <img id='star'> 31 <img id='star'>
32 </body> 32 </body>
33 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698