提交 22fe0d80 编写于 作者: P pTalanov

Remove redundant canvas helper

上级 5fa3e96e
......@@ -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<String> additionalJSFiles() {
ArrayList<String> result = Lists.newArrayList(super.additionalJSFiles());
result.add(CANVAS_HELPER);
return result;
}
}
/*
* 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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册