- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / extension_resource_request_policy / web_accessible / iframe.js
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Test that both static <iframe> tags and dynamically generated ones can be
6 // loaded by their parent extension (iframe-contents.html is not listed in
7 // web_accessible_resources).
8 var staticIframeLoaded = false;
9 function iframeLoaded() {
10   if (staticIframeLoaded) {
11     chrome.test.notifyPass();
12     return;
13   }
14
15   staticIframeLoaded = true;
16
17   var iframe = document.createElement('iframe');
18   document.body.appendChild(iframe);
19   iframe.src = 'iframe-contents.html';
20 }