blob: 31da7767ffa711928b457e057905b7a1523ba4ad [file] [log] [blame]
Maksymilian Osowski23a0ee42010-08-04 16:55:59 +01001/*
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.
Maksymilian Osowski01c1f9d2010-09-02 12:24:30 +010025 *
26 * TODO: All the methods regarding expected results need implementing.
Maksymilian Osowski23a0ee42010-08-04 16:55:59 +010027 */
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.FAIL_CRASHED;
65 }
66
67 @Override
68 public TestType getType() {
69 return null;
70 }
71
72 @Override
73 public void obtainActualResults(WebView webview, Message resultObtainedMsg) {
74 /** This method is not applicable for this type of result */
75 assert false;
76 }
77
78 @Override
79 public void setExpectedImageResult(byte[] expectedResult) {
80 /** TODO */
81 }
82
83 @Override
84 public void setExpectedTextResult(String expectedResult) {
85 /** TODO */
86 }
Maksymilian Osowski01c1f9d2010-09-02 12:24:30 +010087
88 @Override
89 public String getExpectedImageResultPath() {
90 /** TODO */
91 return null;
92 }
93
94 @Override
95 public String getExpectedTextResultPath() {
96 /** TODO */
97 return null;
98 }
99
100 @Override
101 public void setExpectedImageResultPath(String relativePath) {
102 /** TODO */
103 }
104
105 @Override
106 public void setExpectedTextResultPath(String relativePath) {
107 /** TODO */
108 }
Maksymilian Osowski23a0ee42010-08-04 16:55:59 +0100109}