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

Side by Side Diff: LayoutTests/http/tests/serviceworker/registration.html

Issue 448063002: ServiceWorker: Add layout test for worker script MIME type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: simple rebase Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/plain-text-worker.php » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: Registration</title> 2 <title>Service Worker: Registration</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="resources/test-helpers.js"></script>
6 <script> 6 <script>
7 (function() { 7 (function() {
8 var t = async_test('Registering normal pattern'); 8 var t = async_test('Registering normal pattern');
9 t.step(function() { 9 t.step(function() {
10 var scope = '/registration/'; 10 var scope = '/registration/';
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }), 72 }),
73 t.step_func(function(reason) { 73 t.step_func(function(reason) {
74 assert_equals(reason.name, 'AbortError', 74 assert_equals(reason.name, 'AbortError',
75 'Registration of non-existent script should fail.') ; 75 'Registration of non-existent script should fail.') ;
76 t.done(); 76 t.done();
77 }) 77 })
78 ); 78 );
79 }); 79 });
80 }()); 80 }());
81 81
82 (function() {
83 var t = async_test('Registering script without correct MIME type');
84 t.step(function() {
85 navigator.serviceWorker.register(
86 'resources/plain-text-worker.php'
87 ).then(
88 t.step_func(function(registration) {
89 assert_unreached('Registration of plain text script should fail. ');
90 }),
91 t.step_func(function(reason) {
92 assert_equals(reason.name, 'AbortError',
93 'Registration of plain text script should fail.');
94 t.done();
95 })
96 );
97 });
98 }());
99
82 </script> 100 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/plain-text-worker.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698