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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/EncodingDetectionTest.java

Issue 2294173002: Enable browser encoding autodetection test (Closed)
Patch Set: renamed test docs Created 4 years, 3 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 | « chrome/android/java_sources.gni ('k') | chrome/browser/browser_encoding_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/EncodingDetectionTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/EncodingDetectionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/EncodingDetectionTest.java
deleted file mode 100644
index 8f0896ea3c0c9c0d2e12e578d368209227d73ad8..0000000000000000000000000000000000000000
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/EncodingDetectionTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser;
-
-import android.os.Environment;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.chromium.base.test.util.Feature;
-import org.chromium.chrome.test.ChromeActivityTestCaseBase;
-import org.chromium.net.test.EmbeddedTestServer;
-
-/**
- * Tests text encoding detection.
- */
-public class EncodingDetectionTest extends ChromeActivityTestCaseBase<ChromeActivity> {
-
- // TODO(jinsukkim): Fix and enable BrowserEncodingTest::TestEncodingAutoDetect()
- // once auto-detection turns on for desktop platforms. Then this test can
- // be removed safely since the native part handling encoding detection is
- // shared with Android platform.
-
- private EmbeddedTestServer mTestServer;
-
- public EncodingDetectionTest() {
- super(ChromeActivity.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- mTestServer = EmbeddedTestServer.createAndStartFileServer(
- getInstrumentation().getContext(), Environment.getExternalStorageDirectory());
- }
-
- @Override
- protected void tearDown() throws Exception {
- mTestServer.stopAndDestroyServer();
- super.tearDown();
- }
-
- @Override
- public void startMainActivity() throws InterruptedException {
- startMainActivityOnBlankPage();
- }
-
- @SmallTest
- @Feature({"Encoding"})
- public void testAutodetectEncoding() throws Exception {
-
- String testUrl = mTestServer.getURL(
- "/chrome/test/data/encoding_tests/auto_detect/"
- + "Big5_with_no_encoding_specified.html");
- loadUrl(testUrl);
- assertEquals("Wrong page encoding detected", "Big5",
- getActivity().getCurrentContentViewCore().getWebContents().getEncoding());
- }
-}
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/browser/browser_encoding_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698