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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/broken-chunked-encoding.html

Issue 2645493002: Increase the lifetime of Navigation Preload related objects. (Closed)
Patch Set: check fetchEvent in ServiceWorkerGlobalScopeProxy::onNavigationPreloadError Created 3 years, 11 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
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/broken-chunked-encoding.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/broken-chunked-encoding.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/broken-chunked-encoding.html
new file mode 100644
index 0000000000000000000000000000000000000000..fcb659b0906e93cd89548d1727b0f812dbd1fd35
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/broken-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/broken-chunked-encoding-worker.js';
+ var scope = 'resources/broken-chunked-encoding-scope.php';
+ return service_worker_unregister_and_register(t, script, scope)
+ .then(reg => {
+ registration = reg;
falken 2017/01/18 14:24:59 add_completion_callback to 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,
+ 'Done');
+ });
+ }, 'Navigation Preload with broken chunked encoding doesn\'t crash.');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698