Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/ContextMenuLoadUrlParamsTest.java

Issue 2431753003: Merge EmbeddedTestServer#createAndStartDefaultServer() and createAndStartFileServer() (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698