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

Update more extension manifests to manifest_version 2

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112882 0039d316-1c4b-4281-b951-d872f2087c98
parent bfcacab6
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/" "http://*/"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/" "http://*/"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://google.com/" "http://google.com/"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/" "http://*/"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/" "http://*/"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0" "version": "1.0",
"manifest_version": 2
} }
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/", "http://www.google.com/",
"http://www.reddit.com/" "http://www.reddit.com/"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/", "http://www.google.com/",
"http://www.reddit.com/" "http://www.reddit.com/"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*.www.google.com/", "http://*.www.google.com/",
"https://www.reddit.com/" "https://www.reddit.com/"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/", "http://www.google.com/",
"http://www.reddit.com/" "http://www.reddit.com/"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/" "http://www.google.com/"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/", "http://www.google.com/",
"http://www.reddit.com/" "http://www.reddit.com/"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/", "http://www.google.com/",
"http://www.reddit.com/" "http://www.reddit.com/"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/" "http://www.google.com/"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs", "tabs",
"notifications", "notifications",
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs", "tabs",
"notifications", "notifications",
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs", "tabs",
"notifications", "notifications",
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs", "tabs",
"notifications", "notifications",
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"permissions": [ "manifest_version": 2,
"notifications" "permissions": [
] "notifications"
} ]
}
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
] ]
} }
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs" "tabs"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs" "tabs"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs", "tabs",
"bookmarks" "bookmarks"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs" "tabs"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/*", "http://*/*",
"tabs" "tabs"
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/*" "http://*/*"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"plugins": [ "plugins": [
{"path": "foo.dll"} {"path": "foo.dll"}
], ],
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"plugins": [ "plugins": [
{"path": "foo.dll"} {"path": "foo.dll"}
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"bookmarks","history" "bookmarks","history"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"bookmarks" "bookmarks"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"plugins": [ "plugins": [
{ "path": "foo.dll" } { "path": "foo.dll" }
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"plugins": [ "plugins": [
{ "path": "foo.dll" } { "path": "foo.dll" }
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0" "version": "1.0",
"manifest_version": 2
} }
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"plugins": [ "plugins": [
{ "path": "foo.dll" } { "path": "foo.dll" }
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"plugins": [ "plugins": [
{ "path": "foo.dll" } { "path": "foo.dll" }
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0" "version": "1.0",
"manifest_version": 2
} }
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"unlimitedStorage" "unlimitedStorage"
] ]
......
{ {
"name": "allow silent update", "name": "allow silent update",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
] ]
} }
{ {
"name": "App Test", "name": "App Test",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": [ "permissions": [
"notifications" "notifications"
], ],
......
{ {
"name": "Test App 1", "name": "Test App 1",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": ["unlimited_storage"], "permissions": ["unlimited_storage"],
"app": { "app": {
"urls": [ "urls": [
......
{ {
"name": "Test App 2", "name": "Test App 2",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": ["unlimited_storage"], "permissions": ["unlimited_storage"],
"app": { "app": {
"urls": [ "urls": [
......
{ {
"name": "Test App 3", "name": "Test App 3",
"version": "1", "version": "1",
"manifest_version": 2,
"app": { "app": {
"urls": [ "urls": [
"http://www.example.com/path1/should_overlap", "http://www.example.com/path1/should_overlap",
......
{ {
"name": "Test App 4", "name": "Test App 4",
"version": "1", "version": "1",
"manifest_version": 2,
"app": { "app": {
"launch": { "launch": {
"web_url": "http://maps.google.com/path5/foo.html" "web_url": "http://maps.google.com/path5/foo.html"
......
{ {
"name": "Notifications Test App", "name": "Notifications Test App",
"version": "0.5", "version": "0.5",
"manifest_version": 2,
"permissions": ["appNotifications"], "permissions": ["appNotifications"],
"app": { "app": {
"launch": { "launch": {
......
{ {
"name": "App Test: panel container", "name": "App Test: panel container",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": [ "permissions": [
"notifications" "notifications"
], ],
......
{ {
"name": "App Test: tab container", "name": "App Test: tab container",
"version": "1", "version": "1",
"manifest_version": 2,
"permissions": [ "permissions": [
"notifications" "notifications"
], ],
......
<!--
* 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>
<script> <script src="background.js"></script>
// The Page Action ID.
var pageActionId = "TestId";
// The window this Page Action is associated with.
var windowId = -1;
// The TabId this Page Action is associated with.
var tabId = -1;
// The URL of the page on build.chromium.org.
var pageUrl = "";
chrome.self.onConnect.addListener(function(port) {
windowId = port.tab.windowId;
tabId = port.tab.id;
pageUrl = port.tab.url;
port.onMessage.addListener(function(mybool) {
// Let Chrome know that the PageAction needs to be enabled for this tabId
// and for the url of this page.
chrome.pageActions.enableForTab(pageActionId,
{tabId: tabId, url: pageUrl});
});
});
</script>
</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.
// The Page Action ID.
var pageActionId = "TestId";
// The window this Page Action is associated with.
var windowId = -1;
// The TabId this Page Action is associated with.
var tabId = -1;
// The URL of the page on build.chromium.org.
var pageUrl = "";
chrome.self.onConnect.addListener(function(port) {
windowId = port.tab.windowId;
tabId = port.tab.id;
pageUrl = port.tab.url;
port.onMessage.addListener(function(mybool) {
// Let Chrome know that the PageAction needs to be enabled for this tabId
// and for the url of this page.
chrome.pageActions.enableForTab(pageActionId,
{tabId: tabId, url: pageUrl});
});
});
...@@ -13,5 +13,6 @@ ...@@ -13,5 +13,6 @@
"tooltip": "Page action tooltip" "tooltip": "Page action tooltip"
} ], } ],
"permissions": [ "http://*/*" ], "permissions": [ "http://*/*" ],
"manifest_version": 2,
"version": "1.0" "version": "1.0"
} }
<!--
* 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>
chrome.tabs.getSelected(null, function(tab) {
chrome.pageAction.show(tab.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.
chrome.tabs.getSelected(null, function(tab) {
chrome.pageAction.show(tab.id);
});
{ {
"name": "Popup Test", "name": "Popup Test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"page_action": { "page_action": {
"default_icon": "icon.png", "default_icon": "icon.png",
"popup": "popup.html" "popup": "popup.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>
<head> <head>
<script> <script src="background.js"></script>
chrome.tabs.getSelected(null, function(tab) {
chrome.pageAction.show(tab.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.
chrome.tabs.getSelected(null, function(tab) {
chrome.pageAction.show(tab.id);
});
{ {
"name": "Popup Test2", "name": "Popup Test2",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"page_action": { "page_action": {
"default_icon": "icon.png", "default_icon": "icon.png",
"popup": "popup.html" "popup": "popup.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>
<head> <head>
<script> <script src="bg.js"></script>
function fail() {
window.domAutomationController.send(false);
throw "Failed!";
}
function succeed() {
window.domAutomationController.send(true);
}
function testLastError() {
// Make sure lastError is not yet set
if (chrome.tabs.lastError)
fail();
var maxTabId = 0;
// Find the highest tab id
chrome.windows.getAll({populate:true}, function(windows) {
// Make sure lastError is still not set. (this call have should succeeded).
if (chrome.tabs.lastError)
fail();
for (var i = 0; i < windows.length; i++) {
var win = windows[i];
for (var j = 0; j < win.tabs.length; j++) {
var tab = win.tabs[j];
if (tab.id > maxTabId)
maxTabId = tab.id;
}
}
// Now ask for the next highest tabId.
chrome.tabs.get(maxTabId + 1, function(tab) {
// Make sure lastError *is* set and tab is not.
if (!chrome.extension.lastError ||
!chrome.extension.lastError.message ||
tab)
fail();
window.setTimeout(finish, 10);
});
});
}
function finish() {
// Now make sure lastError is unset outside the callback context.
if (chrome.tabs.lastError)
fail();
succeed();
}
</script>
</head> </head>
<body> <body>
<div onclick="testLastError();"> Last Error Test </div> <div> Last Error Test </div>
</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.
function fail() {
window.domAutomationController.send(false);
throw "Failed!";
}
function succeed() {
window.domAutomationController.send(true);
}
function testLastError() {
// Make sure lastError is not yet set
if (chrome.tabs.lastError)
fail();
var maxTabId = 0;
// Find the highest tab id
chrome.windows.getAll({populate:true}, function(windows) {
// Make sure lastError is still not set. (this call have should succeeded).
if (chrome.tabs.lastError)
fail();
for (var i = 0; i < windows.length; i++) {
var win = windows[i];
for (var j = 0; j < win.tabs.length; j++) {
var tab = win.tabs[j];
if (tab.id > maxTabId)
maxTabId = tab.id;
}
}
// Now ask for the next highest tabId.
chrome.tabs.get(maxTabId + 1, function(tab) {
// Make sure lastError *is* set and tab is not.
if (!chrome.extension.lastError ||
!chrome.extension.lastError.message ||
tab)
fail();
window.setTimeout(finish, 10);
});
});
}
function finish() {
// Now make sure lastError is unset outside the callback context.
if (chrome.tabs.lastError)
fail();
succeed();
}
document.documentElement.addEventListener("click", function() {
testLastError();
}, true);
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"name": "lastError", "name": "lastError",
"description": "Used by browsertest to test the setting of lastError for callbacks.", "description": "Used by browsertest to test the setting of lastError for callbacks.",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"background_page": "bg.html", "background_page": "bg.html",
"permissions": ["tabs"] "permissions": ["tabs"]
} }
...@@ -6,5 +6,6 @@ ...@@ -6,5 +6,6 @@
"default_icon": "chrome-16.png" "default_icon": "chrome-16.png"
}, },
"permissions": [ "http://*/*" ], "permissions": [ "http://*/*" ],
"manifest_version": 2,
"version": "1.0" "version": "1.0"
} }
<!--
* 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>
<script> <script src="background.js"></script>
chrome.self.onConnect.addListener(function(port) {
port.onMessage.addListener(function(mybool) {
// Let Chrome know that the PageAction needs to be enabled for this tabId
// and for the url of this page.
chrome.pageAction.show(port.tab.id);
});
});
</script>
</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.self.onConnect.addListener(function(port) {
port.onMessage.addListener(function(mybool) {
// Let Chrome know that the PageAction needs to be enabled for this tabId
// and for the url of this page.
chrome.pageAction.show(port.tab.id);
});
});
...@@ -11,5 +11,6 @@ ...@@ -11,5 +11,6 @@
"default_icon": "chrome-16.png" "default_icon": "chrome-16.png"
}, },
"permissions": [ "http://*/*" ], "permissions": [ "http://*/*" ],
"manifest_version": 2,
"version": "1.0" "version": "1.0"
} }
{ {
"name": "Bookmarks manager override test", "name": "Bookmarks manager override test",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Test chrome://bookmarks override", "description": "Test chrome://bookmarks override",
"chrome_url_overrides": { "chrome_url_overrides": {
"bookmarks": "bookmarks.html" "bookmarks": "bookmarks.html"
......
{ {
"name": "File manager override test", "name": "File manager override test",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Test chrome://files override", "description": "Test chrome://files override",
"chrome_url_overrides": { "chrome_url_overrides": {
"files": "files.html" "files": "files.html"
......
{ {
"name": "New tab override test", "name": "New tab override test",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Test chrome://newtab override", "description": "Test chrome://newtab override",
"chrome_url_overrides": { "chrome_url_overrides": {
"newtab": "newtab.html" "newtab": "newtab.html"
......
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
"description": "Extension which has just a background page", "description": "Extension which has just a background page",
"name": "background_page", "name": "background_page",
"background_page": "background.html", "background_page": "background.html",
"manifest_version": 2,
"version": "0.1" "version": "0.1"
} }
\ No newline at end of file
{ {
"name" : "Context Menus Test Extension", "name" : "Context Menus Test Extension",
"version" : "0.1", "version" : "0.1",
"manifest_version": 2,
"permissions": [ "contextMenus", "tabs" ], "permissions": [ "contextMenus", "tabs" ],
"background_page": "background.html" "background_page": "background.html"
} }
{ {
"name": "Tests that context menus work properly in incognito split mode", "name": "Tests that context menus work properly in incognito split mode",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"permissions": ["contextMenus"], "permissions": ["contextMenus"],
"incognito": "split", "incognito": "split",
"background_page": "background.html" "background_page": "background.html"
......
{ {
"name" : "Context Menus Test Extension", "name" : "Context Menus Test Extension",
"version" : "0.1", "version" : "0.1",
"manifest_version": 2,
"permissions": [ "contextMenus", "tabs" ], "permissions": [ "contextMenus", "tabs" ],
"background_page": "background.html" "background_page": "background.html"
} }
{ {
"name": "Tests for the url patterns to restrict context menu items.", "name": "Tests for the url patterns to restrict context menu items.",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"permissions": ["contextMenus", "tabs"], "permissions": ["contextMenus", "tabs"],
"background_page": "background.html" "background_page": "background.html"
} }
{ {
"name": "Separators Test", "name": "Separators Test",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Tests for separators added both explicitly via the API and automatically at display time to group radio items together.", "description": "Tests for separators added both explicitly via the API and automatically at display time to group radio items together.",
"permissions": ["contextMenus"] "permissions": ["contextMenus"]
} }
{ {
"name" : "Context Menus Test Extension", "name" : "Context Menus Test Extension",
"version" : "0.1", "version" : "0.1",
"manifest_version": 2,
"permissions": [ "contextMenus", "tabs" ], "permissions": [ "contextMenus", "tabs" ],
"background_page": "background.html" "background_page": "background.html"
} }
{ {
"name" : "targetUrlPatterns test", "name" : "targetUrlPatterns test",
"version" : "0.1", "version" : "0.1",
"manifest_version": 2,
"permissions": [ "contextMenus", "tabs" ], "permissions": [ "contextMenus", "tabs" ],
"background_page": "background.html" "background_page": "background.html"
} }
<script> <!--
* Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
var receivedEvents = []; * source code is governed by a BSD-style license that can be found in the
var devtoolsTabEvents = undefined; * LICENSE file.
-->
function pageEventListener() { <script src="background.js"></script>
receivedEvents.push("onPageEvent");
}
function tabCloseListener() {
receivedEvents.push("onTabClose");
}
function setListenersOnTab(tabId) {
try {
devtoolsTabEvents = chrome.devtools.getTabEvents(tabId);
devtoolsTabEvents.onPageEvent.addListener(pageEventListener);
devtoolsTabEvents.onTabClose.addListener(tabCloseListener);
window.domAutomationController.send(true);
} catch(e) {
window.domAutomationController.send(false);
}
}
function testReceivePageEvent() {
if (receivedEvents.length == 1) {
var eventName = receivedEvents.pop();
window.domAutomationController.send(eventName === "onPageEvent");
} else {
receivedEvents = [];
window.domAutomationController.send(false);
}
}
function testReceiveTabCloseEvent() {
if (receivedEvents.length == 1) {
var eventName = receivedEvents.pop();
window.domAutomationController.send(eventName === "onTabClose");
} else {
receivedEvents = [];
window.domAutomationController.send(false);
}
}
function unregisterListeners() {
devtoolsTabEvents.onPageEvent.removeListener(pageEventListener);
devtoolsTabEvents.onTabClose.removeListener(tabCloseListener);
window.domAutomationController.send(true);
}
</script>
// 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 receivedEvents = [];
var devtoolsTabEvents = undefined;
function pageEventListener() {
receivedEvents.push("onPageEvent");
}
function tabCloseListener() {
receivedEvents.push("onTabClose");
}
function setListenersOnTab(tabId) {
try {
devtoolsTabEvents = chrome.devtools.getTabEvents(tabId);
devtoolsTabEvents.onPageEvent.addListener(pageEventListener);
devtoolsTabEvents.onTabClose.addListener(tabCloseListener);
window.domAutomationController.send(true);
} catch(e) {
window.domAutomationController.send(false);
}
}
function testReceivePageEvent() {
if (receivedEvents.length == 1) {
var eventName = receivedEvents.pop();
window.domAutomationController.send(eventName === "onPageEvent");
} else {
receivedEvents = [];
window.domAutomationController.send(false);
}
}
function testReceiveTabCloseEvent() {
if (receivedEvents.length == 1) {
var eventName = receivedEvents.pop();
window.domAutomationController.send(eventName === "onTabClose");
} else {
receivedEvents = [];
window.domAutomationController.send(false);
}
}
function unregisterListeners() {
devtoolsTabEvents.onPageEvent.removeListener(pageEventListener);
devtoolsTabEvents.onTabClose.removeListener(tabCloseListener);
window.domAutomationController.send(true);
}
{ {
"name": "DevTools test", "name": "DevTools test",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "", "description": "",
"background_page": "background.html", "background_page": "background.html",
"permissions": [ "tabs" ] "permissions": [ "tabs" ]
......
<script> <!--
* Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
var devtoolsTabEvents = undefined; * source code is governed by a BSD-style license that can be found in the
* LICENSE file.
function pageEventListener() { -->
receivedEvents.push("onPageEvent"); <script src="background_two.js"></script>
}
function tabCloseListener() {
receivedEvents.push("onTabClose");
}
function registerListenersForTab(tabId) {
devtoolsTabEvents = chrome.devtools.getTabEvents(tabId);
devtoolsTabEvents.onPageEvent.addListener(pageEventListener);
devtoolsTabEvents.onTabClose.addListener(tabCloseListener);
window.domAutomationController.send(true);
}
function unregisterListeners() {
devtoolsTabEvents.onPageEvent.removeListener(pageEventListener);
devtoolsTabEvents.onTabClose.removeListener(tabCloseListener);
window.domAutomationController.send(true);
}
</script>
// 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 devtoolsTabEvents = undefined;
function pageEventListener() {
receivedEvents.push("onPageEvent");
}
function tabCloseListener() {
receivedEvents.push("onTabClose");
}
function registerListenersForTab(tabId) {
devtoolsTabEvents = chrome.devtools.getTabEvents(tabId);
devtoolsTabEvents.onPageEvent.addListener(pageEventListener);
devtoolsTabEvents.onTabClose.addListener(tabCloseListener);
window.domAutomationController.send(true);
}
function unregisterListeners() {
devtoolsTabEvents.onPageEvent.removeListener(pageEventListener);
devtoolsTabEvents.onTabClose.removeListener(tabCloseListener);
window.domAutomationController.send(true);
}
{ {
"name": "DevTools test (two)", "name": "DevTools test (two)",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "", "description": "",
"background_page": "background_two.html" "background_page": "background_two.html"
} }
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/" "http://*/"
] ]
......
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*/", "http://*/",
"http://www.google.com/" "http://www.google.com/"
......
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/" "http://www.google.com/"
], ],
......
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"manifest_version": 2,
"version": "1.0" "version": "1.0"
} }
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*.google.com/", "http://*.google.com/",
"http://google.com/", "http://google.com/",
......
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/" "http://www.google.com/"
] ]
......
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*.google.com/" "http://*.google.com/"
] ]
......
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://*.google.com/", "http://*.google.com/",
"http://google.com/", "http://google.com/",
......
{ {
"name": "effective host permisions test", "name": "effective host permisions test",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"http://www.google.com/", "http://www.google.com/",
"http://www.reddit.com/" "http://www.reddit.com/"
......
{ {
"name": "A generic empty manifest to use for testing", "name": "A generic empty manifest to use for testing",
"manifest_version": 2,
"version": "1.0" "version": "1.0"
} }
{ {
"name": "hosted_app", "name": "hosted_app",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Trivial hosted app.", "description": "Trivial hosted app.",
"app": { "app": {
"urls": [ "urls": [
......
{ {
"name": "A browser action with a large icon", "name": "A browser action with a large icon",
"version": "1.0", "version": "1.0",
"manifest_version": 2,
"permissions": [ "permissions": [
"tabs", "http://*/*" "tabs", "http://*/*"
], ],
......
{ {
"name": "test", "name": "test",
"version": "1", "version": "1",
"manifest_version": 2,
"icons": { "16": "16.png", "icons": { "16": "16.png",
"24": "24.png" } "24": "24.png" }
} }
{ {
"name": "test", "name": "test",
"manifest_version": 2,
"version": "1" "version": "1"
} }
{ {
"name": "isolated_app1", "name": "isolated_app1",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Tests isolation of stored data for apps.", "description": "Tests isolation of stored data for apps.",
"app": { "app": {
"urls": [ "urls": [
......
{ {
"name": "isolated_app2", "name": "isolated_app2",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"description": "Tests isolation of stored data for apps.", "description": "Tests isolation of stored data for apps.",
"app": { "app": {
"urls": [ "urls": [
......
<!--
* 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>
<script> <script src="bg.js"></script>
var bool_var = true;
var int_var = 42;
var str_var = "foo";
</script>
<body> <body>
<input id="myinput"></input> <input id="myinput"></input>
</body> </body>
......
// 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 bool_var = true;
var int_var = 42;
var str_var = "foo";
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"description": "Tests JS injection into an extension's background page. "description": "Tests JS injection into an extension's background page.
The name of a DOM node in the background page is returned and verified.", The name of a DOM node in the background page is returned and verified.",
"version": "0.1", "version": "0.1",
"manifest_version": 2,
"background_page": "bg.html", "background_page": "bg.html",
"browser_action": { "browser_action": {
"default_title": "Browser Action" "default_title": "Browser Action"
......
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