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

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

Issue 1276993002: Revert of Add custom tabs tests using intents with non-null sessions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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.customtabs; 5 package org.chromium.chrome.browser.customtabs;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.os.Bundle; 8 import android.os.Bundle;
9 import android.test.suitebuilder.annotation.SmallTest; 9 import android.test.suitebuilder.annotation.SmallTest;
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 } 52 }
53 53
54 private static final String TEST_URL = "about:blank"; 54 private static final String TEST_URL = "about:blank";
55 private ExternalNavigationHandler mUrlHandler; 55 private ExternalNavigationHandler mUrlHandler;
56 private CustomTabNavigationDelegate mNavigationDelegate; 56 private CustomTabNavigationDelegate mNavigationDelegate;
57 57
58 @Override 58 @Override
59 public void startMainActivity() throws InterruptedException { 59 public void startMainActivity() throws InterruptedException {
60 super.startMainActivity(); 60 super.startMainActivity();
61 startCustomTabActivityWithIntent(CustomTabsTestUtils.createMinimalCustom TabIntent( 61 startCustomTabActivityWithIntent(createMinimalCustomTabIntent(TEST_URL)) ;
62 getInstrumentation().getTargetContext(), TEST_URL, null));
63 Tab tab = getActivity().getActivityTab(); 62 Tab tab = getActivity().getActivityTab();
64 assertTrue("A custom tab is not present in the activity.", tab instanceo f CustomTab); 63 assertTrue("A custom tab is not present in the activity.", tab instanceo f CustomTab);
65 CustomTab customTab = (CustomTab) tab; 64 CustomTab customTab = (CustomTab) tab;
66 mUrlHandler = customTab.getExternalNavigationHandler(); 65 mUrlHandler = customTab.getExternalNavigationHandler();
67 mNavigationDelegate = customTab.getExternalNavigationDelegate(); 66 mNavigationDelegate = customTab.getExternalNavigationDelegate();
68 } 67 }
69 68
70 /** 69 /**
71 * For urls with special schemes and hosts, and there is exactly one activit y having a matching 70 * For urls with special schemes and hosts, and there is exactly one activit y having a matching
72 * intent filter, the framework will make that activity the default handler of the special url. 71 * intent filter, the framework will make that activity the default handler of the special url.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 false); 119 false);
121 } 120 }
122 }); 121 });
123 122
124 loadUrlHelper.waitForCallback(0, 1); 123 loadUrlHelper.waitForCallback(0, 1);
125 assertTrue("A new tab should not have been created.", 124 assertTrue("A new tab should not have been created.",
126 ApplicationStatus.getLastTrackedFocusedActivity() == getActivity ()); 125 ApplicationStatus.getLastTrackedFocusedActivity() == getActivity ());
127 assertEquals(testUrl, getActivity().getActivityTab().getUrl()); 126 assertEquals(testUrl, getActivity().getActivityTab().getUrl());
128 } 127 }
129 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698