Unverified Commit 201a64c9 authored by nicolasvac's avatar nicolasvac Committed by GitHub

Fix flutter web app not respecting assets path when in non-root folder (#96774)

parent 0d4b73b2
...@@ -136,7 +136,6 @@ Future<void> runWebServiceWorkerTest({ ...@@ -136,7 +136,6 @@ Future<void> runWebServiceWorkerTest({
}); });
expectRequestCounts(<String, int>{ expectRequestCounts(<String, int>{
'': 1,
// Even though the server is caching index.html is downloaded twice, // Even though the server is caching index.html is downloaded twice,
// once by the initial page load, and once by the service worker. // once by the initial page load, and once by the service worker.
// Other resources are loaded once only by the service worker. // Other resources are loaded once only by the service worker.
...@@ -183,7 +182,6 @@ Future<void> runWebServiceWorkerTest({ ...@@ -183,7 +182,6 @@ Future<void> runWebServiceWorkerTest({
expectRequestCounts(<String, int>{ expectRequestCounts(<String, int>{
'index.html': 2, 'index.html': 2,
'flutter_service_worker.js': 2, 'flutter_service_worker.js': 2,
'': 1,
'main.dart.js': 1, 'main.dart.js': 1,
'assets/NOTICES': 1, 'assets/NOTICES': 1,
'assets/AssetManifest.json': 1, 'assets/AssetManifest.json': 1,
...@@ -210,7 +208,6 @@ Future<void> runWebServiceWorkerTest({ ...@@ -210,7 +208,6 @@ Future<void> runWebServiceWorkerTest({
}); });
expectRequestCounts(<String, int>{ expectRequestCounts(<String, int>{
'': 1,
'index.html': 2, 'index.html': 2,
// We still download some resources multiple times if the server is non-caching. // We still download some resources multiple times if the server is non-caching.
'main.dart.js': 2, 'main.dart.js': 2,
...@@ -260,7 +257,6 @@ Future<void> runWebServiceWorkerTest({ ...@@ -260,7 +257,6 @@ Future<void> runWebServiceWorkerTest({
'flutter_service_worker.js': 1, 'flutter_service_worker.js': 1,
}); });
expectRequestCounts(<String, int>{ expectRequestCounts(<String, int>{
'': 1,
'index.html': 2, 'index.html': 2,
'flutter_service_worker.js': 2, 'flutter_service_worker.js': 2,
'main.dart.js': 2, 'main.dart.js': 2,
......
...@@ -518,7 +518,6 @@ class WebServiceWorker extends Target { ...@@ -518,7 +518,6 @@ class WebServiceWorker extends Target {
final String serviceWorker = generateServiceWorker( final String serviceWorker = generateServiceWorker(
urlToHash, urlToHash,
<String>[ <String>[
'/',
'main.dart.js', 'main.dart.js',
'index.html', 'index.html',
'assets/NOTICES', 'assets/NOTICES',
......
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