1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/base/content/test/social/social_activate.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +<html> 1.5 +<head> 1.6 + <title>Activation test</title> 1.7 +</head> 1.8 +<script> 1.9 +// icons from http://findicons.com/icon/158311/firefox?id=356182 by ipapun 1.10 +var data = { 1.11 + // currently required 1.12 + "name": "Demo Social Service", 1.13 + "iconURL": "chrome://branding/content/icon16.png", 1.14 + "icon32URL": "chrome://branding/content/favicon32.png", 1.15 + "icon64URL": "chrome://branding/content/icon64.png", 1.16 + 1.17 + // at least one of these must be defined 1.18 + "sidebarURL": "/browser/browser/base/content/test/social/social_sidebar.html", 1.19 + "workerURL": "/browser/browser/base/content/test/social/social_worker.js", 1.20 + "statusURL": "/browser/browser/base/content/test/social/social_panel.html", 1.21 + "postActivationURL": "/browser/browser/base/content/test/social/social_postActivation.html", 1.22 + 1.23 + // should be available for display purposes 1.24 + "description": "A short paragraph about this provider", 1.25 + "author": "Shane Caraveo, Mozilla", 1.26 + 1.27 + // optional 1.28 + "version": 1 1.29 +} 1.30 + 1.31 +function activate(node) { 1.32 + node.setAttribute("data-service", JSON.stringify(data)); 1.33 + var event = new CustomEvent("ActivateSocialFeature"); 1.34 + node.dispatchEvent(event); 1.35 +} 1.36 + 1.37 +function oldActivate(node) { 1.38 + var event = new CustomEvent("ActivateSocialFeature"); 1.39 + document.dispatchEvent(event); 1.40 +} 1.41 +</script> 1.42 +<body> 1.43 + 1.44 +nothing to see here 1.45 + 1.46 +<button id="activation-old" onclick="oldActivate(this)">Activate The Demo Provider</button> 1.47 +<button id="activation" onclick="activate(this)">Activate The Demo Provider</button> 1.48 + 1.49 +</body> 1.50 +</html>