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

Side by Side Diff: chrome/test/data/extensions/api_test/content_scripts/extension_process/background.html

Issue 8725019: Move another bunch of extension API tests to manifest_version 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 Use of this source code is governed by a BSD-style license that can be 3 * source code is governed by a BSD-style license that can be found in the
4 found in the LICENSE file. 4 * LICENSE file.
5 --> 5 -->
6
7 <!-- 6 <!--
8 Two common ways that we can end up with web pages running in an extension 7 Two common ways that we can end up with web pages running in an extension
9 process are iframes and popup windows. 8 process are iframes and popup windows.
10 --> 9 -->
11 <script> 10 <script src="background.js"></script>
12 var numPings = 0;
13 chrome.extension.onRequest.addListener(function(data) {
14 if (data != "ping")
15 chrome.test.fail("Unexpected request: " + JSON.stringify(data));
16
17 if (++numPings == 2)
18 chrome.test.notifyPass();
19 });
20
21 chrome.test.getConfig(function(config) {
22 var test_file_url = "http://localhost:PORT/files/extensions/test_file.html"
23 .replace(/PORT/, config.testServer.port);
24
25 // Add a window.
26 var w = window.open(test_file_url);
27
28 // Add an iframe.
29 var iframe = document.createElement("iframe");
30 iframe.src = test_file_url;
31 document.getElementById("iframeContainer").appendChild(iframe);
32 });
33
34 </script>
35
36 <div id="iframeContainer"> </div> 11 <div id="iframeContainer"> </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698