CrashedDummyResult.java revision 23a0ee4758da5e2d24ec6c9e8a63c127463a096f
1/* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.android.dumprendertree2; 18 19import android.os.Bundle; 20import android.os.Message; 21import android.webkit.WebView; 22 23/** 24 * A dummy class representing test that crashed. 25 */ 26public class CrashedDummyResult extends AbstractResult { 27 String mRelativePath; 28 29 public CrashedDummyResult(String relativePath) { 30 mRelativePath = relativePath; 31 } 32 33 @Override 34 public byte[] getActualImageResult() { 35 return null; 36 } 37 38 @Override 39 public String getActualTextResult() { 40 return null; 41 } 42 43 @Override 44 public Bundle getBundle() { 45 /** TODO: */ 46 return null; 47 } 48 49 @Override 50 public String getDiffAsHtml() { 51 /** TODO: Probably show at least expected results */ 52 return "Ooops, I crashed..."; 53 } 54 55 @Override 56 public String getRelativePath() { 57 return mRelativePath; 58 } 59 60 @Override 61 public ResultCode getResultCode() { 62 return ResultCode.FAIL_CRASHED; 63 } 64 65 @Override 66 public TestType getType() { 67 return null; 68 } 69 70 @Override 71 public void obtainActualResults(WebView webview, Message resultObtainedMsg) { 72 /** This method is not applicable for this type of result */ 73 assert false; 74 } 75 76 @Override 77 public void setExpectedImageResult(byte[] expectedResult) { 78 /** TODO */ 79 } 80 81 @Override 82 public void setExpectedTextResult(String expectedResult) { 83 /** TODO */ 84 } 85}