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", "name": "Install event test",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"permissions": ["management"], "permissions": ["management"],
"background_page": "background.html" "background_page": "background.html"
} }
......
{ {
"name": "Launch App test extension", "name": "Launch App test extension",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": ["management"], "permissions": ["management"],
"background_page": "background.html" "background_page": "background.html"
} }
\ No newline at end of file
{ {
"name": "Launch App test extension", "name": "Launch App test extension",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": ["management", "tabs"], "permissions": ["management", "tabs"],
"background_page": "background.html" "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> <html>
<body> <body>
Hello World Hello World
<script> <script src="main.js"></script>
chrome.test.sendMessage("app_launched");
</script>
</body> </body>
</html> </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", "name": "packaged_app",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"app": { "app": {
"launch": { "launch": {
"local_path": "main.html" "local_path": "main.html"
......
{ {
"name": "simple_extension", "name": "simple_extension",
"manifest_version": 2,
"version": "1" "version": "1"
} }
{ {
"name": "Uninstall policy controlled extension test", "name": "Uninstall policy controlled extension test",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"permissions": ["management"], "permissions": ["management"],
"background_page": "background.html" "background_page": "background.html"
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp40PYAXfSDlzCW1f5MDzRW64h0YhgV7MX8Frem0vO1ZAlq/mlUO4KxwkF2AZliFScO4Cc3CYpO6jpHXwz27tUwaN46C/LzYO7u/kb2piOep8gClvZ64EMnDv5PIoIeZlOJhkpnfs/5FbQt5sqT9avXX7YfLCLBJBql0U/V5615wIDAQAB", "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp40PYAXfSDlzCW1f5MDzRW64h0YhgV7MX8Frem0vO1ZAlq/mlUO4KxwkF2AZliFScO4Cc3CYpO6jpHXwz27tUwaN46C/LzYO7u/kb2piOep8gClvZ64EMnDv5PIoIeZlOJhkpnfs/5FbQt5sqT9avXX7YfLCLBJBql0U/V5615wIDAQAB",
"name": "NaClExtensionTest", "name": "NaClExtensionTest",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Tests Chrome Webstore restriction for Native Client.", "description": "Tests Chrome Webstore restriction for Native Client.",
"permissions": ["nativeclient"], "permissions": ["nativeclient"],
"nacl_modules": [{ "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> <html>
<!-- <!--
This test file causes Chrome to attempt to create the NaCl plugin as a simple 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. ...@@ -7,41 +12,11 @@ the plugin was created or blocked in either case.
<head> <head>
<title>Native Client CWS Restriction</title> <title>Native Client CWS Restriction</title>
<script> <script src="test.js"></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>
</head> </head>
<body> <body>
<script> <script src="test2.js"></script>
setListeners(document.body);
</script>
<embed id="embedded" <embed id="embedded"
class="naclModule" class="naclModule"
type="application/x-nacl" 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", "version": "1.0",
"manifest_version": 2,
"name": "My extension" "name": "My extension"
} }
{ {
"name": "Packaged App Test", "name": "Packaged App Test",
"version": "1", "version": "1",
"manifest_version": 2,
"app": { "app": {
"launch": { "launch": {
"local_path": "main.html" "local_path": "main.html"
......
{ {
"name": "file access extension", "name": "file access extension",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": ["file:///*"] "permissions": ["file:///*"]
} }
...@@ -5,5 +5,6 @@ ...@@ -5,5 +5,6 @@
} ], } ],
"name": "Unknown Permissions Test", "name": "Unknown Permissions Test",
"permissions": [ "tabs", "blah" ], "permissions": [ "tabs", "blah" ],
"manifest_version": 2,
"version": "1" "version": "1"
} }
{ {
"name": "Storage_LimitedQuota", "name": "Storage_LimitedQuota",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"description": "An extension that does not ask for unlimited storage space." "description": "An extension that does not ask for unlimited storage space."
} }
{ {
"name": "Storage_UnlimitedQuota", "name": "Storage_UnlimitedQuota",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"description": "An extension that asks for unlimited storage space.", "description": "An extension that asks for unlimited storage space.",
"permissions": ["unlimited_storage"] "permissions": ["unlimited_storage"]
} }
{ {
"name": "Storage_UnlimitedQuota", "name": "Storage_UnlimitedQuota",
"version": "2.0", "version": "2.0",
"manifest_version": 2,
"description": "An extension that asks for unlimited storage space.", "description": "An extension that asks for unlimited storage space.",
"permissions": ["unlimitedStorage"] "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> <html>
<head> <head>
<script> <script src="background.js"></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>
</head> </head>
</html> </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", "name": "A browser action that makes the active tab's background red",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"background_page": "background.html", "background_page": "background.html",
"permissions": [ "permissions": [
"tabs", "file://*" "tabs", "file://*"
......
{ {
"name": "A browser action with a popup displaying a simple message", "name": "A browser action with a popup displaying a simple message",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs", "http://*/*", "https://*/*" "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> <html>
<head> <head>
<script> <script src="background.js"></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>
</head> </head>
</html> </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", "name": "A page action that makes the active tab's background red",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"background_page": "background.html", "background_page": "background.html",
"permissions": [ "permissions": [
"tabs", "file://*" "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> <html>
<head> <head>
<script> <script src="background.js"></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>
</head> </head>
</html> </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", "name": "A page action with a popup displaying a simple message",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"background_page": "background.html", "background_page": "background.html",
"permissions": [ "permissions": [
"tabs", "http://*/*", "https://*/*" "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