File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
### Added
4
4
5
+ - ` Ferrum::Network::Exchange#blob? ` determines if the exchange is blob [ #516 ]
5
6
- ` Ferrum::Network::Request#headers ` are enhanced and supplemented with ` Network.requestWillBeSentExtraInfo ` [ #506 ]
6
7
- ` Ferrum::Page#off ` to unsubscribe from CDP events [ #455 ]
7
8
- ` Ferrum::Mouse#scroll_by ` to be able to scroll by, as alternative to ` scroll_to ` [ #514 ]
12
13
13
14
- Correctly set mouse events buttons property [ #509 ]
14
15
- Prevent 'Hash#[ ] =': can't add a new key into hash during iteration [ #513 ]
16
+ - ` Ferrum::Network::Exchange#finished? ` and ` Ferrum::Network#wait_for_idle ` take into account that request can be a blob [ #496 ]
15
17
16
18
### Removed
17
19
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def blocked?
83
83
# @return [Boolean]
84
84
#
85
85
def finished?
86
- blocked? || response &.loaded? || !error . nil? || ping? || !! url &. start_with? ( " blob:" )
86
+ blocked? || response &.loaded? || !error . nil? || ping? || blob?
87
87
end
88
88
89
89
#
@@ -131,6 +131,15 @@ def ping?
131
131
!!request &.ping?
132
132
end
133
133
134
+ #
135
+ # Determines if the exchange is blob.
136
+ #
137
+ # @return [Boolean]
138
+ #
139
+ def blob?
140
+ !!url &.start_with? ( "blob:" )
141
+ end
142
+
134
143
#
135
144
# Returns request's URL.
136
145
#
Original file line number Diff line number Diff line change 139
139
140
140
it "returns true for blob requests" do
141
141
exchange = Ferrum ::Network ::Exchange . new ( page , "1" )
142
+ expect ( exchange . blob? ) . to be false
142
143
expect ( exchange . finished? ) . to be false
143
144
144
145
exchange . request = Ferrum ::Network ::Request . new (
149
150
}
150
151
}
151
152
)
153
+ expect ( exchange . blob? ) . to be true
152
154
expect ( exchange . finished? ) . to be true
153
155
end
154
156
end
You can’t perform that action at this time.
0 commit comments