@@ -66,43 +66,48 @@ void main() {
6666 expect (mapLegacyUrl ('$prefix /#/?foo=bar' ), '$prefix /?foo=bar' );
6767 });
6868
69- for (final compilerValue in ['js' , 'wasm' ]) {
70- group ('with ?compiler=$compilerValue query param' , () {
71- test (
72- 'moves ?compiler=$compilerValue from before hash to after path' ,
73- () {
74- final newUrl = '$prefix /inspector?compiler=$compilerValue ' ;
69+ group (
70+ 'with "compiler" query param (https://github.com/flutter/devtools/issues/9612)' ,
71+ () {
72+ for (final compilerValue in ['js' , 'wasm' ]) {
73+ test (
74+ 'moves ?compiler=$compilerValue from before hash to after path' ,
75+ () {
76+ final newUrl = '$prefix /inspector?compiler=$compilerValue ' ;
77+ expect (
78+ mapLegacyUrl (
79+ '$prefix /?compiler=$compilerValue #/inspector' ,
80+ ),
81+ newUrl,
82+ );
83+ expect (
84+ mapLegacyUrl (
85+ '$prefix /?compiler=$compilerValue #/?page=inspector' ,
86+ ),
87+ newUrl,
88+ );
89+ },
90+ );
91+
92+ test ('handles additional query parameters' , () {
93+ final newUrl =
94+ '$prefix /inspector?foo=bar&compiler=$compilerValue ' ;
7595 expect (
76- mapLegacyUrl ('$prefix /?compiler=$compilerValue #/inspector' ),
96+ mapLegacyUrl (
97+ '$prefix /?compiler=$compilerValue #/inspector?foo=bar' ,
98+ ),
7799 newUrl,
78100 );
79101 expect (
80102 mapLegacyUrl (
81- '$prefix /?compiler=$compilerValue #/?page=inspector' ,
103+ '$prefix /?compiler=$compilerValue #/?page=inspector&foo=bar ' ,
82104 ),
83105 newUrl,
84106 );
85- },
86- );
87-
88- test ('handles additional query parameters' , () {
89- final newUrl =
90- '$prefix /inspector?foo=bar&compiler=$compilerValue ' ;
91- expect (
92- mapLegacyUrl (
93- '$prefix /?compiler=$compilerValue #/inspector?foo=bar' ,
94- ),
95- newUrl,
96- );
97- expect (
98- mapLegacyUrl (
99- '$prefix /?compiler=$compilerValue #/?page=inspector&foo=bar' ,
100- ),
101- newUrl,
102- );
103- });
104- });
105- }
107+ });
108+ }
109+ },
110+ );
106111 });
107112 }
108113 });
0 commit comments