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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java

Issue 2247143004: Remove app context init from LibraryLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing setUp calls. Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.RemoteException; 8 import android.os.RemoteException;
9 import android.test.InstrumentationTestCase; 9 import android.test.InstrumentationTestCase;
10 import android.test.suitebuilder.annotation.MediumTest; 10 import android.test.suitebuilder.annotation.MediumTest;
11 11
12 import org.chromium.base.BaseSwitches; 12 import org.chromium.base.BaseSwitches;
13 import org.chromium.base.ContextUtils;
13 import org.chromium.base.library_loader.LibraryLoader; 14 import org.chromium.base.library_loader.LibraryLoader;
14 import org.chromium.base.library_loader.LibraryProcessType; 15 import org.chromium.base.library_loader.LibraryProcessType;
15 import org.chromium.base.test.util.CommandLineFlags; 16 import org.chromium.base.test.util.CommandLineFlags;
16 import org.chromium.base.test.util.Feature; 17 import org.chromium.base.test.util.Feature;
17 import org.chromium.content.browser.test.util.Criteria; 18 import org.chromium.content.browser.test.util.Criteria;
18 import org.chromium.content.browser.test.util.CriteriaHelper; 19 import org.chromium.content.browser.test.util.CriteriaHelper;
19 20
20 import java.util.concurrent.Callable; 21 import java.util.concurrent.Callable;
21 22
22 /** 23 /**
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 335 }
335 336
336 private void triggerConnectionSetup(ChildProcessConnectionImpl connection) { 337 private void triggerConnectionSetup(ChildProcessConnectionImpl connection) {
337 ChildProcessLauncher.triggerConnectionSetup(connection, sProcessWaitArgu ments, 1, 338 ChildProcessLauncher.triggerConnectionSetup(connection, sProcessWaitArgu ments, 1,
338 new FileDescriptorInfo[0], ChildProcessLauncher.CALLBACK_FOR_REN DERER_PROCESS, 0); 339 new FileDescriptorInfo[0], ChildProcessLauncher.CALLBACK_FOR_REN DERER_PROCESS, 0);
339 } 340 }
340 341
341 @Override 342 @Override
342 protected void setUp() throws Exception { 343 protected void setUp() throws Exception {
343 super.setUp(); 344 super.setUp();
344 LibraryLoader.get(LibraryProcessType.PROCESS_CHILD) 345 Context appContext = getInstrumentation().getTargetContext().getApplicat ionContext();
345 .ensureInitialized(getInstrumentation().getTargetContext()); 346 ContextUtils.initApplicationContext(appContext);
347 LibraryLoader.get(LibraryProcessType.PROCESS_CHILD).ensureInitialized(ap pContext);
346 } 348 }
347 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698