diff --git a/js/js.translator/testFiles/kotlin_lib_ecma5.js b/js/js.translator/testFiles/kotlin_lib_ecma5.js index 332f9860810..40d5f0a6053 100644 --- a/js/js.translator/testFiles/kotlin_lib_ecma5.js +++ b/js/js.translator/testFiles/kotlin_lib_ecma5.js @@ -1,80 +1,23 @@ - -// TODO drop this: -(function () { - 'use strict'; - - if (!Array.isArray) { - Array.isArray = function (vArg) { - return Object.prototype.toString.call(vArg) === "[object Array]"; - }; - } - - if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== "function") { - // 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; - }; - } - } -})(); - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* + * Copyright 2010-2014 JetBrains s.r.o. + * + * Licensed 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 Kotlin = {}; (function () { + 'use strict'; function toArray(obj) { var array; @@ -384,5 +327,3 @@ var Kotlin = {}; }; })(); - - diff --git a/libraries/pom.xml b/libraries/pom.xml index fd6ac6f9182..9ae595c9ba4 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -54,9 +54,9 @@ 1.6 2.4 1.1.0 - 2.5 + 2.16 1.2.1 - 2.25.0 + 2.37.1 diff --git a/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTest.java b/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTest.java index 9ea09967ad6..32c3ccfeeff 100644 --- a/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTest.java +++ b/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTest.java @@ -24,6 +24,7 @@ import org.junit.runners.Parameterized; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.htmlunit.HtmlUnitDriver; +import com.gargoylesoftware.htmlunit.BrowserVersion; import java.io.File; import java.io.IOException; @@ -42,7 +43,7 @@ public class SeleniumTest { protected static WebDriver driver = createDriver(); public static WebDriver createDriver() { - HtmlUnitDriver answer = new HtmlUnitDriver(true); + HtmlUnitDriver answer = new HtmlUnitDriver(BrowserVersion.FIREFOX_17); answer.setJavascriptEnabled(true); return answer; } diff --git a/libraries/tools/kotlin-js-tests/src/test/web/index.html b/libraries/tools/kotlin-js-tests/src/test/web/index.html index 2ac8336afb3..d72a84705a2 100644 --- a/libraries/tools/kotlin-js-tests/src/test/web/index.html +++ b/libraries/tools/kotlin-js-tests/src/test/web/index.html @@ -1,10 +1,11 @@ - - Kotlin Standard Library Test Suite - - + + Kotlin Standard Library Test Suite + + +