You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/06/05 20:45:05 UTC
git commit: updates for 2.8.0
Updated Branches:
refs/heads/2.8.x 89068fa1b -> 326130a18
Updated Tags: refs/tags/2.8.0 [created] 326130a18
updates for 2.8.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/326130a1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/326130a1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/326130a1
Branch: refs/heads/2.8.x
Commit: 326130a182e5cd2d391e942efdf961cc6fa34040
Parents: 89068fa
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Jun 5 11:44:26 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jun 5 11:44:26 2013 -0700
----------------------------------------------------------------------
windows8/cordova.js | 17 +++---
windows8/template/www/cordova.js | 17 +++---
windows8/test/CordovaTestApp.jsproj | 8 +++
windows8/test/README.md | 20 ++++++
windows8/test/autotest/tests/capture.tests.js | 3 -
windows8/test/autotest/tests/datauri.tests.js | 18 ++++++
windows8/test/autotest/tests/device.tests.js | 5 --
windows8/test/autotest/tests/filetransfer.tests.js | 2 +-
.../test/autotest/tests/globalization.tests.js | 18 ++++++
windows8/test/beep.wav | Bin 0 -> 8114 bytes
windows8/test/camera/index.html | 2 +-
windows8/test/cordova-incl.js | 47 +++++++++------
windows8/test/cordova.js | 17 +++---
windows8/test/inappbrowser/inject.css | 18 ++++++
windows8/test/inappbrowser/inject.js | 18 ++++++
15 files changed, 155 insertions(+), 55 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/cordova.js
----------------------------------------------------------------------
diff --git a/windows8/cordova.js b/windows8/cordova.js
index 0337e06..c10a98f 100644
--- a/windows8/cordova.js
+++ b/windows8/cordova.js
@@ -1,5 +1,5 @@
// Platform: windows8
-// 2.8.0rc1-0-g22bc4d8
+// 2.8.0-0-g6208c95
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var CORDOVA_JS_BUILD_LABEL = '2.8.0rc1-0-g22bc4d8';
+var CORDOVA_JS_BUILD_LABEL = '2.8.0-0-g6208c95';
// file: lib\scripts\require.js
var require,
@@ -2226,11 +2226,7 @@ function initRead(reader, file) {
reader._error = null;
reader._readyState = FileReader.LOADING;
- if (typeof file == 'string') {
- // Deprecated in Cordova 2.4.
- console.warn('Using a string argument with FileReader.readAs functions is deprecated.');
- reader._fileName = file;
- } else if (typeof file.fullPath == 'string') {
+ if (typeof file.fullPath == 'string') {
reader._fileName = file.fullPath;
} else {
reader._fileName = '';
@@ -4346,7 +4342,6 @@ function Device() {
this.available = false;
this.platform = null;
this.version = null;
- this.name = null;
this.uuid = null;
this.cordova = null;
this.model = null;
@@ -4362,7 +4357,6 @@ function Device() {
me.available = true;
me.platform = info.platform;
me.version = info.version;
- me.name = info.name;
me.uuid = info.uuid;
me.cordova = buildLabel;
me.model = info.model;
@@ -7959,6 +7953,11 @@ window.cordova = require('cordova');
// file: lib\scripts\bootstrap.js
(function (context) {
+ if (context._cordovaJsLoaded) {
+ throw new Error('cordova.js included multiple times.');
+ }
+ context._cordovaJsLoaded = true;
+
var channel = require('cordova/channel');
var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/windows8/template/www/cordova.js b/windows8/template/www/cordova.js
index 0337e06..c10a98f 100644
--- a/windows8/template/www/cordova.js
+++ b/windows8/template/www/cordova.js
@@ -1,5 +1,5 @@
// Platform: windows8
-// 2.8.0rc1-0-g22bc4d8
+// 2.8.0-0-g6208c95
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var CORDOVA_JS_BUILD_LABEL = '2.8.0rc1-0-g22bc4d8';
+var CORDOVA_JS_BUILD_LABEL = '2.8.0-0-g6208c95';
// file: lib\scripts\require.js
var require,
@@ -2226,11 +2226,7 @@ function initRead(reader, file) {
reader._error = null;
reader._readyState = FileReader.LOADING;
- if (typeof file == 'string') {
- // Deprecated in Cordova 2.4.
- console.warn('Using a string argument with FileReader.readAs functions is deprecated.');
- reader._fileName = file;
- } else if (typeof file.fullPath == 'string') {
+ if (typeof file.fullPath == 'string') {
reader._fileName = file.fullPath;
} else {
reader._fileName = '';
@@ -4346,7 +4342,6 @@ function Device() {
this.available = false;
this.platform = null;
this.version = null;
- this.name = null;
this.uuid = null;
this.cordova = null;
this.model = null;
@@ -4362,7 +4357,6 @@ function Device() {
me.available = true;
me.platform = info.platform;
me.version = info.version;
- me.name = info.name;
me.uuid = info.uuid;
me.cordova = buildLabel;
me.model = info.model;
@@ -7959,6 +7953,11 @@ window.cordova = require('cordova');
// file: lib\scripts\bootstrap.js
(function (context) {
+ if (context._cordovaJsLoaded) {
+ throw new Error('cordova.js included multiple times.');
+ }
+ context._cordovaJsLoaded = true;
+
var channel = require('cordova/channel');
var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/CordovaTestApp.jsproj
----------------------------------------------------------------------
diff --git a/windows8/test/CordovaTestApp.jsproj b/windows8/test/CordovaTestApp.jsproj
index dd72c37..d14aeab 100644
--- a/windows8/test/CordovaTestApp.jsproj
+++ b/windows8/test/CordovaTestApp.jsproj
@@ -64,32 +64,40 @@
<Content Include="autotest\pages\accelerometer.html" />
<Content Include="autotest\pages\all.html" />
<Content Include="autotest\pages\battery.html" />
+ <Content Include="autotest\pages\bridge.html" />
<Content Include="autotest\pages\camera.html" />
<Content Include="autotest\pages\capture.html" />
<Content Include="autotest\pages\compass.html" />
<Content Include="autotest\pages\contacts.html" />
+ <Content Include="autotest\pages\datauri.html" />
<Content Include="autotest\pages\device.html" />
<Content Include="autotest\pages\file.html" />
<Content Include="autotest\pages\filetransfer.html" />
<Content Include="autotest\pages\geolocation.html" />
+ <Content Include="autotest\pages\globalization.html" />
<Content Include="autotest\pages\media.html" />
<Content Include="autotest\pages\network.html" />
<Content Include="autotest\pages\notification.html" />
+ <Content Include="autotest\pages\platform.html" />
<Content Include="autotest\pages\storage.html" />
<Content Include="autotest\test-runner.js" />
<Content Include="autotest\tests\accelerometer.tests.js" />
<Content Include="autotest\tests\battery.tests.js" />
+ <Content Include="autotest\tests\bridge.tests.js" />
<Content Include="autotest\tests\camera.tests.js" />
<Content Include="autotest\tests\capture.tests.js" />
<Content Include="autotest\tests\compass.tests.js" />
<Content Include="autotest\tests\contacts.tests.js" />
+ <Content Include="autotest\tests\datauri.tests.js" />
<Content Include="autotest\tests\device.tests.js" />
<Content Include="autotest\tests\file.tests.js" />
<Content Include="autotest\tests\filetransfer.tests.js" />
<Content Include="autotest\tests\geolocation.tests.js" />
+ <Content Include="autotest\tests\globalization.tests.js" />
<Content Include="autotest\tests\media.tests.js" />
<Content Include="autotest\tests\network.tests.js" />
<Content Include="autotest\tests\notification.tests.js" />
+ <Content Include="autotest\tests\platform.tests.js" />
<Content Include="autotest\tests\storage.tests.js" />
<Content Include="battery\index.html" />
<Content Include="benchmarks\arraybuffer.html" />
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/README.md
----------------------------------------------------------------------
diff --git a/windows8/test/README.md b/windows8/test/README.md
index bf3fb27..a9faf0b 100644
--- a/windows8/test/README.md
+++ b/windows8/test/README.md
@@ -1,3 +1,23 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
## Mobile Spec Suite ##
These specs are designed to run inside the mobile device that implements it - _it will fail in the DESKTOP browser_.
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/autotest/tests/capture.tests.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/tests/capture.tests.js b/windows8/test/autotest/tests/capture.tests.js
index 25483dc..2517b43 100644
--- a/windows8/test/autotest/tests/capture.tests.js
+++ b/windows8/test/autotest/tests/capture.tests.js
@@ -52,7 +52,6 @@ describe('Capture (navigator.device.capture)', function () {
expect(options).toBeDefined();
expect(options.limit).toBeDefined();
expect(options.duration).toBeDefined();
- expect(options.mode).toBeDefined();
});
});
@@ -61,7 +60,6 @@ describe('Capture (navigator.device.capture)', function () {
var options = new CaptureImageOptions();
expect(options).toBeDefined();
expect(options.limit).toBeDefined();
- expect(options.mode).toBeDefined();
});
});
@@ -71,7 +69,6 @@ describe('Capture (navigator.device.capture)', function () {
expect(options).toBeDefined();
expect(options.limit).toBeDefined();
expect(options.duration).toBeDefined();
- expect(options.mode).toBeDefined();
});
});
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/autotest/tests/datauri.tests.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/tests/datauri.tests.js b/windows8/test/autotest/tests/datauri.tests.js
index c691aab..6b806bc 100644
--- a/windows8/test/autotest/tests/datauri.tests.js
+++ b/windows8/test/autotest/tests/datauri.tests.js
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
describe('data uris', function () {
it("datauri.spec.1 should work with iframes", function() {
var gotFoo = false,
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/autotest/tests/device.tests.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/tests/device.tests.js b/windows8/test/autotest/tests/device.tests.js
index 4750cc0..df9d2c6 100644
--- a/windows8/test/autotest/tests/device.tests.js
+++ b/windows8/test/autotest/tests/device.tests.js
@@ -34,11 +34,6 @@ describe('Device Information (window.device)', function () {
expect((new String(window.device.version)).length > 0).toBe(true);
});
- it("should contain a name specification that is a string", function() {
- expect(window.device.name).toBeDefined();
- expect((new String(window.device.name)).length > 0).toBe(true);
- });
-
it("should contain a UUID specification that is a string or a number", function() {
expect(window.device.uuid).toBeDefined();
if (typeof window.device.uuid == 'string' || typeof window.device.uuid == 'object') {
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/autotest/tests/filetransfer.tests.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/tests/filetransfer.tests.js b/windows8/test/autotest/tests/filetransfer.tests.js
index 1759983..69eaaa9 100644
--- a/windows8/test/autotest/tests/filetransfer.tests.js
+++ b/windows8/test/autotest/tests/filetransfer.tests.js
@@ -228,7 +228,7 @@ describe('FileTransfer', function() {
});
it("filetransfer.spec.9 should not leave partial file due to abort", function() {
var downloadWin = createDoNotCallSpy('downloadWin');
- var remoteFile = 'http://cordova.apache.org/downloads/BlueZedEx.mp3';
+ var remoteFile = 'http://cordova.apache.org/downloads/logos_2.zip';
var localFileName = remoteFile.substring(remoteFile.lastIndexOf('/')+1);
var startTime = +new Date();
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/autotest/tests/globalization.tests.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/tests/globalization.tests.js b/windows8/test/autotest/tests/globalization.tests.js
index bc43b4a..01596ae 100644
--- a/windows8/test/autotest/tests/globalization.tests.js
+++ b/windows8/test/autotest/tests/globalization.tests.js
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
describe('Globalization (navigator.globalization)', function () {
it("globalization.spec.1 should exist", function() {
expect(navigator.globalization).toBeDefined();
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/beep.wav
----------------------------------------------------------------------
diff --git a/windows8/test/beep.wav b/windows8/test/beep.wav
new file mode 100644
index 0000000..05f5997
Binary files /dev/null and b/windows8/test/beep.wav differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/camera/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/camera/index.html b/windows8/test/camera/index.html
index b9031b5..7b80e2a 100644
--- a/windows8/test/camera/index.html
+++ b/windows8/test/camera/index.html
@@ -289,7 +289,7 @@
var value = el.value;
if (value === '') continue;
if (el.isBool) {
- ret[el.keyName] = !!value;
+ ret[el.keyName] = !!+value;
} else {
ret[el.keyName] = +value;
}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/cordova-incl.js
----------------------------------------------------------------------
diff --git a/windows8/test/cordova-incl.js b/windows8/test/cordova-incl.js
index 458e10a..a82c590 100644
--- a/windows8/test/cordova-incl.js
+++ b/windows8/test/cordova-incl.js
@@ -20,15 +20,22 @@
*/
var PLAT;
-if (/Android/.exec(navigator.userAgent)) {
- PLAT = 'android';
-} else if (/(iPad)|(iPhone)|(iPod)/.exec(navigator.userAgent)) {
- PLAT = 'ios';
-} else if (/(BB10)/.exec(navigator.userAgent)) {
- PLAT = 'blackberry10';
-} else if (/(PlayBook)|(BlackBerry)/.exec(navigator.userAgent)) {
- PLAT = 'blackberry';
-}
+(function getPlatform() {
+ var platforms = {
+ android: /Android/,
+ ios: /(iPad)|(iPhone)|(iPod)/,
+ blackberry10: /(BB10)/,
+ blackberry: /(PlayBook)|(BlackBerry)/,
+ windows8: /MSAppHost/,
+ windowsphone: /Windows Phone/
+ };
+ for (var key in platforms) {
+ if (platforms[key].exec(navigator.userAgent)) {
+ PLAT = key;
+ break;
+ }
+ }
+})();
var scripts = document.getElementsByTagName('script');
var currentPath = scripts[scripts.length - 1].src;
@@ -59,16 +66,20 @@ if (PLAT) {
}
if (!window._doNotWriteCordovaScript) {
- var script = document.createElement("script");
- script.src = cordovaPath;
- document.head.appendChild(script);
+ if (PLAT != "windows8") {
+ document.write('<script type="text/javascript" charset="utf-8" src="' + cordovaPath + '"></script>');
+ } else {
+ var s = document.createElement('script');
+ s.src = cordovaPath;
+ document.head.appendChild(s);
+ }
}
function backHome() {
- if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
- navigator.app.backHistory();
- }
- else {
- window.history.go(-1);
- }
+ if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
+ navigator.app.backHistory();
+ }
+ else {
+ window.history.go(-1);
+ }
}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/cordova.js
----------------------------------------------------------------------
diff --git a/windows8/test/cordova.js b/windows8/test/cordova.js
index 0337e06..c10a98f 100644
--- a/windows8/test/cordova.js
+++ b/windows8/test/cordova.js
@@ -1,5 +1,5 @@
// Platform: windows8
-// 2.8.0rc1-0-g22bc4d8
+// 2.8.0-0-g6208c95
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var CORDOVA_JS_BUILD_LABEL = '2.8.0rc1-0-g22bc4d8';
+var CORDOVA_JS_BUILD_LABEL = '2.8.0-0-g6208c95';
// file: lib\scripts\require.js
var require,
@@ -2226,11 +2226,7 @@ function initRead(reader, file) {
reader._error = null;
reader._readyState = FileReader.LOADING;
- if (typeof file == 'string') {
- // Deprecated in Cordova 2.4.
- console.warn('Using a string argument with FileReader.readAs functions is deprecated.');
- reader._fileName = file;
- } else if (typeof file.fullPath == 'string') {
+ if (typeof file.fullPath == 'string') {
reader._fileName = file.fullPath;
} else {
reader._fileName = '';
@@ -4346,7 +4342,6 @@ function Device() {
this.available = false;
this.platform = null;
this.version = null;
- this.name = null;
this.uuid = null;
this.cordova = null;
this.model = null;
@@ -4362,7 +4357,6 @@ function Device() {
me.available = true;
me.platform = info.platform;
me.version = info.version;
- me.name = info.name;
me.uuid = info.uuid;
me.cordova = buildLabel;
me.model = info.model;
@@ -7959,6 +7953,11 @@ window.cordova = require('cordova');
// file: lib\scripts\bootstrap.js
(function (context) {
+ if (context._cordovaJsLoaded) {
+ throw new Error('cordova.js included multiple times.');
+ }
+ context._cordovaJsLoaded = true;
+
var channel = require('cordova/channel');
var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/inappbrowser/inject.css
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/inject.css b/windows8/test/inappbrowser/inject.css
index 8e9904d..3f6e41c 100644
--- a/windows8/test/inappbrowser/inject.css
+++ b/windows8/test/inappbrowser/inject.css
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
#style-update-file {
display: block !important;
}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/326130a1/windows8/test/inappbrowser/inject.js
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/inject.js b/windows8/test/inappbrowser/inject.js
index 982c8bd..6f25493 100644
--- a/windows8/test/inappbrowser/inject.js
+++ b/windows8/test/inappbrowser/inject.js
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
var d = document.getElementById("header")
d.innerHTML = "Script file successfully injected";