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

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

Issue 2828793002: Refactoring ChildProcessConnection. (Closed)
Patch Set: More test fixing. Created 3 years, 8 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 | build/android/lint/suppressions.xml » ('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;
36 import org.chromium.content.browser.ChildProcessLauncher; 35 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, ChildProcessConnection connection) { 588 public void addNewConnection(int pid, ManagedChildProcessConnection conn ection) {
589 mIsChildProcessCreated = true; 589 mIsChildProcessCreated = true;
590 } 590 }
591 591
592 @Override 592 @Override
593 public void setInForeground(int pid, boolean inForeground) { 593 public void setInForeground(int pid, boolean inForeground) {
594 synchronized (mForegroundStateLock) { 594 synchronized (mForegroundStateLock) {
595 mForegroundState.add(inForeground); 595 mForegroundState.add(inForeground);
596 mForegroundStateLock.notifyAll(); 596 mForegroundStateLock.notifyAll();
597 } 597 }
598 } 598 }
599 599
600 @Override 600 @Override
601 public void determinedVisibility(int pid) {} 601 public void determinedVisibility(int pid) {}
602 602
603 @Override 603 @Override
604 public void onSentToBackground() {} 604 public void onSentToBackground() {}
605 605
606 @Override 606 @Override
607 public void onBroughtToForeground() {} 607 public void onBroughtToForeground() {}
608 608
609 @Override 609 @Override
610 public boolean isOomProtected(int pid) { 610 public void removeConnection(int pid) {}
611 return false;
612 }
613
614 @Override
615 public void clearConnection(int pid) {}
616 611
617 @Override 612 @Override
618 public void startModerateBindingManagement(Context context, int maxSize) {} 613 public void startModerateBindingManagement(Context context, int maxSize) {}
619 614
620 @Override 615 @Override
621 public void releaseAllModerateBindings() {} 616 public void releaseAllModerateBindings() {}
622 } 617 }
623 618
624 /** 619 /**
625 * Verifies that a child process is actually gets created with WEBVIEW_SANDB OXED_RENDERER flag. 620 * Verifies that a child process is actually gets created with WEBVIEW_SANDB OXED_RENDERER flag.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 public void testPauseDestroyResume() throws Throwable { 740 public void testPauseDestroyResume() throws Throwable {
746 AwContents awContents; 741 AwContents awContents;
747 awContents = createAwTestContainerView(mContentsClient).getAwContents(); 742 awContents = createAwTestContainerView(mContentsClient).getAwContents();
748 awContents.pauseTimers(); 743 awContents.pauseTimers();
749 awContents.pauseTimers(); 744 awContents.pauseTimers();
750 awContents.destroy(); 745 awContents.destroy();
751 awContents = createAwTestContainerView(mContentsClient).getAwContents(); 746 awContents = createAwTestContainerView(mContentsClient).getAwContents();
752 awContents.resumeTimers(); 747 awContents.resumeTimers();
753 } 748 }
754 } 749 }
OLDNEW
« no previous file with comments | « no previous file | build/android/lint/suppressions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698