| Index: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/dart2js/FrogServerTest.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/dart2js/FrogServerTest.java (revision 11103)
|
| +++ editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/dart2js/FrogServerTest.java (working copy)
|
| @@ -1,57 +0,0 @@
|
| -/*
|
| - * Copyright 2011 Dart project authors.
|
| - *
|
| - * Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html
|
| - *
|
| - * 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.
|
| - */
|
| -package com.google.dart.tools.core.frog;
|
| -
|
| -import junit.framework.TestCase;
|
| -
|
| -import org.eclipse.core.runtime.Path;
|
| -
|
| -import java.util.ArrayList;
|
| -import java.util.List;
|
| -import java.util.concurrent.CountDownLatch;
|
| -import java.util.concurrent.TimeUnit;
|
| -
|
| -public class FrogServerTest extends TestCase {
|
| - private CountDownLatch doneLatch;
|
| - private List<String> messages;
|
| -
|
| - public void test_FrogServer_compile() throws Exception {
|
| - doneLatch = new CountDownLatch(1);
|
| - messages = new ArrayList<String>();
|
| - String path = "path/to/non/existant/dart/app/file.dart";
|
| - FrogManager.getServer().compile(new Path(path), null, new ResponseHandler() {
|
| -
|
| - @Override
|
| - public void processDone(ResponseDone done) {
|
| - messages.add("done: " + done.isSuccess());
|
| - doneLatch.countDown();
|
| - }
|
| -
|
| - @Override
|
| - public void processMessage(ResponseMessage message) {
|
| - messages.add(message.getMessage());
|
| - }
|
| - });
|
| - doneLatch.await(3000, TimeUnit.MILLISECONDS);
|
| - assertEquals(0, doneLatch.getCount());
|
| - assertEquals("File not found: " + path, messages.remove(0));
|
| - assertEquals("no main method specified", messages.remove(0));
|
| - assertEquals("done: false", messages.remove(0));
|
| - }
|
| -
|
| - @Override
|
| - protected void tearDown() throws Exception {
|
| - FrogManager.shutdown();
|
| - }
|
| -}
|
|
|