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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/LoadUrlTest.java

Issue 1945913002: Revert of 🎯 Fail if an instrumentation test is missing size annotation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.test.suitebuilder.annotation.SmallTest; 7 import android.test.suitebuilder.annotation.SmallTest;
8 import android.util.Pair; 8 import android.util.Pair;
9 9
10 import org.apache.http.Header; 10 import org.apache.http.Header;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 final String pageTitle = "Hello, World!"; 370 final String pageTitle = "Hello, World!";
371 int onReceivedTitleCallCount = onReceivedTitleHelper.getCallCount(); 371 int onReceivedTitleCallCount = onReceivedTitleHelper.getCallCount();
372 loadUrlAsync(awContents, "javascript:document.title=\"" + pageTitle + "\";void(0);"); 372 loadUrlAsync(awContents, "javascript:document.title=\"" + pageTitle + "\";void(0);");
373 onReceivedTitleHelper.waitForCallback(onReceivedTitleCallCount); 373 onReceivedTitleHelper.waitForCallback(onReceivedTitleCallCount);
374 assertEquals(pageTitle, onReceivedTitleHelper.getTitle()); 374 assertEquals(pageTitle, onReceivedTitleHelper.getTitle());
375 } finally { 375 } finally {
376 webServer.shutdown(); 376 webServer.shutdown();
377 } 377 }
378 } 378 }
379 379
380 @SmallTest
381 @Feature({"AndroidWebView"})
382 public void testOnReceivedTitleForUnchangingTitle() throws Throwable { 380 public void testOnReceivedTitleForUnchangingTitle() throws Throwable {
383 final TestAwContentsClient contentsClient = new TestAwContentsClient(); 381 final TestAwContentsClient contentsClient = new TestAwContentsClient();
384 final AwTestContainerView testContainerView = 382 final AwTestContainerView testContainerView =
385 createAwTestContainerViewOnMainSync(contentsClient); 383 createAwTestContainerViewOnMainSync(contentsClient);
386 final AwContents awContents = testContainerView.getAwContents(); 384 final AwContents awContents = testContainerView.getAwContents();
387 385
388 TestWebServer webServer = TestWebServer.start(); 386 TestWebServer webServer = TestWebServer.start();
389 try { 387 try {
390 final String title = "Title"; 388 final String title = "Title";
391 final String url1 = webServer.setResponse("/page1.html", 389 final String url1 = webServer.setResponse("/page1.html",
(...skipping 10 matching lines...) Expand all
402 // onReceivedTitle is still being called. 400 // onReceivedTitle is still being called.
403 onReceivedTitleCallCount = onReceivedTitleHelper.getCallCount(); 401 onReceivedTitleCallCount = onReceivedTitleHelper.getCallCount();
404 loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(), ur l2); 402 loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(), ur l2);
405 onReceivedTitleHelper.waitForCallback(onReceivedTitleCallCount); 403 onReceivedTitleHelper.waitForCallback(onReceivedTitleCallCount);
406 assertEquals(title, onReceivedTitleHelper.getTitle()); 404 assertEquals(title, onReceivedTitleHelper.getTitle());
407 } finally { 405 } finally {
408 webServer.shutdown(); 406 webServer.shutdown();
409 } 407 }
410 } 408 }
411 } 409 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698