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

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

Issue 12880022: [android_webview] Rename AndroidWebView* -> Aw*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.test.suitebuilder.annotation.Smoke; 8 import android.test.suitebuilder.annotation.Smoke;
9 9
10 import org.chromium.android_webview.AwContents; 10 import org.chromium.android_webview.AwContents;
11 import org.chromium.base.test.util.Feature; 11 import org.chromium.base.test.util.Feature;
12 import org.chromium.base.test.util.DisabledTest; 12 import org.chromium.base.test.util.DisabledTest;
13 import org.chromium.net.test.util.TestWebServer; 13 import org.chromium.net.test.util.TestWebServer;
14 14
15 /** 15 /**
16 * A test suite for ContentView.getTitle(). 16 * A test suite for ContentView.getTitle().
17 */ 17 */
18 public class GetTitleTest extends AndroidWebViewTestBase { 18 public class GetTitleTest extends AwTestBase {
19 private static final String TITLE = "TITLE"; 19 private static final String TITLE = "TITLE";
20 20
21 private static final String GET_TITLE_TEST_PATH = "/get_title_test.html"; 21 private static final String GET_TITLE_TEST_PATH = "/get_title_test.html";
22 private static final String GET_TITLE_TEST_EMPTY_PATH = "/get_title_test_emp ty.html"; 22 private static final String GET_TITLE_TEST_EMPTY_PATH = "/get_title_test_emp ty.html";
23 private static final String GET_TITLE_TEST_NO_TITLE_PATH = "/get_title_test_ no_title.html"; 23 private static final String GET_TITLE_TEST_NO_TITLE_PATH = "/get_title_test_ no_title.html";
24 24
25 private TestAwContentsClient mContentsClient; 25 private TestAwContentsClient mContentsClient;
26 private AwContents mAwContents; 26 private AwContents mAwContents;
27 27
28 private static class PageInfo { 28 private static class PageInfo {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 final String expectedTitle = "Expected"; 161 final String expectedTitle = "Expected";
162 final String page = 162 final String page =
163 // Note: document.title="...";document.writeln(document.title); also fails. 163 // Note: document.title="...";document.writeln(document.title); also fails.
164 "<html>" + 164 "<html>" +
165 "<body onload='document.writeln(document.title=\"" + expectedTit le + "\")'>" + 165 "<body onload='document.writeln(document.title=\"" + expectedTit le + "\")'>" +
166 "</body></html>"; 166 "</body></html>";
167 final String title = loadFromDataAndGetTitle(page); 167 final String title = loadFromDataAndGetTitle(page);
168 assertEquals("Incorrect title :: ", expectedTitle, title); 168 assertEquals("Incorrect title :: ", expectedTitle, title);
169 } 169 }
170 } 170 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698