Index: chrome/test/data/chrome_extension_resource.html |
diff --git a/chrome/test/data/chrome_extension_resource.html b/chrome/test/data/chrome_extension_resource.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a942c105371516ca5c8b315996385fe762454b2a |
--- /dev/null |
+++ b/chrome/test/data/chrome_extension_resource.html |
@@ -0,0 +1,31 @@ |
+<html> |
+<head> |
+<script> |
+var xhrStatus = -1; |
+var imgUrl = 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/images/bookmark_manager_recent.png'; |
+ |
+window.onload = function() { |
+ history.pushState('', '', |
+ 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html'); |
Charlie Reis
2013/02/22 02:45:17
Are we testing whether this is allowed? Maybe add
nasko
2013/02/22 17:14:35
Done.
|
+ var xhr = new XMLHttpRequest(); |
+ xhr.onreadystatechange = function() { |
+ if (xhr.readyState == 4) { |
+ xhrStatus = xhr.status; |
+ if (xhrStatus == 200) { |
+ document.getElementById('star').src = |
+ window.URL.createObjectURL(this.response); |
+ } |
+ domAutomationController.setAutomationId(0); |
+ domAutomationController.send(xhr.status); |
+ } |
+ } |
+ xhr.open('GET', imgUrl); |
+ xhr.responseType = 'blob'; |
+ xhr.send(); |
+} |
+</script> |
+</head> |
+<body> |
+<img id='star'> |
+</body> |
+</html> |