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

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

Issue 2826253004: Enable all tests in CopylessPasteTest (Closed)
Patch Set: 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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.LargeTest; 7 import android.support.test.filters.LargeTest;
8 8
9 import org.chromium.base.Callback; 9 import org.chromium.base.Callback;
10 import org.chromium.base.ThreadUtils; 10 import org.chromium.base.ThreadUtils;
11 import org.chromium.base.test.util.CallbackHelper; 11 import org.chromium.base.test.util.CallbackHelper;
12 import org.chromium.base.test.util.CommandLineFlags; 12 import org.chromium.base.test.util.CommandLineFlags;
13 import org.chromium.base.test.util.DisabledTest;
14 import org.chromium.base.test.util.Feature; 13 import org.chromium.base.test.util.Feature;
15 import org.chromium.base.test.util.Restriction; 14 import org.chromium.base.test.util.Restriction;
16 import org.chromium.blink.mojom.document_metadata.Entity; 15 import org.chromium.blink.mojom.document_metadata.Entity;
17 import org.chromium.blink.mojom.document_metadata.Property; 16 import org.chromium.blink.mojom.document_metadata.Property;
18 import org.chromium.blink.mojom.document_metadata.Values; 17 import org.chromium.blink.mojom.document_metadata.Values;
19 import org.chromium.blink.mojom.document_metadata.WebPage; 18 import org.chromium.blink.mojom.document_metadata.WebPage;
20 import org.chromium.chrome.browser.firstrun.FirstRunStatus; 19 import org.chromium.chrome.browser.firstrun.FirstRunStatus;
21 import org.chromium.chrome.test.ChromeTabbedActivityTestBase; 20 import org.chromium.chrome.test.ChromeTabbedActivityTestBase;
22 import org.chromium.chrome.test.util.ChromeTabUtils; 21 import org.chromium.chrome.test.util.ChromeTabUtils;
23 import org.chromium.net.test.EmbeddedTestServer; 22 import org.chromium.net.test.EmbeddedTestServer;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 expected.entities = new Entity[1]; 158 expected.entities = new Entity[1];
160 expected.entities[0] = e; 159 expected.entities[0] = e;
161 assertEquals(expected, extracted); 160 assertEquals(expected, extracted);
162 } 161 }
163 162
164 /** 163 /**
165 * Tests that CopylessPaste skips parsing visited pages. 164 * Tests that CopylessPaste skips parsing visited pages.
166 */ 165 */
167 @LargeTest 166 @LargeTest
168 @Feature({"CopylessPaste"}) 167 @Feature({"CopylessPaste"})
169 @DisabledTest(message = "Flaky: crbug.com/713172")
170 public void testCache() throws InterruptedException, TimeoutException { 168 public void testCache() throws InterruptedException, TimeoutException {
171 // The URLs used here should be unique in CopylessPasteTest. 169 loadUrl(mTestServer.getURL(NODATA_PAGE));
172 String uniqueTag = "#123"; 170 loadUrl(mTestServer.getURL(DATA_PAGE));
Maria 2017/04/20 21:34:30 From CL description, it sounds like you think that
wychen 2017/04/20 22:00:54 The flakiness of testNoMeta and testValid is aroun
173 // NODATA_PAGE doesn't contain desired metadata.
174 loadUrl(mTestServer.getURL(NODATA_PAGE + uniqueTag));
175 mCallbackHelper.waitForCallback(0);
176 // DATA_PAGE contains desired metadata.
177 loadUrl(mTestServer.getURL(DATA_PAGE + uniqueTag));
178 mCallbackHelper.waitForCallback(1); 171 mCallbackHelper.waitForCallback(1);
179 172
180 // Cache hit without entities. Shouldn't parse again. 173 // Cache hit without entities. Shouldn't parse again.
181 loadUrl(mTestServer.getURL(NODATA_PAGE + uniqueTag)); 174 loadUrl(mTestServer.getURL(NODATA_PAGE));
182 // Cache hit with entities. Shouldn't parse again. 175 // Cache hit with entities. Shouldn't parse again.
183 loadUrl(mTestServer.getURL(DATA_PAGE + uniqueTag)); 176 loadUrl(mTestServer.getURL(DATA_PAGE));
184 assertEquals(2, mCallbackHelper.getCallCount()); 177 assertEquals(2, mCallbackHelper.getCallCount());
185 } 178 }
186 } 179 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698