axe-core-api 4.6.0.pre.47f4589 → 4.6.0.pre.094e546
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/axe/api/results.rb +1 -1
- data/lib/axe/api/run.rb +4 -22
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25e4de4ad734fb6207582545b0eea32cd475ee2ec5260f17bf2cf54936cdf933
|
4
|
+
data.tar.gz: 51ac546b1aabe1c0ed05bbedbff3ff5393973688fe1794d7159fb54123e10176
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4db262d589a3ff7678f86f7cc538e40423776ff6bcf6311486fa97976cef1bb0dcb300f51b03b2ec8d033f9a0a2739e7a0d86dfda9aca5364f157983eb3613b
|
7
|
+
data.tar.gz: 7e9c7f0d0f938b2a347a65ebeafae7eb1e0dc3f1735709206beecbfa6f8c6f265995c29c28a128de1b9c90157c9c36d561d010fc658169d42883dbf51f2c899f
|
data/lib/axe/api/results.rb
CHANGED
data/lib/axe/api/run.rb
CHANGED
@@ -36,19 +36,9 @@ module Axe
|
|
36
36
|
partial_results = run_partial_recursive(page, @context, lib, true)
|
37
37
|
throw partial_results if partial_results.respond_to?("key?") and partial_results.key?("errorMessage")
|
38
38
|
results = within_about_blank_context(page) { |page|
|
39
|
-
partial_res_str = partial_results.to_json
|
40
|
-
size_limit = 20_000_000
|
41
|
-
while not partial_res_str.empty? do
|
42
|
-
chunk_size = size_limit
|
43
|
-
chunk_size = partial_res_str.length if chunk_size > partial_res_str.length
|
44
|
-
chunk = partial_res_str[0..chunk_size-1]
|
45
|
-
partial_res_str = partial_res_str[chunk_size..-1]
|
46
|
-
store_chunk page, chunk
|
47
|
-
end
|
48
|
-
|
49
39
|
Common::Loader.new(page, lib).load_top_level Axe::Configuration.instance.jslib
|
50
40
|
begin
|
51
|
-
axe_finish_run page
|
41
|
+
axe_finish_run page, partial_results
|
52
42
|
rescue
|
53
43
|
raise StandardError.new "axe.finishRun failed. Please check out https://github.com/dequelabs/axe-core-gems/blob/develop/error-handling.md"
|
54
44
|
end
|
@@ -148,20 +138,12 @@ module Axe
|
|
148
138
|
return results
|
149
139
|
end
|
150
140
|
|
151
|
-
def
|
152
|
-
script = <<-JS
|
153
|
-
const chunk = arguments[0];
|
154
|
-
window.partialResults ??= '';
|
155
|
-
window.partialResults += chunk;
|
156
|
-
JS
|
157
|
-
page.execute_script_fixed script, chunk
|
158
|
-
end
|
159
|
-
def axe_finish_run(page)
|
141
|
+
def axe_finish_run(page, partial_results)
|
160
142
|
script = <<-JS
|
161
|
-
const partialResults =
|
143
|
+
const partialResults = arguments[0];
|
162
144
|
return axe.finishRun(partialResults);
|
163
145
|
JS
|
164
|
-
page.execute_script_fixed script
|
146
|
+
page.execute_script_fixed script, partial_results
|
165
147
|
end
|
166
148
|
|
167
149
|
def axe_shadow_select(page, frame_selector)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axe-core-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.6.0.pre.
|
4
|
+
version: 4.6.0.pre.094e546
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deque Systems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|