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.tabmodel; | 5 package org.chromium.chrome.browser.tabmodel; |
6 | 6 |
7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
8 import android.os.Build; | 8 import android.os.Build; |
9 import android.test.suitebuilder.annotation.MediumTest; | 9 import android.test.suitebuilder.annotation.MediumTest; |
10 | 10 |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 * Test a {@link TabModel} where undo is not supported: | 1383 * Test a {@link TabModel} where undo is not supported: |
1384 * Action Model List Close List Compr
ehensive List | 1384 * Action Model List Close List Compr
ehensive List |
1385 * 1. Initial State [ 0 1 2 3s ] - [ 0 1
2 3s ] | 1385 * 1. Initial State [ 0 1 2 3s ] - [ 0 1
2 3s ] |
1386 * 2. CloseTab(1, allow undo) [ 0 2 3s ] - [ 0 2
3s ] | 1386 * 2. CloseTab(1, allow undo) [ 0 2 3s ] - [ 0 2
3s ] |
1387 * 3. CloseAll - - - | 1387 * 3. CloseAll - - - |
1388 * | 1388 * |
1389 * @throws InterruptedException | 1389 * @throws InterruptedException |
1390 */ | 1390 */ |
1391 @MediumTest | 1391 @MediumTest |
1392 @RetryOnFailure | 1392 @RetryOnFailure |
1393 @DisabledTest(message = "crbug.com/674654") | |
1394 public void testUndoNotSupported() throws InterruptedException { | 1393 public void testUndoNotSupported() throws InterruptedException { |
1395 TabModel model = getActivity().getTabModelSelector().getModel(true); | 1394 TabModel model = getActivity().getTabModelSelector().getModel(true); |
1396 ChromeTabCreator tabCreator = getActivity().getTabCreator(true); | 1395 ChromeTabCreator tabCreator = getActivity().getTabCreator(true); |
1397 createTabOnUiThread(tabCreator); | 1396 createTabOnUiThread(tabCreator); |
1398 createTabOnUiThread(tabCreator); | 1397 createTabOnUiThread(tabCreator); |
1399 createTabOnUiThread(tabCreator); | 1398 createTabOnUiThread(tabCreator); |
1400 createTabOnUiThread(tabCreator); | 1399 createTabOnUiThread(tabCreator); |
1401 | 1400 |
1402 Tab tab0 = model.getTabAt(0); | 1401 Tab tab0 = model.getTabAt(0); |
1403 Tab tab1 = model.getTabAt(1); | 1402 Tab tab1 = model.getTabAt(1); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1659 openMostRecentlyClosedTabOnUiThread(firstSelector); | 1658 openMostRecentlyClosedTabOnUiThread(firstSelector); |
1660 assertEquals("Closed tab in second window should be restored in the firs
t window.", 2, | 1659 assertEquals("Closed tab in second window should be restored in the firs
t window.", 2, |
1661 firstModel.getCount()); | 1660 firstModel.getCount()); |
1662 Tab tab0 = firstModel.getTabAt(0); | 1661 Tab tab0 = firstModel.getTabAt(0); |
1663 Tab tab1 = firstModel.getTabAt(1); | 1662 Tab tab1 = firstModel.getTabAt(1); |
1664 Tab[] firstWindowTabs = new Tab[]{tab0, tab1}; | 1663 Tab[] firstWindowTabs = new Tab[]{tab0, tab1}; |
1665 checkState(firstModel, firstWindowTabs, tab0, EMPTY, firstWindowTabs, ta
b0); | 1664 checkState(firstModel, firstWindowTabs, tab0, EMPTY, firstWindowTabs, ta
b0); |
1666 assertEquals(TEST_URL_1, tab1.getUrl()); | 1665 assertEquals(TEST_URL_1, tab1.getUrl()); |
1667 } | 1666 } |
1668 } | 1667 } |
OLD | NEW |