- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / get_app_details_for_frame_reversed.html
1 <script>
2 function testUnsuccessfulAccess() {
3   try {
4     chrome.app.getDetailsForFrame(frames[0]);
5   } catch (e) {
6     if (e.indexOf("Access denied") == 0)
7       return true;
8     else
9       throw e;
10   }
11   return false;
12 }
13
14 function getFrameURL(host) {
15   var result = "http://" + host;
16   if (location.port) {
17     result += ":";
18     result += location.port;
19   }
20   result += location.pathname;
21   return result;
22 }
23
24 var iframe = document.createElement("iframe");
25 iframe.src = getFrameURL("nonapp.com");
26 document.documentElement.appendChild(iframe);
27 </script>