Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/test/crash/IntentionalCrashTest.java

Issue 2840193003: [Android] Fix stack symbolization when packed relocations are on. (Closed)
Patch Set: tedchoc comment Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java_sources.gni ('k') | third_party/android_platform/development/scripts/stack » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/test/crash/IntentionalCrashTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/test/crash/IntentionalCrashTest.java b/chrome/android/javatests/src/org/chromium/chrome/test/crash/IntentionalCrashTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..3988cb04299628ea651612cdfae445803e01516e
--- /dev/null
+++ b/chrome/android/javatests/src/org/chromium/chrome/test/crash/IntentionalCrashTest.java
@@ -0,0 +1,69 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.test.crash;
+
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.chromium.base.test.util.CommandLineFlags;
+import org.chromium.base.test.util.DisabledTest;
+import org.chromium.chrome.browser.ChromeActivity;
+import org.chromium.chrome.browser.ChromeSwitches;
+import org.chromium.chrome.test.ChromeActivityTestRule;
+import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
+
+/** Tests that intentionally crash in different ways.
+ *
+ * These are all purposefully disabled and should only be run manually.
+ */
+@RunWith(ChromeJUnit4ClassRunner.class)
+@CommandLineFlags.Add(ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE)
+public class IntentionalCrashTest {
+ @Rule
+ public ChromeActivityTestRule<ChromeActivity> mActivityTestRule =
+ new ChromeActivityTestRule(ChromeActivity.class);
+
+ @DisabledTest
+ @Test
+ public void testRendererCrash() {
+ try {
+ mActivityTestRule.startMainActivityWithURL("chrome://crash");
+ } catch (InterruptedException e) {
+ Assert.fail(e.toString());
+ }
+ }
+
+ @DisabledTest
+ @Test
+ public void testBrowserCrash() {
+ try {
+ mActivityTestRule.startMainActivityWithURL("chrome://inducebrowsercrashforrealz");
+ } catch (InterruptedException e) {
+ Assert.fail(e.toString());
+ }
+ }
+
+ @DisabledTest
+ @Test
+ public void testJavaCrash() {
+ try {
+ mActivityTestRule.startMainActivityWithURL("chrome://java-crash");
+ } catch (InterruptedException e) {
+ Assert.fail(e.toString());
+ }
+ }
+
+ @DisabledTest
+ @Test
+ public void testGpuCrash() {
+ try {
+ mActivityTestRule.startMainActivityWithURL("chrome://gpucrash");
+ } catch (InterruptedException e) {
+ Assert.fail(e.toString());
+ }
+ }
+}
« no previous file with comments | « chrome/android/java_sources.gni ('k') | third_party/android_platform/development/scripts/stack » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698