forked from github/cordova-android
Merge branch 'master' into 4.0.x (unit test tweaks)
Conflicts: framework/src/org/apache/cordova/CordovaWebView.java
This commit is contained in:
commit
9358838dab
85
LICENSE
85
LICENSE
@ -200,3 +200,88 @@
|
|||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
|
ADDITIONAL LICENSES:
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
bin/node_modules/q
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
Copyright 2009–2012 Kristopher Michael Kowal. All rights reserved.
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to
|
||||||
|
deal in the Software without restriction, including without limitation the
|
||||||
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
bin/node_modules/shelljs
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
Copyright (c) 2012, Artur Adib <aadib@mozilla.com>
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
You may use this project under the terms of the New BSD license as follows:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of Artur Adib nor the
|
||||||
|
names of the contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
bin/node_modules/shelljs
|
||||||
|
================================================================================
|
||||||
|
Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use,
|
||||||
|
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
package org.apache.cordova;
|
package org.apache.cordova;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
@ -87,4 +89,16 @@ public class Config {
|
|||||||
public static Whitelist getWhitelist() {
|
public static Whitelist getWhitelist() {
|
||||||
return parser.getWhitelist();
|
return parser.getWhitelist();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<PluginEntry> getPluginEntries() {
|
||||||
|
return parser.getPluginEntries();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CordovaPreferences getPreferences() {
|
||||||
|
return parser.getPreferences();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isInitialized() {
|
||||||
|
return parser != null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
|
||||||
<classpathentry kind="src" path="gen"/>
|
|
||||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="src" path="gen"/>
|
||||||
<classpathentry kind="output" path="bin/classes"/>
|
<classpathentry kind="output" path="bin/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -76,7 +76,7 @@ public class BackButtonMultiPageTest extends ActivityInstrumentationTestCase2<ba
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
String url = testView.getUrl();
|
String url = testView.getUrl();
|
||||||
assertTrue(url.endsWith("sample2.html"));
|
assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", url);
|
||||||
testView.sendJavascript("window.location = 'sample3.html';"); }
|
testView.sendJavascript("window.location = 'sample3.html';"); }
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -85,8 +85,10 @@ public class BackButtonMultiPageTest extends ActivityInstrumentationTestCase2<ba
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
String url = testView.getUrl();
|
String url = testView.getUrl();
|
||||||
assertTrue(url.endsWith("sample3.html"));
|
assertEquals("file:///android_asset/www/backbuttonmultipage/sample3.html", url);
|
||||||
testView.backHistory();
|
testView.printBackForwardList();
|
||||||
|
assertTrue(testView.backHistory());
|
||||||
|
testView.printBackForwardList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
sleep();
|
sleep();
|
||||||
@ -94,8 +96,8 @@ public class BackButtonMultiPageTest extends ActivityInstrumentationTestCase2<ba
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
String url = testView.getUrl();
|
String url = testView.getUrl();
|
||||||
assertTrue(url.endsWith("sample2.html"));
|
assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", url);
|
||||||
testView.backHistory();
|
assertTrue(testView.backHistory());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
sleep();
|
sleep();
|
||||||
@ -103,7 +105,7 @@ public class BackButtonMultiPageTest extends ActivityInstrumentationTestCase2<ba
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
String url = testView.getUrl();
|
String url = testView.getUrl();
|
||||||
assertTrue(url.endsWith("index.html"));
|
assertEquals("file:///android_asset/www/backbuttonmultipage/index.html", url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public class ErrorUrlTest extends ActivityInstrumentationTestCase2<errorurl> {
|
|||||||
String good_url = "file:///android_asset/www/htmlnotfound/error.html";
|
String good_url = "file:///android_asset/www/htmlnotfound/error.html";
|
||||||
String url = testView.getUrl();
|
String url = testView.getUrl();
|
||||||
assertNotNull(url);
|
assertNotNull(url);
|
||||||
assertTrue(url.equals(good_url));
|
assertEquals(good_url, url);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user