Commit bd4c0570 authored by falken@chromium.org's avatar falken@chromium.org

Fix mistaken use of promise in multiple-register.html

service_worker_unregister_and_done was outside of the .then chain, so it
would execute early and the test passes regardless of the assertions.

BUG=395928

Review URL: https://codereview.chromium.org/426563003

git-svn-id: svn://svn.chromium.org/blink/trunk@179020 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 1e7ea6e1
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
# Gardeners are welcome to touch this file, but you can ignore the failures # Gardeners are welcome to touch this file, but you can ignore the failures
# and wait for kouhei@ or hajimehoshi@ to maintain this file. # and wait for kouhei@ or hajimehoshi@ to maintain this file.
crbug.com/397892 LayoutTests/http/tests/serviceworker/multiple-register.html [ Crash ]
# view-source:// tests are not supported by the leak detector # view-source:// tests are not supported by the leak detector
crbug.com/364398 fast/frames/viewsource/viewsource-1.html [ Leak ] crbug.com/364398 fast/frames/viewsource/viewsource-1.html [ Leak ]
crbug.com/364398 fast/frames/viewsource/viewsource-2.html [ Leak ] crbug.com/364398 fast/frames/viewsource/viewsource-2.html [ Leak ]
......
...@@ -22,8 +22,8 @@ async_test(function(t) { ...@@ -22,8 +22,8 @@ async_test(function(t) {
'register should resolve to the same worker'); 'register should resolve to the same worker');
assert_equals(registered_worker.state, 'activated', assert_equals(registered_worker.state, 'activated',
'the worker should be in state "activated"'); 'the worker should be in state "activated"');
service_worker_unregister_and_done(t, scope);
}) })
.then(service_worker_unregister_and_done(t, scope))
.catch(unreached_rejection(t)); .catch(unreached_rejection(t));
}, 'Subsequent registrations resolve to the same worker'); }, 'Subsequent registrations resolve to the same worker');
...@@ -45,8 +45,8 @@ async_test(function(t) { ...@@ -45,8 +45,8 @@ async_test(function(t) {
assert_equals(worker, workers[0], assert_equals(worker, workers[0],
'register should resolve to the same worker'); 'register should resolve to the same worker');
}); });
service_worker_unregister_and_done(t, scope);
}) })
.then(service_worker_unregister_and_done(t, scope))
.catch(unreached_rejection(t)); .catch(unreached_rejection(t));
}, 'Concurrent registrations resolve to the same worker'); }, 'Concurrent registrations resolve to the same worker');
</script> </script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment