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

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

Issue 2092283002: Revert of Enable subframe FrameNavigationEntries by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | content/common/site_isolation_policy.cc » ('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.graphics.Bitmap; 7 import android.graphics.Bitmap;
8 import android.test.suitebuilder.annotation.SmallTest; 8 import android.test.suitebuilder.annotation.SmallTest;
9 9
10 import org.chromium.android_webview.AwContents; 10 import org.chromium.android_webview.AwContents;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 final String page2Title = "Page2"; 252 final String page2Title = "Page2";
253 final String page2Html = "<html><head><title>" + page2Title + "</tit le>" 253 final String page2Html = "<html><head><title>" + page2Title + "</tit le>"
254 + "<body>" + page2Title + "</body></html>"; 254 + "<body>" + page2Title + "</body></html>";
255 255
256 final TestCallbackHelperContainer.OnPageFinishedHelper onPageFinishe dHelper = 256 final TestCallbackHelperContainer.OnPageFinishedHelper onPageFinishe dHelper =
257 mContentsClient.getOnPageFinishedHelper(); 257 mContentsClient.getOnPageFinishedHelper();
258 loadDataSync(mAwContents, onPageFinishedHelper, page2Html, "text/htm l", false); 258 loadDataSync(mAwContents, onPageFinishedHelper, page2Html, "text/htm l", false);
259 assertEquals(page2Title, getTitleOnUiThread(mAwContents)); 259 assertEquals(page2Title, getTitleOnUiThread(mAwContents));
260 260
261 HistoryUtils.goBackSync(getInstrumentation(), mWebContents, onPageFi nishedHelper); 261 HistoryUtils.goBackSync(getInstrumentation(), mWebContents, onPageFi nishedHelper);
262 // The title of first page loaded with loadDataWithBaseUrl. 262 // The title of the 'about.html' specified via historyUrl.
263 assertEquals(page1Title, getTitleOnUiThread(mAwContents)); 263 assertEquals(CommonResources.ABOUT_TITLE, getTitleOnUiThread(mAwCont ents));
264 } finally { 264 } finally {
265 webServer.shutdown(); 265 webServer.shutdown();
266 } 266 }
267 } 267 }
268 268
269 /** 269 /**
270 * @return true if |fileUrl| was accessible from a data url with |baseUrl| a s it's 270 * @return true if |fileUrl| was accessible from a data url with |baseUrl| a s it's
271 * base URL. 271 * base URL.
272 */ 272 */
273 private boolean canAccessFileFromData(String baseUrl, String fileUrl) throws Throwable { 273 private boolean canAccessFileFromData(String baseUrl, String fileUrl) throws Throwable {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 mContentsClient.getOnPageFinishedHelper(); 405 mContentsClient.getOnPageFinishedHelper();
406 final int callCount = onPageFinishedHelper.getCallCount(); 406 final int callCount = onPageFinishedHelper.getCallCount();
407 getAwSettingsOnUiThread(mAwContents).setJavaScriptEnabled(true); 407 getAwSettingsOnUiThread(mAwContents).setJavaScriptEnabled(true);
408 loadDataWithBaseUrlAsync(mAwContents, pageHtml, "text/html", false, inva lidBaseUrl, null); 408 loadDataWithBaseUrlAsync(mAwContents, pageHtml, "text/html", false, inva lidBaseUrl, null);
409 loadUrlAsync(mAwContents, "javascript:42"); 409 loadUrlAsync(mAwContents, "javascript:42");
410 onPageFinishedHelper.waitForCallback(callCount); 410 onPageFinishedHelper.waitForCallback(callCount);
411 // Verify that the load succeeds. The actual base url is undefined. 411 // Verify that the load succeeds. The actual base url is undefined.
412 assertEquals(CommonResources.ABOUT_TITLE, getTitleOnUiThread(mAwContents )); 412 assertEquals(CommonResources.ABOUT_TITLE, getTitleOnUiThread(mAwContents ));
413 } 413 }
414 } 414 }
OLDNEW
« no previous file with comments | « no previous file | content/common/site_isolation_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698