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

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

Issue 38523002: Using largest favicon for shortcut when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass in launcher_large_icon_size Created 7 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.Intent; 7 import android.content.Intent;
8 import android.os.Parcel; 8 import android.os.Parcel;
9 import android.test.FlakyTest; 9 import android.test.FlakyTest;
10 import android.test.suitebuilder.annotation.MediumTest; 10 import android.test.suitebuilder.annotation.MediumTest;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 private void addShortcutToURL(String url, final String title) throws Interru ptedException { 157 private void addShortcutToURL(String url, final String title) throws Interru ptedException {
158 loadUrlWithSanitization(url); 158 loadUrlWithSanitization(url);
159 assertTrue(waitForActiveShellToBeDoneLoading()); 159 assertTrue(waitForActiveShellToBeDoneLoading());
160 160
161 // Add the shortcut. 161 // Add the shortcut.
162 getInstrumentation().runOnMainSync(new Runnable() { 162 getInstrumentation().runOnMainSync(new Runnable() {
163 @Override 163 @Override
164 public void run() { 164 public void run() {
165 ShortcutHelper.addShortcut(mActivity.getActiveTab(), title); 165 ShortcutHelper.addShortcut(mActivity.getApplicationContext(),
166 mActivity.getActiveTab(), title);
166 } 167 }
167 }); 168 });
168 169
169 // Make sure that the shortcut was added. 170 // Make sure that the shortcut was added.
170 assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { 171 assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {
171 @Override 172 @Override
172 public boolean isSatisfied() { 173 public boolean isSatisfied() {
173 return mTestObserver.firedIntent != null; 174 return mTestObserver.firedIntent != null;
174 } 175 }
175 })); 176 }));
176 } 177 }
177 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698