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

Unified Diff: chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java

Issue 619263002: Remove chrome://welcome page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed clang Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
diff --git a/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java b/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
index 76a5143918129ce61edb9de2fdd29d92634e3d8a..0d6e332666f62bd3fa6c8a6a69ce7d7c03a5170c 100644
--- a/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
+++ b/chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java
@@ -6,16 +6,10 @@ package org.chromium.chrome.shell;
import android.test.suitebuilder.annotation.SmallTest;
-import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.Feature;
-import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.ContentViewRenderView;
import org.chromium.ui.base.WindowAndroid;
-import java.util.Locale;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-
/**
* Basic sanity test for loading urls in ChromeShell.
*/
@@ -33,53 +27,6 @@ public class ChromeShellUrlTest extends ChromeShellTestBase {
assertNotNull(activity);
}
- @SmallTest
- @Feature({"Main"})
Ted C 2014/10/02 17:29:32 I think we want to keep some sort of test like thi
- public void testChromeWelcomePageLoads() throws InterruptedException {
- String welcomeUrl = "chrome://welcome/";
- final ChromeShellActivity activity = launchChromeShellWithUrl(welcomeUrl);
- waitForActiveShellToBeDoneLoading();
-
- // Make sure the activity was created as expected.
- assertNotNull(activity);
-
- // Ensure we have a valid ContentViewCore.
- final AtomicReference<ContentViewCore> contentViewCore =
- new AtomicReference<ContentViewCore>();
- ThreadUtils.runOnUiThreadBlocking(new Runnable() {
- @Override
- public void run() {
- contentViewCore.set(activity.getActiveContentViewCore());
- }
- });
- assertNotNull(contentViewCore.get());
- assertNotNull(contentViewCore.get().getContainerView());
-
- // Ensure the correct page has been loaded, ie. not interstitial, and title/url should
- // be sane. Note, a typical correct title is: "Welcome to Chromium", whereas a wrong one
- // would be on the form "chrome://welcome/ is not available".
- final AtomicBoolean isShowingInterstitialPage = new AtomicBoolean();
- final AtomicReference<String> url = new AtomicReference<String>();
- final AtomicReference<String> title = new AtomicReference<String>();
- ThreadUtils.runOnUiThreadBlocking(new Runnable() {
- @Override
- public void run() {
- isShowingInterstitialPage.set(contentViewCore.get().getWebContents()
- .isShowingInterstitialPage());
- url.set(contentViewCore.get().getWebContents().getUrl());
- title.set(contentViewCore.get().getWebContents().getTitle());
- }
- });
- assertFalse("Showed interstitial page instead of welcome page",
- isShowingInterstitialPage.get());
- assertNotNull("URL was null", url.get());
- assertTrue("URL did not contain: " + welcomeUrl + ". Was: " + url.get(),
- url.get().contains(welcomeUrl));
- assertNotNull("Title was null", title.get());
- assertFalse("Title should not contain: " + welcomeUrl + ". Was: " + title.get(),
- title.get().toLowerCase(Locale.US).contains(welcomeUrl));
- }
-
/**
* Tests that creating an extra ContentViewRenderView does not cause an assert because we would
* initialize the compositor twice http://crbug.com/162312
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698