axe-core-api 4.6.0.pre.761c828 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/axe/api/run.rb +4 -22
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 045b9e6e4868bcca92889c823df4997a81bd8c7a40105db64a59faea55ec6263
4
- data.tar.gz: 0c98767ebd1abddd244fbf83d38802ab381bf27200d84a9a22acb3e5855744b0
3
+ metadata.gz: 3aab520a9802aec04f5a6b25c1659562aa524cea8d90433013d113db11cabef9
4
+ data.tar.gz: d34fc0d83f208585ee5d6fa586639ac83027f3bf85ec79817fc00074772ec482
5
5
  SHA512:
6
- metadata.gz: 1717152c316749a1bef3b9a6329ee1b303630b1e084dcfe4710ba186b3bd2dcf133f26f96715cf6be7e805ae56228cd8c6abcf2650577ef8e12fff1f5658a937
7
- data.tar.gz: 9020eb823aa4f2a45ea971a7ffcd4cbdf45459c845641d6d3d4c3e73e814f90734e0a91aeceafba3715164c7d445ea5bf22788b8fe140c485ffcfb40e4a1dce4
6
+ metadata.gz: 9a5f3fce4857eaf9e4855bb3f84553077737c4c9f37371c96b1d2945795170a3dbecf743ff5fd666e060dbccd72ba46c6b450331150144f52c2ae05c668787b3
7
+ data.tar.gz: f7c0d32661a74860100f0cf080f93c4bb03c62f4c6b26ff6c7acb96c76ced119dddf66bcdc32a4fedaeb94787cbe3d409ef8940d03ae562178688c3a193ba828
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 store_chunk(page, chunk)
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 = JSON.parse(window.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.761c828
4
+ version: 4.6.0
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-03-25 00:00:00.000000000 Z
11
+ date: 2023-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator
@@ -189,9 +189,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
189
  version: 2.3.0
190
190
  required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: 1.3.1
194
+ version: '0'
195
195
  requirements: []
196
196
  rubygems_version: 3.2.32
197
197
  signing_key: