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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java

Issue 2013883002: ✈ Remove unnecessary flag and DocumentModeManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and review. Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Environment; 8 import android.os.Environment;
9 import android.test.MoreAsserts; 9 import android.test.MoreAsserts;
10 import android.test.suitebuilder.annotation.LargeTest; 10 import android.test.suitebuilder.annotation.LargeTest;
(...skipping 24 matching lines...) Expand all
35 import org.chromium.net.test.EmbeddedTestServer; 35 import org.chromium.net.test.EmbeddedTestServer;
36 import org.chromium.ui.base.DeviceFormFactor; 36 import org.chromium.ui.base.DeviceFormFactor;
37 import org.chromium.ui.base.PageTransition; 37 import org.chromium.ui.base.PageTransition;
38 38
39 import java.util.concurrent.Callable; 39 import java.util.concurrent.Callable;
40 40
41 /** 41 /**
42 * Integration tests for the BindingManager API. This test plants a mock Binding Manager 42 * Integration tests for the BindingManager API. This test plants a mock Binding Manager
43 * implementation and verifies that the signals it relies on are correctly deliv ered. 43 * implementation and verifies that the signals it relies on are correctly deliv ered.
44 */ 44 */
45 @CommandLineFlags.Add(ChromeSwitches.DISABLE_DOCUMENT_MODE) // crbug.com/414719
46 public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch romeActivity> { 45 public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch romeActivity> {
47 46
48 private static class MockBindingManager implements BindingManager { 47 private static class MockBindingManager implements BindingManager {
49 // Maps pid to the last received visibility state of the renderer. 48 // Maps pid to the last received visibility state of the renderer.
50 private final SparseBooleanArray mProcessInForegroundMap = new SparseBoo leanArray(); 49 private final SparseBooleanArray mProcessInForegroundMap = new SparseBoo leanArray();
51 // Maps pid to a string recording calls to setInForeground() and visibil ityDetermined(). 50 // Maps pid to a string recording calls to setInForeground() and visibil ityDetermined().
52 private final SparseArray<String> mVisibilityCallsMap = new SparseArray< String>(); 51 private final SparseArray<String> mVisibilityCallsMap = new SparseArray< String>();
53 private boolean mIsReleaseAllModerateBindingsCalled; 52 private boolean mIsReleaseAllModerateBindingsCalled;
54 53
55 void assertIsInForeground(final int pid) { 54 void assertIsInForeground(final int pid) {
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 super.tearDown(); 657 super.tearDown();
659 } 658 }
660 659
661 /** 660 /**
662 * @return the index of the given tab in the current tab model 661 * @return the index of the given tab in the current tab model
663 */ 662 */
664 private int indexOf(Tab tab) { 663 private int indexOf(Tab tab) {
665 return getActivity().getCurrentTabModel().indexOf(tab); 664 return getActivity().getCurrentTabModel().indexOf(tab);
666 } 665 }
667 } 666 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698