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

Side by Side Diff: base/android/javatests/src/org/chromium/base/AdvancedMockContextTest.java

Issue 2583933003: Replace deprecated Android java test annotations (Closed)
Patch Set: Rebase again :( Created 3 years, 12 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.base; 5 package org.chromium.base;
6 6
7 import android.app.Application; 7 import android.app.Application;
8 import android.content.ComponentCallbacks; 8 import android.content.ComponentCallbacks;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
11 import android.content.res.Configuration; 11 import android.content.res.Configuration;
12 import android.support.test.filters.SmallTest;
12 import android.test.InstrumentationTestCase; 13 import android.test.InstrumentationTestCase;
13 import android.test.suitebuilder.annotation.SmallTest;
14 14
15 import org.chromium.base.test.util.AdvancedMockContext; 15 import org.chromium.base.test.util.AdvancedMockContext;
16 16
17 /** 17 /**
18 * Tests for {@link org.chromium.base.test.util.AdvancedMockContext}. 18 * Tests for {@link org.chromium.base.test.util.AdvancedMockContext}.
19 */ 19 */
20 public class AdvancedMockContextTest extends InstrumentationTestCase { 20 public class AdvancedMockContextTest extends InstrumentationTestCase {
21 private static class Callback1 implements ComponentCallbacks { 21 private static class Callback1 implements ComponentCallbacks {
22 protected Configuration mConfiguration; 22 protected Configuration mConfiguration;
23 protected boolean mOnLowMemoryCalled; 23 protected boolean mOnLowMemoryCalled;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 assertEquals("onConfigurationChanged should have been called.", configur ation, 61 assertEquals("onConfigurationChanged should have been called.", configur ation,
62 callback1.mConfiguration); 62 callback1.mConfiguration);
63 assertEquals("onConfigurationChanged should have been called.", configur ation, 63 assertEquals("onConfigurationChanged should have been called.", configur ation,
64 callback2.mConfiguration); 64 callback2.mConfiguration);
65 65
66 targetApplication.onTrimMemory(ComponentCallbacks2.TRIM_MEMORY_MODERATE) ; 66 targetApplication.onTrimMemory(ComponentCallbacks2.TRIM_MEMORY_MODERATE) ;
67 assertEquals("onTrimMemory should have been called.", ComponentCallbacks 2 67 assertEquals("onTrimMemory should have been called.", ComponentCallbacks 2
68 .TRIM_MEMORY_MODERATE, callback2.mLevel); 68 .TRIM_MEMORY_MODERATE, callback2.mLevel);
69 } 69 }
70 } 70 }
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | base/android/javatests/src/org/chromium/base/ApiCompatibilityUtilsTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698