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> |