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.
6 function content_self_inject_test() {
7 window.addEventListener('message', function(event) {
9 if (msg == 'original') {
10 console.log('INJECTOR: No content changed.');
11 chrome.test.fail('INJECTOR: No content changed!');
13 console.log('INJECTOR: Successfully self-injected content - ' + msg);
14 chrome.test.succeed();
19 chrome.test.getConfig(function(config) {
20 chrome.test.log("Creating tab...");
21 var test_url = ("http://a.com:PORT/extensions/api_test" +
22 "/content_scripts/other_extensions/iframe_content.html#" +
23 escape(chrome.extension.getURL("test.html")))
24 .replace(/PORT/, config.testServer.port);
25 console.log('Opening frame: ' + test_url);
26 document.getElementById('content_frame').src = test_url;