Skip to content

Commit

Permalink
Move repo to adapt-it organization
Browse files Browse the repository at this point in the history
  • Loading branch information
eb1 committed Nov 20, 2014
1 parent 0fd028b commit d05697e
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ This plugin defines a global `fonts` object, which provides access to the fonts

## Installation

cordova plugin add https://github.com/eb1/cordova-fonts.git
cordova plugin add https://github.com/adapt-it/cordova-fonts.git
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<author>Erik Brommers</author>
<license>Apache 2.0 License</license>
<keywords>cordova,fonts</keywords>
<repo>https://github.com/eb1/cordova-fonts.git</repo>
<issue>https://github.com/eb1/cordova-fonts/issues</issue>
<repo>https://github.com/adapt-it/cordova-fonts.git</repo>
<issue>https://github.com/adapt-it/cordova-fonts/issues</issue>
<js-module name="fonts" src="www/fonts.js">
<clobbers target="cordova.plugins.fonts" />
</js-module>
Expand Down
31 changes: 31 additions & 0 deletions tests/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.adapt-it.cordova.fonts.tests"
version="0.0.1">
<name>cordova-fonts Plugin Tests</name>
<license>Apache 2.0</license>

<js-module src="tests.js" name="tests">
</js-module>
</plugin>
56 changes: 56 additions & 0 deletions tests/tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
*
* 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.
*
*/

exports.defineAutoTests = function () {
describe('Fonts (window.fonts)', function () {
it("should exist", function() {
expect(window.fonts).toBeDefined();
});
});
};

exports.defineManualTests = function (contentEl, createActionButton) {
var logMessage = function (message, color) {
var log = document.getElementById('info');
var logLine = document.createElement('div');
if (color) {
logLine.style.color = color;
}
logLine.innerHTML = message;
log.appendChild(logLine);
}

var clearLog = function () {
var log = document.getElementById('info');
log.innerHTML = '';
}

var device_tests = '<h3>Press Fonts button to get the list of defined fonts</h3>' +
'<div id="Fonts"></div>' +
'Expected result: Status box will get updated with fonts.';

contentEl.innerHTML = '<div id="info"></div>' + fonts;

createActionButton('Dump device', function () {
clearLog();
logMessage(JSON.stringify(window.fonts, null, '\t'));
}, "fonts");
};

0 comments on commit d05697e

Please sign in to comment.