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

Unified Diff: chrome/test/data/extensions/get_app_details_for_frame_reversed.html

Issue 10174001: Add an API for hosted apps to check their install and running states. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/resources/extensions/app_custom_bindings.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/get_app_details_for_frame_reversed.html
diff --git a/chrome/test/data/extensions/get_app_details_for_frame_reversed.html b/chrome/test/data/extensions/get_app_details_for_frame_reversed.html
new file mode 100644
index 0000000000000000000000000000000000000000..a0388df6ff0ae00d13b65ce18418160f60cbad44
--- /dev/null
+++ b/chrome/test/data/extensions/get_app_details_for_frame_reversed.html
@@ -0,0 +1,27 @@
+<script>
+function testUnsuccessfulAccess() {
+ try {
+ chrome.app.getDetailsForFrame(frames[0]);
+ } catch (e) {
+ if (e.indexOf("Access denied") == 0)
+ return true;
+ else
+ throw e;
+ }
+ return false;
+}
+
+function getFrameURL(host) {
+ var result = "http://" + host;
+ if (location.port) {
+ result += ":";
+ result += location.port;
+ }
+ result += location.pathname;
+ return result;
+}
+
+var iframe = document.createElement("iframe");
+iframe.src = getFrameURL("nonapp.com");
+document.documentElement.appendChild(iframe);
+</script>
« no previous file with comments | « chrome/renderer/resources/extensions/app_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698