OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.test; | 5 package org.chromium.chrome.test; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.app.Instrumentation; | 8 import android.app.Instrumentation; |
9 import android.content.ComponentName; | 9 import android.content.ComponentName; |
10 import android.content.Context; | 10 import android.content.Context; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 private static final String MEMORY_TRACE_GRAPH_SUFFIX = " - browser PSS"; | 101 private static final String MEMORY_TRACE_GRAPH_SUFFIX = " - browser PSS"; |
102 | 102 |
103 private static final String PERF_OUTPUT_FILE = "PerfTestData.txt"; | 103 private static final String PERF_OUTPUT_FILE = "PerfTestData.txt"; |
104 | 104 |
105 private static final long OMNIBOX_FIND_SUGGESTION_TIMEOUT_MS = 10 * 1000; | 105 private static final long OMNIBOX_FIND_SUGGESTION_TIMEOUT_MS = 10 * 1000; |
106 | 106 |
107 public ChromeActivityTestCaseBase(Class<T> activityClass) { | 107 public ChromeActivityTestCaseBase(Class<T> activityClass) { |
108 super(activityClass); | 108 super(activityClass); |
109 } | 109 } |
110 | 110 |
111 protected boolean mSkipClearAppData = false; | 111 protected boolean mSkipClearAppData; |
112 | 112 |
113 private Thread.UncaughtExceptionHandler mDefaultUncaughtExceptionHandler; | 113 private Thread.UncaughtExceptionHandler mDefaultUncaughtExceptionHandler; |
114 | 114 |
115 private class ChromeUncaughtExceptionHandler implements Thread.UncaughtExcep
tionHandler { | 115 private class ChromeUncaughtExceptionHandler implements Thread.UncaughtExcep
tionHandler { |
116 @Override | 116 @Override |
117 public void uncaughtException(Thread t, Throwable e) { | 117 public void uncaughtException(Thread t, Throwable e) { |
118 String stackTrace = Log.getStackTraceString(e); | 118 String stackTrace = Log.getStackTraceString(e); |
119 if (e.getClass().getName().endsWith("StrictModeViolation")) { | 119 if (e.getClass().getName().endsWith("StrictModeViolation")) { |
120 stackTrace += "\nSearch logcat for \"StrictMode policy violation
\" for full stack."; | 120 stackTrace += "\nSearch logcat for \"StrictMode policy violation
\" for full stack."; |
121 } | 121 } |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 PerfTraceEvent.setEnabled(false); | 854 PerfTraceEvent.setEnabled(false); |
855 } | 855 } |
856 | 856 |
857 System.out.println(perfTagAnalysisString); | 857 System.out.println(perfTagAnalysisString); |
858 } | 858 } |
859 } catch (NoSuchMethodException ex) { | 859 } catch (NoSuchMethodException ex) { |
860 // Eat exception here. | 860 // Eat exception here. |
861 } | 861 } |
862 } | 862 } |
863 } | 863 } |
OLD | NEW |