JS lib: drop es5 shims.
This commit is contained in:
@@ -1,80 +1,23 @@
|
|||||||
|
/*
|
||||||
// TODO drop this:
|
* Copyright 2010-2014 JetBrains s.r.o.
|
||||||
(function () {
|
*
|
||||||
'use strict';
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
if (!Array.isArray) {
|
* You may obtain a copy of the License at
|
||||||
Array.isArray = function (vArg) {
|
*
|
||||||
return Object.prototype.toString.call(vArg) === "[object Array]";
|
* 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,
|
||||||
if (!Function.prototype.bind) {
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
Function.prototype.bind = function (oThis) {
|
* See the License for the specific language governing permissions and
|
||||||
if (typeof this !== "function") {
|
* limitations under the License.
|
||||||
// closest thing possible to the ECMAScript 5 internal IsCallable function
|
*/
|
||||||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
|
||||||
}
|
|
||||||
|
|
||||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
|
||||||
fToBind = this,
|
|
||||||
fNOP = function () {
|
|
||||||
},
|
|
||||||
fBound = function () {
|
|
||||||
return fToBind.apply(this instanceof fNOP && oThis
|
|
||||||
? this
|
|
||||||
: oThis,
|
|
||||||
aArgs.concat(Array.prototype.slice.call(arguments)));
|
|
||||||
};
|
|
||||||
|
|
||||||
fNOP.prototype = this.prototype;
|
|
||||||
fBound.prototype = new fNOP();
|
|
||||||
|
|
||||||
return fBound;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Object.keys) {
|
|
||||||
Object.keys = function (o) {
|
|
||||||
var result = [];
|
|
||||||
var i = 0;
|
|
||||||
for (var p in o) {
|
|
||||||
if (o.hasOwnProperty(p)) {
|
|
||||||
result[i++] = p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Object.create) {
|
|
||||||
Object.create = function(proto) {
|
|
||||||
function F() {}
|
|
||||||
F.prototype = proto;
|
|
||||||
return new F();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://ejohn.org/blog/objectgetprototypeof/
|
|
||||||
if ( typeof Object.getPrototypeOf !== "function" ) {
|
|
||||||
if ( typeof "test".__proto__ === "object" ) {
|
|
||||||
Object.getPrototypeOf = function(object){
|
|
||||||
return object.__proto__;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
Object.getPrototypeOf = function(object){
|
|
||||||
// May break if the constructor has been tampered with
|
|
||||||
return object.constructor.prototype;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
var Kotlin = {};
|
var Kotlin = {};
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
function toArray(obj) {
|
function toArray(obj) {
|
||||||
var array;
|
var array;
|
||||||
@@ -384,5 +327,3 @@ var Kotlin = {};
|
|||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -54,9 +54,9 @@
|
|||||||
<maven.compiler.target>1.6</maven.compiler.target>
|
<maven.compiler.target>1.6</maven.compiler.target>
|
||||||
<maven-jar-plugin.version>2.4</maven-jar-plugin.version>
|
<maven-jar-plugin.version>2.4</maven-jar-plugin.version>
|
||||||
<pegdown.version>1.1.0</pegdown.version>
|
<pegdown.version>1.1.0</pegdown.version>
|
||||||
<surefire-version>2.5</surefire-version>
|
<surefire-version>2.16</surefire-version>
|
||||||
<exec-maven-plugin.version>1.2.1</exec-maven-plugin.version>
|
<exec-maven-plugin.version>1.2.1</exec-maven-plugin.version>
|
||||||
<selenium.version>2.25.0</selenium.version>
|
<selenium.version>2.37.1</selenium.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<prerequisites>
|
<prerequisites>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.junit.runners.Parameterized;
|
|||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
import org.openqa.selenium.WebElement;
|
import org.openqa.selenium.WebElement;
|
||||||
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
|
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
|
||||||
|
import com.gargoylesoftware.htmlunit.BrowserVersion;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -42,7 +43,7 @@ public class SeleniumTest {
|
|||||||
protected static WebDriver driver = createDriver();
|
protected static WebDriver driver = createDriver();
|
||||||
|
|
||||||
public static WebDriver createDriver() {
|
public static WebDriver createDriver() {
|
||||||
HtmlUnitDriver answer = new HtmlUnitDriver(true);
|
HtmlUnitDriver answer = new HtmlUnitDriver(BrowserVersion.FIREFOX_17);
|
||||||
answer.setJavascriptEnabled(true);
|
answer.setJavascriptEnabled(true);
|
||||||
return answer;
|
return answer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<title>Kotlin Standard Library Test Suite</title>
|
<title>Kotlin Standard Library Test Suite</title>
|
||||||
<link rel="stylesheet" href="qunit.css">
|
<link rel="stylesheet" href="qunit.css">
|
||||||
<script src="qunit.js"></script>
|
|
||||||
|
<script src="qunit.js"></script>
|
||||||
|
|
||||||
<script src="../../../../../../dist/kotlinc/lib/kotlin.js"></script>
|
<script src="../../../../../../dist/kotlinc/lib/kotlin.js"></script>
|
||||||
<script src="../../../target/js/kotlin-js-tests.js"></script>
|
<script src="../../../target/js/kotlin-js-tests.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user