Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chunked-encoding.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chunked-encoding.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chunked-encoding.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..50b222371c3b682ad7b63e7476d1b4c7aa2a5a37 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chunked-encoding.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<meta charset="utf-8"> |
+<title>Navigation Preload with chunked encoding</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="../resources/test-helpers.js"></script> |
+<script> |
+promise_test(t => { |
+ var script = 'resources/chunked-encoding-worker.js'; |
+ var scope = 'resources/chunked-encoding-scope.php'; |
+ return service_worker_unregister_and_register(t, script, scope) |
+ .then(reg => { |
+ registration = reg; |
falken
2017/01/18 14:24:59
ditto: unregister
horo
2017/01/18 16:14:57
Done.
|
+ worker = registration.installing; |
+ return wait_for_state(t, worker, 'activated'); |
+ }) |
+ .then(_ => with_iframe(scope)) |
+ .then(frame => { |
+ assert_equals( |
+ frame.contentDocument.body.textContent, |
+ '0123456789'); |
+ }); |
+ }, 'Navigation Preload must work with chunked encoding.'); |
+ |
+</script> |