Commit f5da2ebe authored by abarth@chromium.org's avatar abarth@chromium.org

Move another block of extension tests to manifest_version 2.

BUG=62897
TBR=aa
Review URL: http://codereview.chromium.org/8785018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113029 0039d316-1c4b-4281-b951-d872f2087c98
parent cc77d0e0
{
"name": "Install event test",
"version": "0.1",
"manifest_version": 2,
"permissions": ["management"],
"background_page": "background.html"
}
......
{
"name": "Launch App test extension",
"version": "1",
"manifest_version": 2,
"permissions": ["management"],
"background_page": "background.html"
}
\ No newline at end of file
{
"name": "Launch App test extension",
"version": "1",
"manifest_version": 2,
"permissions": ["management", "tabs"],
"background_page": "background.html"
}
<!--
* Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<body>
Hello World
<script>
chrome.test.sendMessage("app_launched");
</script>
<script src="main.js"></script>
</body>
</html>
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
chrome.test.sendMessage("app_launched");
{
"name": "packaged_app",
"version": "0.1",
"manifest_version": 2,
"app": {
"launch": {
"local_path": "main.html"
......
{
"name": "simple_extension",
"manifest_version": 2,
"version": "1"
}
{
"name": "Uninstall policy controlled extension test",
"version": "0.1",
"manifest_version": 2,
"permissions": ["management"],
"background_page": "background.html"
}
......
......@@ -2,6 +2,7 @@
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp40PYAXfSDlzCW1f5MDzRW64h0YhgV7MX8Frem0vO1ZAlq/mlUO4KxwkF2AZliFScO4Cc3CYpO6jpHXwz27tUwaN46C/LzYO7u/kb2piOep8gClvZ64EMnDv5PIoIeZlOJhkpnfs/5FbQt5sqT9avXX7YfLCLBJBql0U/V5615wIDAQAB",
"name": "NaClExtensionTest",
"version": "0.1",
"manifest_version": 2,
"description": "Tests Chrome Webstore restriction for Native Client.",
"permissions": ["nativeclient"],
"nacl_modules": [{
......
<!--
* Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<!--
This test file causes Chrome to attempt to create the NaCl plugin as a simple
......@@ -7,41 +12,11 @@ the plugin was created or blocked in either case.
<head>
<title>Native Client CWS Restriction</title>
<script>
var embedded_event;
var content_handler_event;
function setListeners(body_element) {
var eventListener = function(e) {
var target_element = e.target;
if (target_element.className != 'naclModule')
return;
var element_id = target_element.id;
if (element_id == 'embedded')
embedded_event = e.type;
else if (element_id == 'content_handler')
content_handler_event = e.type;
}
body_element.addEventListener('loadstart', eventListener, true);
body_element.addEventListener('error', eventListener, true);
}
function EmbeddedPluginCreated() {
return embedded_event != undefined;
}
function ContentHandlerPluginCreated() {
return content_handler_event != undefined;
}
</script>
<script src="test.js"></script>
</head>
<body>
<script>
setListeners(document.body);
</script>
<script src="test2.js"></script>
<embed id="embedded"
class="naclModule"
type="application/x-nacl"
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var embedded_event;
var content_handler_event;
function setListeners(body_element) {
var eventListener = function(e) {
var target_element = e.target;
if (target_element.className != 'naclModule')
return;
var element_id = target_element.id;
if (element_id == 'embedded')
embedded_event = e.type;
else if (element_id == 'content_handler')
content_handler_event = e.type;
}
body_element.addEventListener('loadstart', eventListener, true);
body_element.addEventListener('error', eventListener, true);
}
function EmbeddedPluginCreated() {
return embedded_event != undefined;
}
function ContentHandlerPluginCreated() {
return content_handler_event != undefined;
}
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
setListeners(document.body);
{
"version": "1.0",
"manifest_version": 2,
"name": "My extension"
}
{
"name": "Packaged App Test",
"version": "1",
"manifest_version": 2,
"app": {
"launch": {
"local_path": "main.html"
......
{
"name": "file access extension",
"version": "1",
"manifest_version": 2,
"permissions": ["file:///*"]
}
......@@ -5,5 +5,6 @@
} ],
"name": "Unknown Permissions Test",
"permissions": [ "tabs", "blah" ],
"manifest_version": 2,
"version": "1"
}
{
"name": "Storage_LimitedQuota",
"version": "1.0",
"manifest_version": 2,
"description": "An extension that does not ask for unlimited storage space."
}
{
"name": "Storage_UnlimitedQuota",
"version": "1.0",
"manifest_version": 2,
"description": "An extension that asks for unlimited storage space.",
"permissions": ["unlimited_storage"]
}
{
"name": "Storage_UnlimitedQuota",
"version": "2.0",
"manifest_version": 2,
"description": "An extension that asks for unlimited storage space.",
"permissions": ["unlimitedStorage"]
}
<!--
* Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<head>
<script>
// Turn the background red when the user clicks on the browser action.
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(
null, {code: "document.body.style.backgroundColor='red'"});
});
</script>
<script src="background.js"></script>
</head>
</html>
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Turn the background red when the user clicks on the browser action.
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(
null, {code: "document.body.style.backgroundColor='red'"});
});
{
"name": "A browser action that makes the active tab's background red",
"version": "1.0",
"manifest_version": 2,
"background_page": "background.html",
"permissions": [
"tabs", "file://*"
......
{
"name": "A browser action with a popup displaying a simple message",
"version": "1.0",
"manifest_version": 2,
"permissions": [
"tabs", "http://*/*", "https://*/*"
],
......
<!--
* Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<head>
<script>
// Show the page action icon for all tabs.
chrome.tabs.onCreated.addListener(function(tab) {
chrome.tabs.getAllInWindow(null, function(tabs) {
for (var i = 0, t; t = tabs[i]; i++) {
chrome.pageAction.show(t.id);
}
});
});
// Turn the background red when the user clicks on the page action.
chrome.pageAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(
null, {code: "document.body.style.backgroundColor='red'"});
});
</script>
<script src="background.js"></script>
</head>
</html>
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Show the page action icon for all tabs.
chrome.tabs.onCreated.addListener(function(tab) {
chrome.tabs.getAllInWindow(null, function(tabs) {
for (var i = 0, t; t = tabs[i]; i++) {
chrome.pageAction.show(t.id);
}
});
});
// Turn the background red when the user clicks on the page action.
chrome.pageAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(
null, {code: "document.body.style.backgroundColor='red'"});
});
{
"name": "A page action that makes the active tab's background red",
"version": "1.0",
"manifest_version": 2,
"background_page": "background.html",
"permissions": [
"tabs", "file://*"
......
<!--
* Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<head>
<script>
// Show the page action icon for all tabs.
chrome.tabs.onCreated.addListener(function(tab) {
chrome.tabs.getAllInWindow(null, function(tabs) {
for (var i = 0, t; t = tabs[i]; i++) {
chrome.pageAction.show(t.id);
}
});
});
</script>
<script src="background.js"></script>
</head>
</html>
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Show the page action icon for all tabs.
chrome.tabs.onCreated.addListener(function(tab) {
chrome.tabs.getAllInWindow(null, function(tabs) {
for (var i = 0, t; t = tabs[i]; i++) {
chrome.pageAction.show(t.id);
}
});
});
{
"name": "A page action with a popup displaying a simple message",
"version": "1.0",
"manifest_version": 2,
"background_page": "background.html",
"permissions": [
"tabs", "http://*/*", "https://*/*"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment