| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.browser.incognito; | 5 package org.chromium.chrome.browser.incognito; |
| 6 | 6 |
| 7 import android.app.PendingIntent; | 7 import android.app.PendingIntent; |
| 8 import android.app.PendingIntent.CanceledException; | 8 import android.app.PendingIntent.CanceledException; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.test.suitebuilder.annotation.MediumTest; | 10 import android.test.suitebuilder.annotation.MediumTest; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return !incognitoProfile.isNativeInitialized(); | 100 return !incognitoProfile.isNativeInitialized(); |
| 101 } | 101 } |
| 102 }); | 102 }); |
| 103 } | 103 } |
| 104 | 104 |
| 105 @Feature("Incognito") | 105 @Feature("Incognito") |
| 106 @MediumTest | 106 @MediumTest |
| 107 public void testNoAliveProcess() throws Exception { | 107 public void testNoAliveProcess() throws Exception { |
| 108 Context context = getInstrumentation().getTargetContext(); | 108 Context context = getInstrumentation().getTargetContext(); |
| 109 final TestTabModelDirectory tabbedModeDirectory = new TestTabModelDirect
ory( | 109 final TestTabModelDirectory tabbedModeDirectory = new TestTabModelDirect
ory( |
| 110 context, "tabs", String.valueOf(1)); | 110 context, "tabs", String.valueOf(0)); |
| 111 | 111 |
| 112 // Add a couple non-incognito tabs (their filenames use a different pref
ix, so we do not | 112 // Add a couple non-incognito tabs (their filenames use a different pref
ix, so we do not |
| 113 // need to worry about ID space collisions with the generated incognito
tabs). | 113 // need to worry about ID space collisions with the generated incognito
tabs). |
| 114 tabbedModeDirectory.writeTabStateFile(TestTabModelDirectory.V2_DUCK_DUCK
_GO); | 114 tabbedModeDirectory.writeTabStateFile(TestTabModelDirectory.V2_DUCK_DUCK
_GO); |
| 115 tabbedModeDirectory.writeTabStateFile(TestTabModelDirectory.V2_BAIDU); | 115 tabbedModeDirectory.writeTabStateFile(TestTabModelDirectory.V2_BAIDU); |
| 116 | 116 |
| 117 // Generate a few incognito tabs (using arbitrary data from an existing
TabState | 117 // Generate a few incognito tabs (using arbitrary data from an existing
TabState |
| 118 // definition). | 118 // definition). |
| 119 for (int i = 0; i < 3; i++) { | 119 for (int i = 0; i < 3; i++) { |
| 120 TabStateInfo incognitoInfo = new TabStateInfo( | 120 TabStateInfo incognitoInfo = new TabStateInfo( |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 ThreadUtils.runOnUiThreadBlocking(new Runnable() { | 179 ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
| 180 @Override | 180 @Override |
| 181 public void run() { | 181 public void run() { |
| 182 assertFalse(LibraryLoader.isInitialized()); | 182 assertFalse(LibraryLoader.isInitialized()); |
| 183 } | 183 } |
| 184 }); | 184 }); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } | 187 } |
| OLD | NEW |