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.browser; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.test.suitebuilder.annotation.SmallTest; | 7 import android.test.suitebuilder.annotation.SmallTest; |
8 | 8 |
9 import org.chromium.base.ThreadUtils; | 9 import org.chromium.base.ThreadUtils; |
10 import org.chromium.base.test.util.Feature; | 10 import org.chromium.base.test.util.Feature; |
11 import org.chromium.chrome.browser.ssl.ConnectionSecurityHelperSecurityLevel; | |
12 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType; | 11 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType; |
13 import org.chromium.chrome.shell.ChromeShellTestBase; | 12 import org.chromium.chrome.shell.ChromeShellTestBase; |
14 import org.chromium.content.browser.test.util.CallbackHelper; | 13 import org.chromium.content.browser.test.util.CallbackHelper; |
15 | 14 |
16 /** | 15 /** |
17 * Tests for Tab class. | 16 * Tests for Tab class. |
18 */ | 17 */ |
19 public class TabTest extends ChromeShellTestBase { | 18 public class TabTest extends ChromeShellTestBase { |
20 private Tab mTab; | 19 private Tab mTab; |
21 private CallbackHelper mOnTitleUpdatedHelper; | 20 private CallbackHelper mOnTitleUpdatedHelper; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 getInstrumentation().callActivityOnStart(getActivity()); | 90 getInstrumentation().callActivityOnStart(getActivity()); |
92 getInstrumentation().callActivityOnResume(getActivity()); | 91 getInstrumentation().callActivityOnResume(getActivity()); |
93 } | 92 } |
94 }); | 93 }); |
95 | 94 |
96 // The tab should be restored and visible. | 95 // The tab should be restored and visible. |
97 assertFalse(tab.isHidden()); | 96 assertFalse(tab.isHidden()); |
98 assertFalse(tab.needsReload()); | 97 assertFalse(tab.needsReload()); |
99 assertFalse(tab.isShowingSadTab()); | 98 assertFalse(tab.isShowingSadTab()); |
100 } | 99 } |
101 | |
102 @SmallTest | |
103 @Feature({"Tab"}) | |
104 public void testTabSecurityLevel() { | |
105 assertEquals(ConnectionSecurityHelperSecurityLevel.NONE, mTab.getSecurit
yLevel()); | |
106 } | |
107 } | 100 } |
OLD | NEW |