- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / bindings / about_blank_iframe / background.js
1 // Copyright 2013 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 function test() {
6   chrome.test.assertTrue(chrome.runtime != null);
7
8   var iframe = document.createElement('iframe');
9   document.body.appendChild(iframe);
10   iframe.contentWindow.chrome = chrome;
11
12   // The context-wide bindings recalculation happens when extensions are
13   // enabled and disabled.
14   chrome.test.sendMessage('load', chrome.test.callbackPass(function(msg) {
15     chrome.test.assertTrue(chrome.runtime != null);
16   }));
17 }
18
19 chrome.test.runTests([test]);