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

Side by Side Diff: content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java

Issue 2765453004: Moving FileDescriptorInfo from content/ to base/. (Closed)
Patch Set: Synced. Created 3 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
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 static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_CRITICAL; 7 import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_CRITICAL;
8 import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW; 8 import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW;
9 import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_MODERATE; 9 import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_MODERATE;
10 10
11 import android.app.Activity; 11 import android.app.Activity;
12 import android.app.Application; 12 import android.app.Application;
13 import android.util.Pair; 13 import android.util.Pair;
14 14
15 import org.junit.Assert; 15 import org.junit.Assert;
16 import org.junit.Before; 16 import org.junit.Before;
17 import org.junit.Test; 17 import org.junit.Test;
18 import org.junit.runner.RunWith; 18 import org.junit.runner.RunWith;
19 19
20 import org.robolectric.Robolectric; 20 import org.robolectric.Robolectric;
21 import org.robolectric.annotation.Config; 21 import org.robolectric.annotation.Config;
22 import org.robolectric.shadows.ShadowLooper; 22 import org.robolectric.shadows.ShadowLooper;
23 23
24 import org.chromium.base.process_launcher.ChildProcessCreationParams; 24 import org.chromium.base.process_launcher.ChildProcessCreationParams;
25 import org.chromium.base.process_launcher.FileDescriptorInfo;
25 import org.chromium.base.test.util.Feature; 26 import org.chromium.base.test.util.Feature;
26 import org.chromium.content.common.FileDescriptorInfo;
27 import org.chromium.content.common.IChildProcessCallback; 27 import org.chromium.content.common.IChildProcessCallback;
28 import org.chromium.content.common.IChildProcessService; 28 import org.chromium.content.common.IChildProcessService;
29 import org.chromium.testing.local.LocalRobolectricTestRunner; 29 import org.chromium.testing.local.LocalRobolectricTestRunner;
30 30
31 import java.util.ArrayList; 31 import java.util.ArrayList;
32 32
33 /** 33 /**
34 * Unit tests for BindingManagerImpl. The tests run agains mock ChildProcessConn ection 34 * Unit tests for BindingManagerImpl. The tests run agains mock ChildProcessConn ection
35 * implementation, thus testing only the BindingManagerImpl itself. 35 * implementation, thus testing only the BindingManagerImpl itself.
36 * 36 *
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 696
697 manager.onSentToBackground(); 697 manager.onSentToBackground();
698 ShadowLooper.runUiThreadTasksIncludingDelayedTasks(); 698 ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
699 Assert.assertFalse(connection.isModerateBindingBound()); 699 Assert.assertFalse(connection.isModerateBindingBound());
700 700
701 // Bringing Chrome to the foreground should not re-add the moderate bind ings. 701 // Bringing Chrome to the foreground should not re-add the moderate bind ings.
702 manager.onBroughtToForeground(); 702 manager.onBroughtToForeground();
703 Assert.assertFalse(connection.isModerateBindingBound()); 703 Assert.assertFalse(connection.isModerateBindingBound());
704 } 704 }
705 } 705 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698