@@ -35,8 +35,8 @@ fn generated_code_is_fresh() {
3535}
3636
3737/// Check that the PDL files are up to date
38- #[ test]
39- fn pdl_is_fresh ( ) {
38+ #[ tokio :: test]
39+ async fn pdl_is_fresh ( ) {
4040 const BASE_URL : & str = "https://raw.githubusercontent.com/ChromeDevTools/devtools-protocol" ;
4141
4242 let dir = Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
@@ -48,12 +48,13 @@ fn pdl_is_fresh() {
4848 . unwrap_or_else ( |_| dir. join ( "pdl/js_protocol.pdl" ) ) ;
4949
5050 let js_proto_old = fs:: read_to_string ( & js_proto) . unwrap_or_default ( ) ;
51- let js_proto_new = ureq :: get ( & format ! (
51+ let js_proto_new = reqwest :: get ( & format ! (
5252 "{BASE_URL}/{CURRENT_REVISION}/pdl/js_protocol.pdl" ,
5353 ) )
54- . call ( )
54+ . await
5555 . unwrap ( )
56- . into_string ( )
56+ . text ( )
57+ . await
5758 . unwrap ( ) ;
5859 assert ! ( js_proto_new. contains( "The Chromium Authors" ) ) ;
5960
@@ -68,12 +69,13 @@ fn pdl_is_fresh() {
6869 . unwrap_or_else ( |_| dir. join ( "pdl/browser_protocol.pdl" ) ) ;
6970
7071 let browser_proto_old = fs:: read_to_string ( & browser_proto) . unwrap_or_default ( ) ;
71- let browser_proto_new = ureq :: get ( & format ! (
72+ let browser_proto_new = reqwest :: get ( & format ! (
7273 "{BASE_URL}/{CURRENT_REVISION}/pdl/browser_protocol.pdl"
7374 ) )
74- . call ( )
75+ . await
7576 . unwrap ( )
76- . into_string ( )
77+ . text ( )
78+ . await
7779 . unwrap ( ) ;
7880 assert ! ( browser_proto_new. contains( "The Chromium Authors" ) ) ;
7981
@@ -95,11 +97,13 @@ fn pdl_is_fresh() {
9597 let include_path = dir. join ( "pdl" ) . join ( include) ;
9698
9799 let include_proto_old = fs:: read_to_string ( & include_path) . unwrap_or_default ( ) ;
98- let include_proto_new = ureq:: get ( & format ! ( "{BASE_URL}/{CURRENT_REVISION}/pdl/{include}" ) )
99- . call ( )
100- . unwrap ( )
101- . into_string ( )
102- . unwrap ( ) ;
100+ let include_proto_new =
101+ reqwest:: get ( & format ! ( "{BASE_URL}/{CURRENT_REVISION}/pdl/{include}" ) )
102+ . await
103+ . unwrap ( )
104+ . text ( )
105+ . await
106+ . unwrap ( ) ;
103107 assert ! ( include_proto_new. contains( "The Chromium Authors" ) ) ;
104108
105109 if include_proto_new != include_proto_old {
0 commit comments