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

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

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: Fix Android PDF tests where PDFs should be downloaded 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 | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.support.test.filters.MediumTest; 7 import android.support.test.filters.MediumTest;
8 import android.text.TextUtils; 8 import android.text.TextUtils;
9 9
10 import org.chromium.base.ThreadUtils; 10 import org.chromium.base.ThreadUtils;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 }); 106 });
107 TouchCommon.singleClickView(infobar.getView().findViewById(R.id.button_p rimary)); 107 TouchCommon.singleClickView(infobar.getView().findViewById(R.id.button_p rimary));
108 108
109 // Document mode popups appear slowly and sequentially to prevent Androi d from throwing them 109 // Document mode popups appear slowly and sequentially to prevent Androi d from throwing them
110 // away, so use a long timeout. http://crbug.com/498920. 110 // away, so use a long timeout. http://crbug.com/498920.
111 CriteriaHelper.pollUiThread(new Criteria() { 111 CriteriaHelper.pollUiThread(new Criteria() {
112 @Override 112 @Override
113 public boolean isSatisfied() { 113 public boolean isSatisfied() {
114 if (getNumInfobarsShowing() != 0) return false; 114 if (getNumInfobarsShowing() != 0) return false;
115 return TextUtils.equals("Popup #3", selector.getCurrentTab().get Title()); 115 return TextUtils.equals("Three", selector.getCurrentTab().getTit le());
116 } 116 }
117 }, 7500, CriteriaHelper.DEFAULT_POLLING_INTERVAL); 117 }, 7500, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
118 118
119 assertEquals(4, selector.getTotalTabCount()); 119 assertEquals(4, selector.getTotalTabCount());
120 int currentTabId = selector.getCurrentTab().getId(); 120 int currentTabId = selector.getCurrentTab().getId();
121 121
122 // Test that revisiting the original page makes popup windows immediatel y. 122 // Test that revisiting the original page makes popup windows immediatel y.
123 loadUrl(mPopupHtmlUrl); 123 loadUrl(mPopupHtmlUrl);
124 CriteriaHelper.pollUiThread(new Criteria() { 124 CriteriaHelper.pollUiThread(new Criteria() {
125 @Override 125 @Override
126 public boolean isSatisfied() { 126 public boolean isSatisfied() {
127 if (getNumInfobarsShowing() != 0) return false; 127 if (getNumInfobarsShowing() != 0) return false;
128 if (selector.getTotalTabCount() != 7) return false; 128 if (selector.getTotalTabCount() != 7) return false;
129 return TextUtils.equals("Popup #3", selector.getCurrentTab().get Title()); 129 return TextUtils.equals("Three", selector.getCurrentTab().getTit le());
130 } 130 }
131 }, 7500, CriteriaHelper.DEFAULT_POLLING_INTERVAL); 131 }, 7500, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
132 assertNotSame(currentTabId, selector.getCurrentTab().getId()); 132 assertNotSame(currentTabId, selector.getCurrentTab().getId());
133 } 133 }
134 } 134 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698