Replaced the ubiquity-modules, ubiquity-tests, ubiquity-standard-feeds, etc. resources with a single resource at the root of the extension. Thanks to Myk Melez for showing me the secret code to do this.

This commit is contained in:
Atul Varma 2009-01-06 16:19:24 -08:00
Родитель afbbf7aa08
Коммит cc75246fe6
50 изменённых файлов: 139 добавлений и 143 удалений

Просмотреть файл

@ -37,7 +37,7 @@ if __name__ == '__main__':
moz = jsbridge.start_from_settings(settings)
uri = 'resource://ubiquity-tests/systemtests.js';
uri = 'resource://ubiquity/tests/systemtests.js';
tests = jsbridge.JSObject(
jsbridge.network.bridge,
"Components.utils.import('%s')" % uri

Просмотреть файл

@ -1,8 +1,4 @@
resource ubiquity-modules modules/
resource ubiquity-scripts scripts/
resource ubiquity-tests tests/
resource ubiquity-standard-feeds standard-feeds/
resource ubiquity-feed-parts feed-parts/
resource ubiquity ./
content ubiquity chrome/content/
skin ubiquity skin chrome/skin/
overlay chrome://browser/content/browser.xul chrome://ubiquity/content/browser.xul

Просмотреть файл

@ -9,9 +9,9 @@
<link rel="shortcut icon" href="chrome://ubiquity/skin/icons/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="prefkeys.js"></script>
<script type="text/javascript"
src="resource://ubiquity-scripts/jsparser.js"></script>
src="resource://ubiquity/scripts/jsparser.js"></script>
<script type="text/javascript"
src="resource://ubiquity-scripts/jquery.js"></script>
src="resource://ubiquity/scripts/jquery.js"></script>
<title>About Ubiquity</title>
</head>

Просмотреть файл

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://ubiquity-modules/setup.js");
Components.utils.import("resource://ubiquity/modules/setup.js");
function makeRemover(element, info) {
function onSlideDown() {

Просмотреть файл

@ -41,7 +41,7 @@
var gUbiquity = null;
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
function ubiquitySetup()
{
@ -69,17 +69,17 @@ function ubiquitySetup()
}
var jsm = {};
Components.utils.import("resource://ubiquity-modules/setup.js",
Components.utils.import("resource://ubiquity/modules/setup.js",
jsm);
Components.utils.import("resource://ubiquity-modules/parser/parser.js",
Components.utils.import("resource://ubiquity/modules/parser/parser.js",
jsm);
Components.utils.import("resource://ubiquity-modules/parser/locale_en.js",
Components.utils.import("resource://ubiquity/modules/parser/locale_en.js",
jsm);
Components.utils.import("resource://ubiquity-modules/parser/locale_jp.js",
Components.utils.import("resource://ubiquity/modules/parser/locale_jp.js",
jsm);
Components.utils.import("resource://ubiquity-modules/cmdmanager.js",
Components.utils.import("resource://ubiquity/modules/cmdmanager.js",
jsm);
Components.utils.import("resource://ubiquity-modules/skinsvc.js",
Components.utils.import("resource://ubiquity/modules/skinsvc.js",
jsm);
var services = jsm.UbiquitySetup.createServices();
jsm.UbiquitySetup.setupWindow(window);
@ -224,7 +224,7 @@ window.addEventListener(
"load",
function() {
var jsm = {};
Components.utils.import("resource://ubiquity-modules/setup.js",
Components.utils.import("resource://ubiquity/modules/setup.js",
jsm);
jsm.UbiquitySetup.preload(ubiquitySetup);
},

Просмотреть файл

@ -5,7 +5,7 @@
xmlns:svg="http://www.w3.org/2000/svg">
<head></head>
<script type="application/javascript;version=1.7"
src="resource://ubiquity-scripts/jquery.js"/>
src="resource://ubiquity/scripts/jquery.js"/>
<script>jQuery.noConflict(); // Fixes #124</script>
<script type="application/javascript;version=1.7"
src="chrome://ubiquity/content/ubiquity.js"/>

Просмотреть файл

@ -9,7 +9,7 @@
<title>Ubiquity Commands</title>
</head>
<body>
<script src="resource://ubiquity-scripts/jquery.js"></script>
<script src="resource://ubiquity/scripts/jquery.js"></script>
<script type="application/javascript;version=1.7"
src="cmdlist.js"></script>

Просмотреть файл

@ -37,7 +37,7 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://ubiquity-modules/setup.js");
Components.utils.import("resource://ubiquity/modules/setup.js");
function onDocumentLoad() {
function updateCommands() {

Просмотреть файл

@ -96,7 +96,7 @@
</div>
</div>
</body>
<script src="resource://ubiquity-scripts/jquery.js"></script>
<script src="resource://ubiquity/scripts/jquery.js"></script>
<script type="application/javascript;version=1.7"
src="confirm-add-command.js"></script>
</html>

Просмотреть файл

@ -36,9 +36,9 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-modules/codesource.js");
Components.utils.import("resource://ubiquity-modules/setup.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/modules/codesource.js");
Components.utils.import("resource://ubiquity/modules/setup.js");
function getUrlParams() {
var urlFragments = document.URL.split("?")[1];

Просмотреть файл

@ -9,7 +9,7 @@
<body>
<div id="content"></div>
</body>
<script src="resource://ubiquity-scripts/jquery.js"></script>
<script src="resource://ubiquity-scripts/wikicreole.js"></script>
<script src="resource://ubiquity/scripts/jquery.js"></script>
<script src="resource://ubiquity/scripts/wikicreole.js"></script>
<script src="docs.js"></script>
</html>

Просмотреть файл

@ -6,7 +6,7 @@ App.trim = function trim(str) {
App.getLocalUrlData = function getLocalUrlData(url) {
var jsm = {};
Components.utils.import("resource://ubiquity-modules/codesource.js",
Components.utils.import("resource://ubiquity/modules/codesource.js",
jsm);
var lcs = new jsm.LocalUriCodeSource(url);
return lcs.getCode();
@ -84,7 +84,7 @@ App.processCode = function processCode(code) {
$(window).ready(
function() {
if (window.location.protocol == "chrome:") {
var code = App.getLocalUrlData("resource://ubiquity-modules/utils.js");
var code = App.getLocalUrlData("resource://ubiquity/modules/utils.js");
App.processCode(code);
} else
jQuery.get("../../../modules/utils.js",

Просмотреть файл

@ -7,11 +7,11 @@
<link rel="stylesheet" href="web-content.css" type="text/css">
<link rel="shortcut icon" href="chrome://ubiquity/skin/icons/favicon.ico" type="image/x-icon" />
<script type="text/javascript"
src="resource://ubiquity-scripts/jquery.js"></script>
src="resource://ubiquity/scripts/jquery.js"></script>
<script type="application/javascript;version=1.7"
src="editor.js"></script>
<script type="application/javascript;version=1.7"
src="resource://ubiquity-scripts/codemirror/js/codemirror.js"></script>
src="resource://ubiquity/scripts/codemirror/js/codemirror.js"></script>
<script type="text/javascript">
const PREF_ENABLE_HIGHLIGHTING = "extensions.ubiquity.editor_highlighting";
@ -71,8 +71,8 @@
height: textarea.clientHeight,
content: textarea.value,
parserfile: ["tokenizejavascript.js", "parsejavascript.js"],
stylesheet: "resource://ubiquity-scripts/codemirror/css/jscolors.css",
path: "resource://ubiquity-scripts/codemirror/js/",
stylesheet: "resource://ubiquity/scripts/codemirror/css/jscolors.css",
path: "resource://ubiquity/scripts/codemirror/js/",
autoMatchParens: true,
undoDelay: 100,
onChange: function() { PrefCommands.setCode(editor.getCode()) },
@ -137,8 +137,8 @@
<div class="col-three">
<p>
<strong>Read the <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial">command authoring tutorial</a></strong> to learn more.
For examples of built-in commands, look <a href="resource://ubiquity-standard-feeds">here</a>,
for information on available utility functions for use in commands, look <a href="resource://ubiquity-feed-parts/header/cmdutils.js">here</a>.
For examples of built-in commands, look <a href="resource://ubiquity/standard-feeds">here</a>,
for information on available utility functions for use in commands, look <a href="resource://ubiquity/feed-parts/header/cmdutils.js">here</a>.
</p>
</div>

Просмотреть файл

@ -1,6 +1,6 @@
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-modules/prefcommands.js");
Components.utils.import("resource://ubiquity-modules/setup.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/modules/prefcommands.js");
Components.utils.import("resource://ubiquity/modules/setup.js");
var Editor = {

Просмотреть файл

@ -2,7 +2,7 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript;version=1.7">
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Application.activeWindow.open(Utils.url("about:ubiquity")).focus();
window.close();
</script>

Просмотреть файл

@ -22,7 +22,7 @@ made to Ubiquity, including but not limited to:</p>
value="Yes, I know what I'm doing. Reset Ubiquity and restart Firefox."
onclick="confirmReset();">
<script>
Components.utils.import("resource://ubiquity-modules/setup.js");
Components.utils.import("resource://ubiquity/modules/setup.js");
function confirmReset() {
UbiquitySetup.isResetScheduled = true;

Просмотреть файл

@ -13,7 +13,7 @@
</style>
</head>
<body>
<script src="resource://ubiquity-scripts/jquery.js"></script>
<script src="resource://ubiquity/scripts/jquery.js"></script>
<script src="skinlist.js"></script>
<div class="head">
@ -60,7 +60,7 @@
<script>
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
$(document).ready(onDocumentLoad);
</script>

Просмотреть файл

@ -39,9 +39,9 @@ var Cc = Components.classes;
var Ci = Components.interfaces;
Components.utils.import("resource://ubiquity-modules/skinsvc.js");
Components.utils.import("resource://ubiquity-modules/msgservice.js");
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/skinsvc.js");
Components.utils.import("resource://ubiquity/modules/msgservice.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
var skinService = new SkinSvc();

Просмотреть файл

@ -7,11 +7,11 @@
<link rel="stylesheet" href="test.css" type="text/css">
<link rel="shortcut icon" href="chrome://ubiquity/skin/icons/favicon.ico" type="image/x-icon" />
<title>Ubiquity Test Suite</title>
<script type="text/javascript;version=1.7" src="resource://ubiquity-scripts/jquery.js"></script>
<script type="text/javascript;version=1.7" src="resource://ubiquity/scripts/jquery.js"></script>
<script type="text/javascript;version=1.7">
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity-tests/test_all.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
Components.utils.import("resource://ubiquity/tests/test_all.js");
function startTestSuite() {
var outputElement = document.getElementById("test-output");

Просмотреть файл

@ -84,7 +84,7 @@ Protocol.prototype =
newChannel: function(aURI)
{
var ubiquityProtocol = Components.utils.import(
"resource://ubiquity-modules/ubiquity_protocol.js"
"resource://ubiquity/modules/ubiquity_protocol.js"
);
return ubiquityProtocol.newChannel(aURI);
}

Просмотреть файл

@ -48,7 +48,7 @@ CmdUtils.__globalObject = this;
CmdUtils.getHtmlSelection = function getHtmlSelection(context) {
var ctu = {};
Components.utils.import("resource://ubiquity-modules/contextutils.js",
Components.utils.import("resource://ubiquity/modules/contextutils.js",
ctu);
if (typeof(context) == "undefined")
@ -59,7 +59,7 @@ CmdUtils.getHtmlSelection = function getHtmlSelection(context) {
CmdUtils.getSelection = function getSelection(context) {
var ctu = {};
Components.utils.import("resource://ubiquity-modules/contextutils.js",
Components.utils.import("resource://ubiquity/modules/contextutils.js",
ctu);
if (typeof(context) == "undefined")
@ -76,7 +76,7 @@ CmdUtils.getTextFromHtml = function getTextFromHtml(html) {
CmdUtils.setSelection = function setSelection(content, options) {
var ctu = {};
Components.utils.import("resource://ubiquity-modules/contextutils.js",
Components.utils.import("resource://ubiquity/modules/contextutils.js",
ctu);
var context = CmdUtils.__globalObject.context;
@ -223,7 +223,7 @@ CmdUtils.injectJavascript = function injectJavascript(src, callback) {
CmdUtils.loadJQuery = function loadJQuery(func) {
CmdUtils.injectJavascript(
"resource://ubiquity-scripts/jquery.js",
"resource://ubiquity/scripts/jquery.js",
Utils.safeWrapper( function() {
var contentJQuery = CmdUtils.getWindowInsecure().jQuery;
func(contentJQuery);
@ -769,7 +769,7 @@ CmdUtils.makeBookmarkletCommand = function makeBookmarkletCommand( options ) {
(
function() {
var nu = {};
Components.utils.import("resource://ubiquity-modules/nounutils.js",
Components.utils.import("resource://ubiquity/modules/nounutils.js",
nu);
CmdUtils.NounType = nu.NounUtils.NounType;
CmdUtils.makeSugg = nu.NounUtils.makeSugg;

Просмотреть файл

@ -4,7 +4,7 @@ var Utils = {};
{
// Let's "subclass" the Utils JS module.
var jsm = {};
Components.utils.import("resource://ubiquity-modules/utils.js", jsm);
Components.utils.import("resource://ubiquity/modules/utils.js", jsm);
Utils.__proto__ = jsm.Utils;
})();

Просмотреть файл

@ -39,7 +39,7 @@
var EXPORTED_SYMBOLS = ["CommandManager"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
function CommandManager(cmdSource, msgService, parser) {
this.__cmdSource = cmdSource;

Просмотреть файл

@ -41,7 +41,7 @@ EXPORTED_SYMBOLS = ["MixedCodeSource",
"LocalUriCodeSource",
"XhtmlCodeSource"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
var Cc = Components.classes;
var Ci = Components.interfaces;
@ -241,7 +241,7 @@ function XhtmlCodeSource(codeSource) {
codeSections = [];
var newCode = "";
var xmlparser = {};
Components.utils.import("resource://ubiquity-modules/xml_script_commands_parser.js", xmlparser);
Components.utils.import("resource://ubiquity/modules/xml_script_commands_parser.js", xmlparser);
var info = xmlparser.parseCodeFromXml(code);
for (var i = 0; i < info.length; i++) {
newCode += info[i].code;

Просмотреть файл

@ -38,12 +38,12 @@
let EXPORTED_SYMBOLS = ["DefaultFeedPlugin"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-modules/codesource.js");
Components.utils.import("resource://ubiquity-modules/sandboxfactory.js");
Components.utils.import("resource://ubiquity-modules/collection.js");
Components.utils.import("resource://ubiquity-modules/prefcommands.js");
Components.utils.import("resource://ubiquity-modules/feed_plugin_utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/modules/codesource.js");
Components.utils.import("resource://ubiquity/modules/sandboxfactory.js");
Components.utils.import("resource://ubiquity/modules/collection.js");
Components.utils.import("resource://ubiquity/modules/prefcommands.js");
Components.utils.import("resource://ubiquity/modules/feed_plugin_utils.js");
const CONFIRM_URL = "chrome://ubiquity/content/confirm-add-command.html";
const DEFAULT_FEED_TYPE = "commands";
@ -255,8 +255,8 @@ function makeBuiltinGlobalsMaker(msgService, hiddenWindow) {
var Cc = Components.classes;
var Ci = Components.interfaces;
var uris = ["resource://ubiquity-scripts/jquery.js",
"resource://ubiquity-scripts/template.js"];
var uris = ["resource://ubiquity/scripts/jquery.js",
"resource://ubiquity/scripts/template.js"];
for (var i = 0; i < uris.length; i++) {
hiddenWindow.Components.classes["@mozilla.org/moz/jssubscript-loader;1"]

Просмотреть файл

@ -36,7 +36,7 @@
var EXPORTED_SYMBOLS = ["FeedAggregator"];
Components.utils.import("resource://ubiquity-modules/eventhub.js");
Components.utils.import("resource://ubiquity/modules/eventhub.js");
function FeedAggregator(feedManager, messageService, disabledCommands) {
let self = this;

Просмотреть файл

@ -38,8 +38,8 @@
let EXPORTED_SYMBOLS = ["FeedManager"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-modules/eventhub.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/modules/eventhub.js");
const FEED_SRC_ANNO = "ubiquity/source";
const FEED_TYPE_ANNO = "ubiquity/type";

Просмотреть файл

@ -36,10 +36,10 @@
let EXPORTED_SYMBOLS = ["LockedDownFeedPlugin"];
Components.utils.import("resource://ubiquity-modules/codesource.js");
Components.utils.import("resource://ubiquity-modules/sandboxfactory.js");
Components.utils.import("resource://ubiquity-modules/feed_plugin_utils.js");
Components.utils.import("resource://ubiquity-modules/contextutils.js");
Components.utils.import("resource://ubiquity/modules/codesource.js");
Components.utils.import("resource://ubiquity/modules/sandboxfactory.js");
Components.utils.import("resource://ubiquity/modules/feed_plugin_utils.js");
Components.utils.import("resource://ubiquity/modules/contextutils.js");
function LockedDownFeedPlugin(feedManager, messageService, hiddenWindow) {
this.type = "locked-down-commands";
@ -60,7 +60,7 @@ function LockedDownFeedPlugin(feedManager, messageService, hiddenWindow) {
hiddenWindow.html_sanitize);
};
let sanitizerUrl = "resource://ubiquity-scripts/html-sanitizer-minified.js";
let sanitizerUrl = "resource://ubiquity/scripts/html-sanitizer-minified.js";
hiddenWindow.Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader)
.loadSubScript(sanitizerUrl);

Просмотреть файл

@ -39,7 +39,7 @@ EXPORTED_SYMBOLS = ["ExceptionUtils",
"AlertMessageService",
"CompositeMessageService"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
let Cc = Components.classes;
let Ci = Components.interfaces;

Просмотреть файл

@ -1,6 +1,6 @@
EXPORTED_SYMBOLS = ["EnParser"];
Components.utils.import("resource://ubiquity-modules/parser/parser.js");
Components.utils.import("resource://ubiquity/modules/parser/parser.js");
// util functions to make it easier to use objects as fake dictionaries
function dictDeepCopy( dict ) {

Просмотреть файл

@ -36,10 +36,10 @@
EXPORTED_SYMBOLS = ["JpParser"];
Components.utils.import("resource://ubiquity-modules/parser/parser.js");
Components.utils.import("resource://ubiquity-modules/localeutils.js");
Components.utils.import("resource://ubiquity/modules/parser/parser.js");
Components.utils.import("resource://ubiquity/modules/localeutils.js");
var dat = loadLocaleJson("resource://ubiquity-modules/parser/locale_jp.json");
var dat = loadLocaleJson("resource://ubiquity/modules/parser/locale_jp.json");
var JpParser = {};

Просмотреть файл

@ -38,7 +38,7 @@
EXPORTED_SYMBOLS = ["NLParser"];
Components.utils.import("resource://ubiquity-modules/suggestion_memory.js");
Components.utils.import("resource://ubiquity/modules/suggestion_memory.js");
var NLParser = { MAX_SUGGESTIONS: 5};
@ -72,7 +72,7 @@ NLParser.Parser = function(verbList, nounList, languagePlugin,
if (!ContextUtils) {
var ctu = {};
Components.utils.import("resource://ubiquity-modules/contextutils.js",
Components.utils.import("resource://ubiquity/modules/contextutils.js",
ctu);
ContextUtils = ctu.ContextUtils;
}
@ -80,7 +80,7 @@ NLParser.Parser = function(verbList, nounList, languagePlugin,
if (!suggestionMemory) {
var sm = {};
Components.utils.import("resource://ubiquity-modules/suggestion_memory.js",
Components.utils.import("resource://ubiquity/modules/suggestion_memory.js",
sm);
suggestionMemory = new sm.SuggestionMemory("main_parser");
}
@ -290,7 +290,7 @@ NLParser.ParsedSentence = function( verb, arguments, verbMatchScore ) {
NLParser.ParsedSentence.prototype = {
_init: function( verb, argumentSuggestions, verbMatchScore) {
var nu = {};
Components.utils.import("resource://ubiquity-modules/nounutils.js",
Components.utils.import("resource://ubiquity/modules/nounutils.js",
nu);
this._makeSugg = nu.NounUtils.makeSugg;

Просмотреть файл

@ -37,7 +37,7 @@
var EXPORTED_SYMBOLS = ["PrefCommands"];
var ubiquityProtocol = Components.utils.import(
"resource://ubiquity-modules/ubiquity_protocol.js"
"resource://ubiquity/modules/ubiquity_protocol.js"
);
var Application = Components.classes["@mozilla.org/fuel/application;1"]

Просмотреть файл

@ -36,10 +36,10 @@
EXPORTED_SYMBOLS = ["SandboxFactory"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
var ubiquityProtocol = Components.utils.import(
"resource://ubiquity-modules/ubiquity_protocol.js"
"resource://ubiquity/modules/ubiquity_protocol.js"
);
var defaultTarget = this;

Просмотреть файл

@ -38,13 +38,13 @@
EXPORTED_SYMBOLS = ["UbiquitySetup"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-modules/msgservice.js");
Components.utils.import("resource://ubiquity-modules/feedmanager.js");
Components.utils.import("resource://ubiquity-modules/default_feed_plugin.js");
Components.utils.import("resource://ubiquity-modules/locked_down_feed_plugin.js");
Components.utils.import("resource://ubiquity-modules/annotation_memory.js");
Components.utils.import("resource://ubiquity-modules/feedaggregator.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/modules/msgservice.js");
Components.utils.import("resource://ubiquity/modules/feedmanager.js");
Components.utils.import("resource://ubiquity/modules/default_feed_plugin.js");
Components.utils.import("resource://ubiquity/modules/locked_down_feed_plugin.js");
Components.utils.import("resource://ubiquity/modules/annotation_memory.js");
Components.utils.import("resource://ubiquity/modules/feedaggregator.js");
let Application = Components.classes["@mozilla.org/fuel/application;1"]
.getService(Components.interfaces.fuelIApplication);
@ -116,7 +116,7 @@ let UbiquitySetup = {
// Reset all skins.
let jsm = {};
Components.utils.import("resource://ubiquity-modules/skinsvc.js",
Components.utils.import("resource://ubiquity/modules/skinsvc.js",
jsm);
jsm.SkinSvc.reset();

Просмотреть файл

@ -39,8 +39,8 @@
var EXPORTED_SYMBOLS = ["SkinSvc"];
Components.utils.import("resource://ubiquity-modules/msgservice.js");
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/msgservice.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
var Ci = Components.interfaces;
var Cc = Components.classes;

Просмотреть файл

@ -37,7 +37,7 @@
let EXPORTED_SYMBOLS = ['newChannel',
'setPath'];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
let paths = {};

Просмотреть файл

@ -429,7 +429,7 @@ SAXEventHandler.prototype._handleCharacterData = function() {
function parseCodeFromXml(xml) {
var xmlsax = {};
Components.utils.import("resource://ubiquity-modules/xmlsax.js",
Components.utils.import("resource://ubiquity/modules/xmlsax.js",
xmlsax);
var parser = new xmlsax.SAXDriver();
var eventHandler = new SAXEventHandler(parser);

Просмотреть файл

@ -103,7 +103,7 @@ function injectPixastic( context, callback ){
var doc = CmdUtils.getDocument();
var s = doc.createElement("script");
s.src = "resource://ubiquity-scripts/pixastic.js";
s.src = "resource://ubiquity/scripts/pixastic.js";
s.id = "_pixastic_";
doc.body.appendChild( s );
jQuery(s).load( callback );

Просмотреть файл

@ -8,8 +8,8 @@
<script id="google-jsapi"
src="http://www.google.com/jsapi?key=ABQIAAAAzBIC_wxmje-aKLT3RzZx7BQFk1cXV-t8vQsDjFX6X7KZv96YRxSFucHgmE5u4oZ5fuzOrPHpaB_Z2w"
></script>
<script src="resource://ubiquity-scripts/jquery.js"></script>
<script src="resource://ubiquity-scripts/content-preview.js"></script>
<script src="resource://ubiquity/scripts/jquery.js"></script>
<script src="resource://ubiquity/scripts/content-preview.js"></script>
<style>
body{

Просмотреть файл

@ -41,7 +41,7 @@ var EXPORTED_SYMBOLS = ["exportTests",
"DumpTestResponder",
"TestSuite"];
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
function exportTests(obj) {
var exportedSymbols = [];

Просмотреть файл

@ -6,15 +6,15 @@ let Ci = Components.interfaces;
let events = {};
Components.utils.import('resource://jsbridge/modules/events.js', events);
Components.utils.import('resource://ubiquity-modules/utils.js');
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import('resource://ubiquity/modules/utils.js');
Components.utils.import("resource://ubiquity/tests/framework.js");
let INTERVAL_MS = 100;
function runTests() {
let tests = {};
Components.utils.import("resource://ubiquity-tests/test_all.js", tests);
Components.utils.import("resource://ubiquity/tests/test_all.js", tests);
var suite = new TestSuite(DumpTestResponder, tests);
var success = true;

Просмотреть файл

@ -35,24 +35,24 @@
*
* ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-modules/nounutils.js");
Components.utils.import("resource://ubiquity-modules/sandboxfactory.js");
Components.utils.import("resource://ubiquity-modules/codesource.js");
Components.utils.import("resource://ubiquity-modules/parser/parser.js");
Components.utils.import("resource://ubiquity-modules/parser/locale_en.js");
Components.utils.import("resource://ubiquity-modules/feedmanager.js");
Components.utils.import("resource://ubiquity-modules/cmdmanager.js");
Components.utils.import("resource://ubiquity-modules/localeutils.js");
Components.utils.import("resource://ubiquity-modules/collection.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/modules/nounutils.js");
Components.utils.import("resource://ubiquity/modules/sandboxfactory.js");
Components.utils.import("resource://ubiquity/modules/codesource.js");
Components.utils.import("resource://ubiquity/modules/parser/parser.js");
Components.utils.import("resource://ubiquity/modules/parser/locale_en.js");
Components.utils.import("resource://ubiquity/modules/feedmanager.js");
Components.utils.import("resource://ubiquity/modules/cmdmanager.js");
Components.utils.import("resource://ubiquity/modules/localeutils.js");
Components.utils.import("resource://ubiquity/modules/collection.js");
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity-tests/test_safebox.js");
Components.utils.import("resource://ubiquity-tests/test_eventhub.js");
Components.utils.import("resource://ubiquity-tests/test_suggestion_memory.js");
Components.utils.import("resource://ubiquity-tests/test_annotation_memory.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
Components.utils.import("resource://ubiquity/tests/test_safebox.js");
Components.utils.import("resource://ubiquity/tests/test_eventhub.js");
Components.utils.import("resource://ubiquity/tests/test_suggestion_memory.js");
Components.utils.import("resource://ubiquity/tests/test_annotation_memory.js");
Components.utils.import("resource://ubiquity-tests/test_tag_command.js");
Components.utils.import("resource://ubiquity/tests/test_tag_command.js");
var globalObj = this;
const LANG = "en";
@ -1455,7 +1455,7 @@ function testUbiquityComponentAcceptsJsVersion() {
}
function testXmlScriptCommandsParser() {
Components.utils.import("resource://ubiquity-modules/xml_script_commands_parser.js");
Components.utils.import("resource://ubiquity/modules/xml_script_commands_parser.js");
var code = parseCodeFromXml('<foo>\n<script class="commands"><![CDATA[testing\n\n\n>]]></script></foo>');
this.assert(code.length == 1);
this.assert(code[0].lineNumber == 2, "hi");
@ -1477,7 +1477,7 @@ function testLocalUriCodeSourceWorksWithBadFilenames() {
}
function testLoadLocaleJsonWorks() {
var dat = loadLocaleJson("resource://ubiquity-tests/test_all.json");
var dat = loadLocaleJson("resource://ubiquity/tests/test_all.json");
this.assert(dat.testLoadLocaleJsonWorks.length == 1);
this.assert(dat.testLoadLocaleJsonWorks == "\u3053");
}
@ -1508,6 +1508,6 @@ function getLocalFileAsUtf8(url) {
// TODO: This is a horrible workaround; modifying the tests to use
// localeutils.js makes them unreadable and hard to maintain, but there
// doesn't seem to be any way of loading utf-8 JS from xpcshell.
eval(getLocalFileAsUtf8("resource://ubiquity-tests/test_locale_jp.js"));
eval(getLocalFileAsUtf8("resource://ubiquity/tests/test_locale_jp.js"));
exportTests(this);

Просмотреть файл

@ -1,6 +1,6 @@
Components.utils.import("resource://ubiquity-modules/annotation_memory.js");
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity/modules/annotation_memory.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
EXPORTED_SYMBOLS = ["TestAnnotationMemory"];

Просмотреть файл

@ -1,5 +1,5 @@
Components.utils.import("resource://ubiquity-modules/eventhub.js");
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity/modules/eventhub.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
function HubFramework() {
let self = this;

Просмотреть файл

@ -1,5 +1,5 @@
Components.utils.import("resource://ubiquity-modules/parser/locale_jp.js");
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity/modules/parser/locale_jp.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
function testJpSplitByParticles() {
var sentence1 = "彼女と駅に行った";

Просмотреть файл

@ -1,5 +1,5 @@
Components.utils.import("resource://ubiquity-modules/safebox.js");
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity/modules/safebox.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
function testSafeboxWorks() {
let inf = {evalInSandbox: Components.utils.evalInSandbox,

Просмотреть файл

@ -1,9 +1,9 @@
EXPORTED_SYMBOLS = ["TestSuggestionMemory"];
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
var RealSuggestionMemory = {};
Components.utils.import("resource://ubiquity-modules/suggestion_memory.js",
Components.utils.import("resource://ubiquity/modules/suggestion_memory.js",
RealSuggestionMemory);
RealSuggestionMemory = RealSuggestionMemory.SuggestionMemory;

Просмотреть файл

@ -1,7 +1,7 @@
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity-modules/utils.js");
Components.utils.import("resource://ubiquity-modules/cmdmanager.js");
Components.utils.import("resource://ubiquity-modules/parser/parser.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/modules/cmdmanager.js");
Components.utils.import("resource://ubiquity/modules/parser/parser.js");
const Ci = Components.interfaces;
const Cc = Components.classes;
@ -21,7 +21,7 @@ function testTagCommand() {
var tagsvc = Cc["@mozilla.org/browser/tagging-service;1"]
.getService(Ci.nsITaggingService);
Components.utils.import("resource://ubiquity-modules/setup.js");
Components.utils.import("resource://ubiquity/modules/setup.js");
var services = UbiquitySetup.createServices();
var cmdSource = services.commandSource;

Просмотреть файл

@ -74,11 +74,11 @@ var basePath = arguments[0];
function() {
var modulesDir = getPath(basePath);
modulesDir.appendRelativePath("modules");
bindDirToResource(modulesDir, "ubiquity-modules");
bindDirToResource(modulesDir, "ubiquity/modules");
var testsDir = getPath(basePath);
testsDir.appendRelativePath("tests");
bindDirToResource(testsDir, "ubiquity-tests");
bindDirToResource(testsDir, "ubiquity/tests");
var componentPath = getPath(basePath);
componentPath.appendRelativePath("components");
@ -87,8 +87,8 @@ var basePath = arguments[0];
}
)();
Components.utils.import("resource://ubiquity-tests/framework.js");
Components.utils.import("resource://ubiquity-tests/test_all.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
Components.utils.import("resource://ubiquity/tests/test_all.js");
var suite = new TestSuite(DumpTestResponder, this);