/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- The contents of this file are subject to the Mozilla Public License Version 1.1 (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.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is mozilla.org code. The Initial Developer of the Original Code is Sun Microsystems, Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems, Inc. All Rights Reserved. Contributor(s): Client QA Team, St. Petersburg, Russia */ import org.mozilla.xpcom.*; import java.lang.reflect.*; import java.io.DataOutputStream; import java.io.FileOutputStream; import java.util.Hashtable; public class J2XOUTClientTestComponent implements iJ2XOUTClientTestComponent, iClientTestComponent, iJClientTestComponent, iExclusionSupport { private iJ2XOUTServerTestComponent server = null; private String testLocation = null; private String logLocation = null; private byte endOfData = 112; private Hashtable exclusionHash = new Hashtable(); public J2XOUTClientTestComponent() { System.out.println("DEbug:avm:J2XOUTClientTestComponent constructor"); } private void printResult(String res,String fileName) { try{ DataOutputStream f=new DataOutputStream(new FileOutputStream(logLocation+"/" + fileName)); f.writeBytes(res); f.close(); } catch(Exception e) { System.err.println("Exception during writing the file: " +e); e.printStackTrace(); } } public void exclude(int count, String[] exclusionList) { System.out.println("DEbug:avm:J2XOUTClientTestComponent:exclude"); for(int i=0;i"+sVar[0]); try{ while(!sVar[0].equals("112")) { s.append(sVar[0]+"\n"); server.testString(sVar); System.err.println("-->"+sVar[0]); } }catch(Exception e) { s.append("null"+"\n"); } printResult(s.toString(),"j2x.out.client.string"); server.flush("string"); } private void testsWstring() { StringBuffer s = new StringBuffer(); String[] stringVar = new String[1]; server.testWString(stringVar); s.append(stringVar[0]+"\n"); server.testWString(stringVar); s.append(stringVar[0]+"\n"); printResult(s.toString(),"j2x.out.client.wstring"); server.flush("wstring"); } private void testStringArray() { String[][] stringArray = new String[1][4]; int count = 4; StringBuffer s = new StringBuffer(); server.testStringArray(count, stringArray); System.out.println("IIP"); for(int i=0;i