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

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

Issue 200753002: [Android] Workaround of an android platform bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a build error. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.test.InstrumentationTestCase; 7 import android.test.InstrumentationTestCase;
8 import android.test.suitebuilder.annotation.MediumTest; 8 import android.test.suitebuilder.annotation.MediumTest;
9 9
10 import org.chromium.base.CommandLine; 10 import org.chromium.base.CommandLine;
(...skipping 29 matching lines...) Expand all
40 CommandLine.reset(); 40 CommandLine.reset();
41 } 41 }
42 42
43 void loadJni() { 43 void loadJni() {
44 assertFalse(CommandLine.getInstance().isNativeImplementation()); 44 assertFalse(CommandLine.getInstance().isNativeImplementation());
45 getInstrumentation().runOnMainSync(new Runnable() { 45 getInstrumentation().runOnMainSync(new Runnable() {
46 @Override 46 @Override
47 public void run() { 47 public void run() {
48 ContentShellApplication.initializeApplicationParameters(); 48 ContentShellApplication.initializeApplicationParameters();
49 try { 49 try {
50 LibraryLoader.ensureInitialized(); 50 LibraryLoader.ensureInitialized(
51 getInstrumentation().getTargetContext(), false);
51 } catch (ProcessInitException e) { 52 } catch (ProcessInitException e) {
52 throw new Error(e); 53 throw new Error(e);
53 } 54 }
54 } 55 }
55 }); 56 });
56 assertTrue(CommandLine.getInstance().isNativeImplementation()); 57 assertTrue(CommandLine.getInstance().isNativeImplementation());
57 } 58 }
58 59
59 void checkInitSwitches() { 60 void checkInitSwitches() {
60 CommandLine cl = CommandLine.getInstance(); 61 CommandLine cl = CommandLine.getInstance();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 140 }
140 141
141 @MediumTest 142 @MediumTest
142 @Feature({"Android-AppBase"}) 143 @Feature({"Android-AppBase"})
143 public void testFileInitialization() { 144 public void testFileInitialization() {
144 CommandLine.initFromFile(ContentShellActivity.COMMAND_LINE_FILE); 145 CommandLine.initFromFile(ContentShellActivity.COMMAND_LINE_FILE);
145 loadJni(); 146 loadJni();
146 checkSettingThenGetting(); 147 checkSettingThenGetting();
147 } 148 }
148 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698