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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/css/font-face-src-cached.html

Issue 2162913002: Set request context when restoring cached CSSFontFaceSrcValue resource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add layout test Created 4 years, 5 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 | third_party/WebKit/LayoutTests/http/tests/css/resources/font-face-src-cached-iframe.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/css/font-face-src-cached.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/css/font-face-src-cached.html b/third_party/WebKit/LayoutTests/http/tests/css/font-face-src-cached.html
new file mode 100644
index 0000000000000000000000000000000000000000..e48c7b6ead14f4139aba01368e3eed92bbcad9b9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/css/font-face-src-cached.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<link rel="stylesheet" href="resources/font-face-via-https.css">
+</head>
+<body>
+<p>Outer page text</p>
+<iframe></iframe>
+<script>
+async_test(function(t) {
+ window.addEventListener('load', t.step_func(function() {
+ if (window.internals) {
+ // Check that the font face is in the Resource::Cached state.
+ assert_true(window.internals.isLoadingFromMemoryCache(
+ 'https://localhost:8443/css/resources/cors-ahem.php'))
+ }
+
+ var iframe = document.querySelector('iframe');
+
+ // This will cause a renderer crash if DCHECKs are enabled and the request
+ // for restoring the font face has SSL errors and doesn't have the
+ // WebURLRequest::RequestContextFont context (crbug.com/624474).
+ iframe.src = 'resources/font-face-src-cached-iframe.html';
+ iframe.addEventListener('load', t.step_func(function() {
+ t.done();
+ }));
+ }));
+}, 'Test using cached CSS font face src value resources (see ' +
+ 'CSSFontFaceSrcValue::restoreCachedResourceIfNeeded)');
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/css/resources/font-face-src-cached-iframe.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698