OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 package org.chromium.chrome.test.crash; | |
6 | |
7 import org.junit.Assert; | |
8 import org.junit.Rule; | |
9 import org.junit.Test; | |
10 import org.junit.runner.RunWith; | |
11 | |
12 import org.chromium.base.test.util.CommandLineFlags; | |
13 import org.chromium.base.test.util.DisabledTest; | |
14 import org.chromium.chrome.browser.ChromeActivity; | |
15 import org.chromium.chrome.test.ChromeActivityTestRule; | |
16 import org.chromium.chrome.test.ChromeJUnit4ClassRunner; | |
17 | |
18 /** Tests that intentionally crash in different ways. | |
19 * | |
20 * These are all purposefully disabled and should only be run manually. | |
21 */ | |
22 @RunWith(ChromeJUnit4ClassRunner.class) | |
23 @CommandLineFlags.Add("disable-fre") | |
Ted C
2017/04/27 16:09:45
ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE
jbudorick
2017/04/28 23:00:13
Done.
| |
24 public class IntentionalCrashTest { | |
25 @Rule | |
26 public ChromeActivityTestRule<ChromeActivity> mActivityTestRule = | |
27 new ChromeActivityTestRule(ChromeActivity.class); | |
28 | |
29 @DisabledTest | |
30 @Test | |
31 public void testRendererCrash() { | |
32 try { | |
33 mActivityTestRule.startMainActivityWithURL("chrome://crash"); | |
34 } catch (InterruptedException e) { | |
35 Assert.fail(e.toString()); | |
36 } | |
37 } | |
38 | |
39 @DisabledTest | |
40 @Test | |
41 public void testBrowserCrash() { | |
42 try { | |
43 mActivityTestRule.startMainActivityWithURL("chrome://inducebrowsercr ashforrealz"); | |
44 } catch (InterruptedException e) { | |
45 Assert.fail(e.toString()); | |
46 } | |
47 } | |
48 | |
49 @DisabledTest | |
50 @Test | |
51 public void testJavaCrash() { | |
52 try { | |
53 mActivityTestRule.startMainActivityWithURL("chrome://java-crash"); | |
54 } catch (InterruptedException e) { | |
55 Assert.fail(e.toString()); | |
56 } | |
57 } | |
58 | |
59 @DisabledTest | |
60 @Test | |
61 public void testGpuCrash() { | |
62 try { | |
63 mActivityTestRule.startMainActivityWithURL("chrome://gpucrash"); | |
64 } catch (InterruptedException e) { | |
65 Assert.fail(e.toString()); | |
66 } | |
67 } | |
68 } | |
OLD | NEW |