Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5DD55DF07 for ; Tue, 14 May 2013 21:12:42 +0000 (UTC) Received: (qmail 15250 invoked by uid 500); 14 May 2013 21:12:41 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 15086 invoked by uid 500); 14 May 2013 21:12:41 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 14807 invoked by uid 99); 14 May 2013 21:12:41 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 May 2013 21:12:41 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D9AD38CE0; Tue, 14 May 2013 21:12:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Date: Tue, 14 May 2013 21:12:47 -0000 Message-Id: <1611fc2a0eb64b489533bc9aceff2c68@git.apache.org> In-Reply-To: <88ae71b4ffc34ebe93bf3caed6f2fd5f@git.apache.org> References: <88ae71b4ffc34ebe93bf3caed6f2fd5f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/38] js commit: [BlackBerry10] Update plugin path to support HTML pages outside of project root [BlackBerry10] Update plugin path to support HTML pages outside of project root Reviewed by: Danyi Lin Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/ad806405 Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/ad806405 Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/ad806405 Branch: refs/heads/3.0.0 Commit: ad80640505f3749e9738e0d2c41accabf4faf1ed Parents: e8f1e59 Author: Bryan Higgins Authored: Fri Mar 22 16:31:52 2013 -0400 Committer: Bryan Higgins Committed: Fri May 3 09:49:38 2013 -0400 ---------------------------------------------------------------------- .../plugin/blackberry10/pluginUtils.js | 2 +- test/blackberry10/test.pluginUtils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad806405/lib/blackberry10/plugin/blackberry10/pluginUtils.js ---------------------------------------------------------------------- diff --git a/lib/blackberry10/plugin/blackberry10/pluginUtils.js b/lib/blackberry10/plugin/blackberry10/pluginUtils.js index a07a665..8545c71 100644 --- a/lib/blackberry10/plugin/blackberry10/pluginUtils.js +++ b/lib/blackberry10/plugin/blackberry10/pluginUtils.js @@ -45,7 +45,7 @@ module.exports = { if (plugins.hasOwnProperty(plugin) && plugins[plugin].modules) { for (i = 0; i < plugins[plugin].modules.length; i++) { script = document.createElement('script'); - script.src = 'plugins/' + plugin + '/' + plugins[plugin].modules[i]; + script.src = 'local:///plugins/' + plugin + '/' + plugins[plugin].modules[i]; script.onload = function () { if (--count === 0 && typeof callback === 'function') { build(plugins); http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad806405/test/blackberry10/test.pluginUtils.js ---------------------------------------------------------------------- diff --git a/test/blackberry10/test.pluginUtils.js b/test/blackberry10/test.pluginUtils.js index 441ebcc..d298c43 100644 --- a/test/blackberry10/test.pluginUtils.js +++ b/test/blackberry10/test.pluginUtils.js @@ -52,7 +52,7 @@ describe('blackberry10 pluginUtils', function () { var plugins = { foo : { modules: ['bar.js'] } }; pluginUtils.loadClientJs(plugins, callback); expect(document.createElement).toHaveBeenCalled(); - expect(script.src).toEqual('plugins/foo/bar.js'); + expect(script.src).toEqual('local:///plugins/foo/bar.js'); expect(document.head.appendChild).toHaveBeenCalled(); script.onload(); expect(callback).toHaveBeenCalled();