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

Unified Diff: LayoutTests/http/tests/serviceworker/serviceworkerobject-scope.html

Issue 291263002: ServiceWorker: Strip fragment from scope and script URLs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test case for query in scope Created 6 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/virtual/serviceworker/http/tests/serviceworker/serviceworkerobject-scope-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/serviceworkerobject-scope.html
diff --git a/LayoutTests/http/tests/serviceworker/serviceworkerobject-scope.html b/LayoutTests/http/tests/serviceworker/serviceworkerobject-scope.html
index 09046b1667b79ece1fb3a654523c36b1bbfb542c..daaaca05d5ba60370b6ee708249c80cc9e175204 100644
--- a/LayoutTests/http/tests/serviceworker/serviceworkerobject-scope.html
+++ b/LayoutTests/http/tests/serviceworker/serviceworkerobject-scope.html
@@ -16,6 +16,9 @@ function scope_test(name, url, scope) {
expectedScope = normalizeURL('*');
var expectedURL = normalizeURL(url);
+ expectedScope = expectedScope.replace(/#.*$/, '');
+ expectedURL = expectedURL.replace(/#.*$/, '');
kinuko 2014/05/21 03:37:15 It might be good to include this in normalizeURL h
jsbell 2014/05/22 16:49:05 Done.
+
service_worker_unregister_and_register(t, url, scope, onRegister);
function onRegister(worker) {
@@ -28,6 +31,9 @@ function scope_test(name, url, scope) {
scope_test('default', 'resources/worker-no-op.js');
scope_test('wildcard', 'resources/worker-no-op.js', '*');
+scope_test('script with fragment', 'resources/worker-no-op.js#ref', 'http://127.0.0.1:8000/*');
+scope_test('scope with fragment', 'resources/worker-no-op.js', 'http://127.0.0.1:8000/*#ref');
+scope_test('scope with query', 'resources/worker-no-op.js', '/a?b=c');
scope_test('relative path', 'resources/worker-no-op.js', '/a/b/c/');
scope_test('relative path with wildcard', 'resources/empty-worker.js', '/a/b/c/*');
scope_test('absolute url', 'resources/empty-worker.js', 'http://127.0.0.1:8000/');
« no previous file with comments | « no previous file | LayoutTests/virtual/serviceworker/http/tests/serviceworker/serviceworkerobject-scope-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698