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 * 26 * TODO: All the methods regarding expected results need implementing. 27 */ 28public class CrashedDummyResult extends AbstractResult { 29 String mRelativePath; 30 31 public CrashedDummyResult(String relativePath) { 32 mRelativePath = relativePath; 33 } 34 35 @Override 36 public byte[] getActualImageResult() { 37 return null; 38 } 39 40 @Override 41 public String getActualTextResult() { 42 return null; 43 } 44 45 @Override 46 public Bundle getBundle() { 47 /** TODO: */ 48 return null; 49 } 50 51 @Override 52 public String getDiffAsHtml() { 53 /** TODO: Probably show at least expected results */ 54 return "Ooops, I crashed..."; 55 } 56 57 @Override 58 public String getRelativePath() { 59 return mRelativePath; 60 } 61 62 @Override 63 public ResultCode getResultCode() { 64 return ResultCode.NO_ACTUAL_RESULT; 65 } 66 67 @Override 68 public boolean didCrash() { 69 return true; 70 } 71 72 @Override 73 public boolean didTimeOut() { 74 return false; 75 } 76 77 @Override 78 public void setDidTimeOut() { 79 /** This method is not applicable for this type of result */ 80 assert false; 81 } 82 83 @Override 84 public TestType getType() { 85 return null; 86 } 87 88 @Override 89 public void obtainActualResults(WebView webview, Message resultObtainedMsg) { 90 /** This method is not applicable for this type of result */ 91 assert false; 92 } 93 94 @Override 95 public void setExpectedImageResult(byte[] expectedResult) { 96 /** TODO */ 97 } 98 99 @Override 100 public void setExpectedTextResult(String expectedResult) { 101 /** TODO */ 102 } 103 104 @Override 105 public String getExpectedImageResultPath() { 106 /** TODO */ 107 return null; 108 } 109 110 @Override 111 public String getExpectedTextResultPath() { 112 /** TODO */ 113 return null; 114 } 115 116 @Override 117 public void setExpectedImageResultPath(String relativePath) { 118 /** TODO */ 119 } 120 121 @Override 122 public void setExpectedTextResultPath(String relativePath) { 123 /** TODO */ 124 } 125} 126