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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1ea65e2ff4b4f35654eec0460a23c3983746bd35c44b8aff3213b15785176bf
4
- data.tar.gz: c038ded6ba91147bdce50e43cb0b04f1fcb5c7497626e8845e06b81dc8f2bc83
3
+ metadata.gz: 25e4de4ad734fb6207582545b0eea32cd475ee2ec5260f17bf2cf54936cdf933
4
+ data.tar.gz: 51ac546b1aabe1c0ed05bbedbff3ff5393973688fe1794d7159fb54123e10176
5
5
  SHA512:
6
- metadata.gz: '00809dd34d03371139e9a72b76dfb2f03b38610ccb7ef71c69ded8d568b1fccfd28d5188631622c73cd804e2532baebe7dd2f2f1d1b669339cfbc1c23a6fa59b'
7
- data.tar.gz: 75d56a04bfb8d27d8598c41f2a9e1db649f3435a0ccd195f724993c02a994898a696eeb76901a2d79d0acd957daa722989b39ca583bc49b052cb239e4777fe02
6
+ metadata.gz: e4db262d589a3ff7678f86f7cc538e40423776ff6bcf6311486fa97976cef1bb0dcb300f51b03b2ec8d033f9a0a2739e7a0d86dfda9aca5364f157983eb3613b
7
+ data.tar.gz: 7e9c7f0d0f938b2a347a65ebeafae7eb1e0dc3f1735709206beecbfa6f8c6f265995c29c28a128de1b9c90157c9c36d561d010fc658169d42883dbf51f2c899f
@@ -40,7 +40,7 @@ module Axe
40
40
  end
41
41
 
42
42
  def timestamp=(ts)
43
- @timestamp = ts
43
+ timestamp = ts
44
44
  end
45
45
 
46
46
 
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.47f4589
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-04-06 00:00:00.000000000 Z
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator