From 22fe0d80a71d02422199dd2c62c217d78879cdf2 Mon Sep 17 00:00:00 2001 From: pTalanov Date: Thu, 31 May 2012 20:13:40 +0400 Subject: [PATCH] Remove redundant canvas helper --- .../semantics/WebDemoCanvasExamplesTest.java | 13 -------- js/js.translator/testFiles/canvas_helper.js | 33 ------------------- 2 files changed, 46 deletions(-) delete mode 100644 js/js.translator/testFiles/canvas_helper.js diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/WebDemoCanvasExamplesTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/WebDemoCanvasExamplesTest.java index a4b8b80adb8..838a05f7c32 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/WebDemoCanvasExamplesTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/WebDemoCanvasExamplesTest.java @@ -16,14 +16,10 @@ package org.jetbrains.k2js.test.semantics; -import closurecompiler.internal.com.google.common.collect.Lists; import org.jetbrains.annotations.NotNull; import org.jetbrains.k2js.test.SingleFileTranslationTest; import org.mozilla.javascript.EcmaError; -import java.util.ArrayList; -import java.util.List; - /** * @author Pavel Talanov */ @@ -33,8 +29,6 @@ import java.util.List; * */ public final class WebDemoCanvasExamplesTest extends SingleFileTranslationTest { - private static final String CANVAS_HELPER = pathToTestFilesRoot() + "canvas_helper.js"; - public WebDemoCanvasExamplesTest() { super("webDemoCanvasExamples/"); } @@ -68,11 +62,4 @@ public final class WebDemoCanvasExamplesTest extends SingleFileTranslationTest { e.getMessage().startsWith(expectedErrorMessage)); } } - - @Override - protected List additionalJSFiles() { - ArrayList result = Lists.newArrayList(super.additionalJSFiles()); - result.add(CANVAS_HELPER); - return result; - } } diff --git a/js/js.translator/testFiles/canvas_helper.js b/js/js.translator/testFiles/canvas_helper.js deleted file mode 100644 index eab312362ee..00000000000 --- a/js/js.translator/testFiles/canvas_helper.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2010-2012 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. - */ - -function getContext() { - return getCanvas().getContext('2d'); -} - -function getCanvas() { - return document.getElementsByTagName('canvas')[0]; -} - -function getKotlinLogo() { - return document.getElementsByTagName('img')[0]; -} - -function getImage(src) { - var image = document.createElement("img"); - image.src = src; - return image; -} \ No newline at end of file -- GitLab