| 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.app.Activity; | 7 import android.app.Activity; |
| 8 import android.os.Environment; | |
| 9 import android.test.suitebuilder.annotation.MediumTest; | 8 import android.test.suitebuilder.annotation.MediumTest; |
| 10 | 9 |
| 11 import org.chromium.base.ThreadUtils; | 10 import org.chromium.base.ThreadUtils; |
| 12 import org.chromium.base.test.util.Feature; | 11 import org.chromium.base.test.util.Feature; |
| 13 import org.chromium.base.test.util.RetryOnFailure; | 12 import org.chromium.base.test.util.RetryOnFailure; |
| 14 import org.chromium.chrome.R; | 13 import org.chromium.chrome.R; |
| 15 import org.chromium.chrome.browser.fullscreen.FullscreenManager; | 14 import org.chromium.chrome.browser.fullscreen.FullscreenManager; |
| 16 import org.chromium.chrome.browser.tab.Tab; | 15 import org.chromium.chrome.browser.tab.Tab; |
| 17 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; | 16 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; |
| 18 import org.chromium.chrome.browser.tabmodel.TabWindowManager.TabModelSelectorFac
tory; | 17 import org.chromium.chrome.browser.tabmodel.TabWindowManager.TabModelSelectorFac
tory; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 Activity activity, TabCreatorManager tabCrea
torManager, | 69 Activity activity, TabCreatorManager tabCrea
torManager, |
| 71 FullscreenManager fullscreenManager, int sel
ectorIndex) { | 70 FullscreenManager fullscreenManager, int sel
ectorIndex) { |
| 72 return new RecordingTabModelSelector(activity, t
abCreatorManager, | 71 return new RecordingTabModelSelector(activity, t
abCreatorManager, |
| 73 fullscreenManager, selectorIndex); | 72 fullscreenManager, selectorIndex); |
| 74 } | 73 } |
| 75 }); | 74 }); |
| 76 } | 75 } |
| 77 }); | 76 }); |
| 78 super.setUp(); | 77 super.setUp(); |
| 79 | 78 |
| 80 mTestServer = EmbeddedTestServer.createAndStartFileServer( | 79 mTestServer = EmbeddedTestServer.createAndStartServer(getInstrumentation
().getContext()); |
| 81 getInstrumentation().getContext(), Environment.getExternalStorag
eDirectory()); | |
| 82 } | 80 } |
| 83 | 81 |
| 84 @Override | 82 @Override |
| 85 protected void tearDown() throws Exception { | 83 protected void tearDown() throws Exception { |
| 86 mTestServer.stopAndDestroyServer(); | 84 mTestServer.stopAndDestroyServer(); |
| 87 super.tearDown(); | 85 super.tearDown(); |
| 88 } | 86 } |
| 89 | 87 |
| 90 /** | 88 /** |
| 91 * Verifies that the referrer is correctly set for "Open in new tab". | 89 * Verifies that the referrer is correctly set for "Open in new tab". |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 Tab tab = getActivity().getActivityTab(); | 137 Tab tab = getActivity().getActivityTab(); |
| 140 ContextMenuUtils.selectContextMenuItem(this, tab, openerDomId, menuItemI
d); | 138 ContextMenuUtils.selectContextMenuItem(this, tab, openerDomId, menuItemI
d); |
| 141 getInstrumentation().waitForIdleSync(); | 139 getInstrumentation().waitForIdleSync(); |
| 142 } | 140 } |
| 143 | 141 |
| 144 @Override | 142 @Override |
| 145 public void startMainActivity() throws InterruptedException { | 143 public void startMainActivity() throws InterruptedException { |
| 146 startMainActivityOnBlankPage(); | 144 startMainActivityOnBlankPage(); |
| 147 } | 145 } |
| 148 } | 146 } |
| OLD | NEW |