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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java

Issue 2874643002: Merging Managed and Important connection. (Closed)
Patch Set: Fix test + sync Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.graphics.BitmapFactory; 9 import android.graphics.BitmapFactory;
10 import android.graphics.Canvas; 10 import android.graphics.Canvas;
(...skipping 14 matching lines...) Expand all
25 import org.chromium.android_webview.renderer_priority.RendererPriority; 25 import org.chromium.android_webview.renderer_priority.RendererPriority;
26 import org.chromium.android_webview.test.TestAwContentsClient.OnDownloadStartHel per; 26 import org.chromium.android_webview.test.TestAwContentsClient.OnDownloadStartHel per;
27 import org.chromium.android_webview.test.util.CommonResources; 27 import org.chromium.android_webview.test.util.CommonResources;
28 import org.chromium.android_webview.test.util.JSUtils; 28 import org.chromium.android_webview.test.util.JSUtils;
29 import org.chromium.base.annotations.SuppressFBWarnings; 29 import org.chromium.base.annotations.SuppressFBWarnings;
30 import org.chromium.base.test.util.CallbackHelper; 30 import org.chromium.base.test.util.CallbackHelper;
31 import org.chromium.base.test.util.CommandLineFlags; 31 import org.chromium.base.test.util.CommandLineFlags;
32 import org.chromium.base.test.util.Feature; 32 import org.chromium.base.test.util.Feature;
33 import org.chromium.base.test.util.parameter.ParameterizedTest; 33 import org.chromium.base.test.util.parameter.ParameterizedTest;
34 import org.chromium.content.browser.BindingManager; 34 import org.chromium.content.browser.BindingManager;
35 import org.chromium.content.browser.ChildProcessConnection;
35 import org.chromium.content.browser.ChildProcessLauncher; 36 import org.chromium.content.browser.ChildProcessLauncher;
36 import org.chromium.content.browser.ManagedChildProcessConnection;
37 import org.chromium.content_public.common.ContentUrlConstants; 37 import org.chromium.content_public.common.ContentUrlConstants;
38 import org.chromium.net.test.EmbeddedTestServer; 38 import org.chromium.net.test.EmbeddedTestServer;
39 import org.chromium.net.test.util.TestWebServer; 39 import org.chromium.net.test.util.TestWebServer;
40 40
41 import java.io.InputStream; 41 import java.io.InputStream;
42 import java.net.URL; 42 import java.net.URL;
43 import java.util.ArrayList; 43 import java.util.ArrayList;
44 import java.util.HashMap; 44 import java.util.HashMap;
45 import java.util.List; 45 import java.util.List;
46 import java.util.Map; 46 import java.util.Map;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 } 578 }
579 } 579 }
580 assertTrue(mForegroundState.size() != 0); 580 assertTrue(mForegroundState.size() != 0);
581 assertEquals(inForeground, mForegroundState.get(0).booleanValue( )); 581 assertEquals(inForeground, mForegroundState.get(0).booleanValue( ));
582 mForegroundState.remove(0); 582 mForegroundState.remove(0);
583 return; 583 return;
584 } 584 }
585 } 585 }
586 586
587 @Override 587 @Override
588 public void addNewConnection(int pid, ManagedChildProcessConnection conn ection) { 588 public void addNewConnection(int pid, ChildProcessConnection connection) {
589 mIsChildProcessCreated = true; 589 mIsChildProcessCreated = true;
590 } 590 }
591 591
592 @Override 592 @Override
593 public void setPriority(int pid, boolean foreground, boolean boostForPen dingView) { 593 public void setPriority(int pid, boolean foreground, boolean boostForPen dingView) {
594 synchronized (mForegroundStateLock) { 594 synchronized (mForegroundStateLock) {
595 mForegroundState.add(foreground); 595 mForegroundState.add(foreground);
596 mForegroundStateLock.notifyAll(); 596 mForegroundStateLock.notifyAll();
597 } 597 }
598 } 598 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 public void testPauseDestroyResume() throws Throwable { 737 public void testPauseDestroyResume() throws Throwable {
738 AwContents awContents; 738 AwContents awContents;
739 awContents = createAwTestContainerView(mContentsClient).getAwContents(); 739 awContents = createAwTestContainerView(mContentsClient).getAwContents();
740 awContents.pauseTimers(); 740 awContents.pauseTimers();
741 awContents.pauseTimers(); 741 awContents.pauseTimers();
742 awContents.destroy(); 742 awContents.destroy();
743 awContents = createAwTestContainerView(mContentsClient).getAwContents(); 743 awContents = createAwTestContainerView(mContentsClient).getAwContents();
744 awContents.resumeTimers(); 744 awContents.resumeTimers();
745 } 745 }
746 } 746 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698