Null dereference in CompositeEditCommand::cloneParagraphUnderNewElement() due to...
[WebKit-https.git] / Tools / ChangeLog
1 2020-10-28  Aakash Jain  <aakash_jain@apple.com>
2
3         [build.webkit.org] loadConfig unittest fail depending on locally installed version of buildbot
4         https://bugs.webkit.org/show_bug.cgi?id=218234
5
6         Reviewed by Jonathan Bedard.
7
8         * CISupport/build-webkit-org/loadConfig_unittest.py:
9
10 2020-10-28  Aakash Jain  <aakash_jain@apple.com>
11
12         [build.webkit.org] Use -q and -o while unzipping layout-test-results.zip
13         https://bugs.webkit.org/show_bug.cgi?id=218230
14
15         Reviewed by Jonathan Bedard.
16
17         * CISupport/build-webkit-org/steps.py:
18         (ExtractTestResults.start):
19
20 2020-10-28  Aakash Jain  <aakash_jain@apple.com>
21
22         Rename build.webkit.org-config directory to build-webkit-org
23         https://bugs.webkit.org/show_bug.cgi?id=218302
24
25         Reviewed by Jonathan Bedard.
26
27         * CISupport/build-webkit-org: Copied from Tools/CISupport/build.webkit.org-config.
28         * CISupport/build-webkit-org/htdigestparser_unittest.py:
29         * CISupport/build-webkit-org/public_html/TestFailures/scripts/builders_unittests.js:
30         * CISupport/build-webkit-org/steps.py:
31         * CISupport/build-webkit-org/steps_unittest.py:
32         * CISupport/build-webkit-org/wkbuild.py:
33         * CISupport/build-webkit-org/wkbuild_unittest.py:
34         * CISupport/build.webkit.org-config: Removed.
35         * CISupport/ews-build/steps.py:
36         * CISupport/ews-build/steps_unittest.py:
37         * Scripts/run-dashboard-tests:
38         * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
39         * Scripts/webkitpy/style/checker_unittest.py:
40         * Scripts/webkitpy/tool/servers/gardeningserver.py:
41
42 2020-10-28  Jonathan Bedard  <jbedard@apple.com>
43
44         [webkitscmpy] Support finding commit by tag
45         https://bugs.webkit.org/show_bug.cgi?id=218212
46         <rdar://problem/70700121>
47
48         Reviewed by Dewei Zhu.
49
50         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
51         * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
52         (Git.commit): Find a commit referred to by a provided tag.
53         * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
54         (Scm.find): Find a commit by tag, if applicable.
55         (Scm.commit):
56         * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
57         (Svn.info): Pull information by tag, support non-standard branches.
58         (Svn._cache_revisions): Support non-standard branches.
59         (Svn._branch_for): Return the non-standard branch name for tags.
60         (Svn.commit): Find a commit referred to by a provided tag.
61         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
62         (Git): Support tags.
63         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:
64         (Svn.__init__): Support tags.
65         (Svn.tags): Tags are simply specialized branches, return the names of those tags
66         based on the commit mapping.
67         * Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
68         * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
69         (TestGit):
70         (TestGit.test_tag):
71         * Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
72         (TestSvn):
73         (TestSvn.test_tag):
74
75 2020-10-28  Jonathan Bedard  <jbedard@apple.com>
76
77         [webkitflaskpy] Create shared library for WebKit's flask tooling
78         https://bugs.webkit.org/show_bug.cgi?id=218257
79         <rdar://problem/70736269>
80
81         Rubber-stamped by Aakash Jain.
82
83         * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:
84         (_maybe_add_webkit_python_library_paths): Add webkitcorepy and webkitflaskpy.
85         (_maybe_add_webkitcorepy_path): Renamed _maybe_add_webkit_python_library_paths.
86         * Scripts/libraries/resultsdbpy/resultsdbpy/flask_support/util.py: Moved to webkitflaskpy/util.py.
87         * Scripts/libraries/resultsdbpy/resultsdbpy/flask_support/util_unittest.py: Moved to webkitflaskpy/util_unittest.py.
88         * Scripts/libraries/webkitflaskpy: Added.
89         * Scripts/libraries/webkitflaskpy/MANIFEST.in: Added.
90         * Scripts/libraries/webkitflaskpy/README.md: Added.
91         * Scripts/libraries/webkitflaskpy/setup.py: Added.
92         * Scripts/libraries/webkitflaskpy/webkitflaskpy: Added.
93         * Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: Added.
94         * Scripts/libraries/webkitflaskpy/webkitflaskpy/util.py: Moved from resultsdpy/flask_support/util.py.
95         * Scripts/libraries/webkitflaskpy/webkitflaskpy/util_unittest.py: Moved from resultsdpy/flask_support/util_unittest.py.
96         * Scripts/webkitpy/test/main.py:
97         (main): Add
98
99 2020-10-28  Sam Weinig  <weinig@apple.com>
100
101         Reduce Preference Override Methods: TabsToLinks/SpatialNavigation
102         https://bugs.webkit.org/show_bug.cgi?id=218288
103
104         Reviewed by Tim Horton.
105
106         Replace uses of testRunner.overridePreference("WebKitTabToLinksPreferenceKey", ...) and
107         testRunner.setSpatialNavigationEnabled(...) with test header commands, helping to reduce
108         the number of different ways we have to override preferences in LayoutTests.
109
110         * DumpRenderTree/TestOptions.cpp:
111         (WTR::TestOptions::defaults):
112         * DumpRenderTree/TestRunner.cpp:
113         (TestRunner::staticFunctions):
114         (setSpatialNavigationEnabledCallback): Deleted.
115         * DumpRenderTree/TestRunner.h:
116         * DumpRenderTree/mac/DumpRenderTree.mm:
117         (resetWebPreferencesToConsistentValues):
118         * DumpRenderTree/mac/TestRunnerMac.mm:
119         (TestRunner::setSpatialNavigationEnabled): Deleted.
120         * DumpRenderTree/win/DumpRenderTree.cpp:
121         (resetWebPreferencesToConsistentValues):
122         (setWebPreferencesForTestOptions):
123         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
124         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
125         (WTR::InjectedBundle::beginTesting):
126         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
127         (WTR::TestRunner::setSpatialNavigationEnabled): Deleted.
128         * WebKitTestRunner/InjectedBundle/TestRunner.h:
129         * WebKitTestRunner/TestController.cpp:
130         (WTR::TestController::resetPreferencesToConsistentValues):
131
132 2020-10-28  Aakash Jain  <aakash_jain@apple.com>
133
134         [ews] Ensure that uat instance doesn't send emails
135         https://bugs.webkit.org/show_bug.cgi?id=218227
136
137         Reviewed by Jonathan Bedard.
138
139         * CISupport/ews-build/send_email.py:
140
141 2020-10-28  Sam Weinig  <weinig@apple.com>
142
143         [Testing] Remove requirement of adding new SPI for each preference that needs testing
144         https://bugs.webkit.org/show_bug.cgi?id=218267
145
146         Reviewed by Simon Fraser.
147
148         Removes the requirement for WebKitLegacy (macOS), which has already been lifted for
149         modern WebKit, that testing new preferences requires new WebPreferences SPI. Instead,
150         new testing specific SPI ([WebPreferences _set*PreferenceForTestingWithValue:forKey:])
151         are used to allow string based setting.
152         
153         To make this work with the shared WebPreferences*.yaml names, a helper is generated to
154         map from the shared name to the WebKitLegacy specific name.
155
156         This still doesn't quite take us all the way to supporting any WebPreferences*.yaml name
157         in test headers, as is supported in WebKitTestRunner, as we still need a viable mechanism
158         to fully reset WebPreferences between tests. Right now, each preference must be set on
159         each test run, requiring the complete set of preferences to be known up front.
160
161         * DumpRenderTree/CMakeLists.txt:
162         * DumpRenderTree/DerivedSources-input.xcfilelist:
163         * DumpRenderTree/DerivedSources-output.xcfilelist:
164         * DumpRenderTree/DerivedSources.make:
165         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
166         * DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb: Added.
167         * DumpRenderTree/TestOptions.cpp:
168         (WTR::TestOptions::supportedBoolWebPreferenceFeatures):
169         * DumpRenderTree/TestOptions.h:
170         * DumpRenderTree/mac/DumpRenderTree.mm:
171         (setWebPreferencesForTestOptions):
172         * DumpRenderTree/mac/TestRunnerMac.mm:
173         (TestRunner::overridePreference):
174
175 2020-10-28  Philippe Normand  <pnormand@igalia.com>
176
177         [Flatpak SDK] Update Mesa and GTK4 dependencies
178         https://bugs.webkit.org/show_bug.cgi?id=218281
179
180         Reviewed by Carlos Alberto Lopez Perez.
181
182         * buildstream/elements/flatpak/sdk.bst: Switch to app-debug-link as in the upstream FDO SDK.
183         * buildstream/elements/freedesktop-sdk.bst: Bump junction ref.
184         * buildstream/elements/sdk/mesa.bst: Update to 20.1.10 and add patch not present in stable release yet.
185         * buildstream/patches/fdo-0001-pango-Bump-to-1.47.patch: Added.
186         * buildstream/patches/mesa/0001-mesa-rename-_mesa_free_errors_data.patch: Removed.
187         * buildstream/patches/mesa/0002-mesa-add-bool-param-to-_mesa_free_context_data.patch: Removed.
188         * buildstream/patches/mesa/0003-mesa-st-release-debug_output-after-destroying-the-co.patch: Removed.
189         * buildstream/patches/mesa/0004-mesa-clear-texture-s-views-when-texture-is-remove.patch: Added.
190
191 2020-10-28  Adrian Perez de Castro  <aperez@igalia.com>
192
193         [GTK4] Build broken with GTK 3.99.3
194         https://bugs.webkit.org/show_bug.cgi?id=218270
195
196         Reviewed by Carlos Garcia Campos.
197
198         * buildstream/elements/sdk/gtk.bst: Bump GTK4 version to 3.99.4
199
200 2020-10-27  Alex Christensen  <achristensen@webkit.org>
201
202         Use _CFURLConnectionSetFrameworkStubs for SecItemShim instead of DYLD_INTERPOSE on Apple Silicon Macs
203         https://bugs.webkit.org/show_bug.cgi?id=218269
204         <rdar://problem/70491533>
205
206         Reviewed by Darin Adler.
207
208         * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
209         (TEST):
210
211 2020-10-27  Sam Weinig  <weinig@apple.com>
212
213         DumpRenderTree spams stderr with CFNetwork warnings about null diskcache path
214         https://bugs.webkit.org/show_bug.cgi?id=218241
215
216         Reviewed by Darin Adler.
217
218         Remove attempt at using a memory only shared URL cache, as subsequent calls
219         to [WebPreferences setCacheModel:] cause a disk cache to be used anyway. All
220         this really seems to do is cause CFNetwork to log to stderr. It's unlikely
221         this optimization is worthwhile anyway these days, as avoiding touching the
222         filesystem is less necessary.
223
224         * DumpRenderTree/mac/DumpRenderTree.mm:
225         (prepareConsistentTestingEnvironment):
226
227 2020-10-27  Brian Burg  <bburg@apple.com>
228
229         [Cocoa] Introduce _WKInspectorConfiguration for customizing local and remote Web Inspectors
230         https://bugs.webkit.org/show_bug.cgi?id=217896
231         <rdar://problem/70355910>
232
233         Reviewed by Devin Rousso.
234
235         Add an API test for _WKInspectorConfiguration. Disabled for now, will
236         be turned back on when more web extensions API has landed.
237
238         * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:
239         (-[SimpleURLSchemeHandler webView:startURLSchemeTask:]):
240         (-[SimpleURLSchemeHandler webView:stopURLSchemeTask:]):
241         (-[UIDelegate _webView:configurationForLocalInspector:]):
242         (-[UIDelegate _webView:didAttachLocalInspector:]):
243         (TEST):
244
245 2020-10-27  Keith Rollin  <krollin@apple.com>
246
247         Update generate_xcfilelists to accommodate paths with symlinks
248         https://bugs.webkit.org/show_bug.cgi?id=218223
249         <rdar://problem/70709808>
250
251         Reviewed by Timothy Hatcher.
252
253         There are cases where file system paths are compared against each
254         other, and where the comparisons are failing because one or the other
255         (or both) make use of symlinks, causing paths that refer to the same
256         location to fail to compare correctly. Address this by resolving path
257         components that are symlinks.
258
259         * Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
260         (BaseGenerator):
261         (BaseGenerator._unexpand):
262         (BaseGenerator._unexpand._expand_if_abs):
263         (BaseGenerator._unexpand._variations):
264         (BaseGenerator._unexpand._variations._gen):
265         (BaseGenerator._unexpand._try_unexpand):
266         (BaseGenerator._unexpand._do_unexpand):
267
268 2020-10-27  Carlos Alberto Lopez Perez  <clopez@igalia.com>
269
270         [GTK] Don't disable MSE build support on Debian and Ubuntu LTS bots
271         https://bugs.webkit.org/show_bug.cgi?id=218247
272
273         Reviewed by Philippe Normand.
274
275         The version of gstreamer on this bots (Ubuntu-18.04 and Debian 10)
276         is now newer enough (1.14) to enable MSE support.
277
278         * CISupport/build.webkit.org-config/config.json:
279
280 2020-10-27  Aakash Jain  <aakash_jain@apple.com>
281
282         Rename BuildSlaveSupport to CISupport
283         https://bugs.webkit.org/show_bug.cgi?id=218026
284
285         Reviewed by Jonathan Bedard.
286
287         * CISupport: Copied from Tools/BuildSlaveSupport.
288         * CISupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
289         * CISupport/build.webkit.org-config/steps.py:
290         * CISupport/build.webkit.org-config/wkbuild.py:
291         * CISupport/build.webkit.org-config/wkbuild_unittest.py:
292         * CISupport/ews-app/ews/views/statusbubble.py:
293         * CISupport/ews-build/steps.py:
294         * CISupport/ews-build/steps_unittest.py:
295         * BuildSlaveSupport: Replaced.
296         * EWSTools/Start-Queue.ps1:
297         * Scripts/bisect-builds:
298         * Scripts/run-dashboard-tests:
299         * Scripts/webkitpy/common/config/watchlist:
300         * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
301         * Scripts/webkitpy/style/checker_unittest.py:
302         * Scripts/webkitpy/tool/servers/gardeningserver.py:
303         * .gitattributes:
304
305 2020-10-27  Sam Weinig  <weinig@apple.com>
306
307         Rename WKPreferencesSet*ValueForKey SPI to WKPreferencesSet*ValueForKeyForTesting
308         https://bugs.webkit.org/show_bug.cgi?id=218240
309
310         Reviewed by Darin Adler.
311
312         * WebKitTestRunner/TestController.cpp:
313         (WTR::TestController::resetPreferencesToConsistentValues):
314         Update for renamed function names.
315
316 2020-10-27  Carlos Alberto Lopez Perez  <clopez@igalia.com>
317
318         [GTK] Move step for generating the JSC bundle back to the release build bot
319         https://bugs.webkit.org/show_bug.cgi?id=218207
320
321         Reviewed by Adrian Perez de Castro.
322
323         On r266208 I moved the step to generate the JSC bundle from the default
324         GTK release build bot to the new bots for Ubuntu-20.04 packaging.
325
326         But it seems the ICU version of Ubuntu-20.04 (66) is not new enough for
327         testing some Intl features like Intl.ListFormat as JS Intl feature behaviors
328         are derived from ICU versions.
329
330         Move back this step to the GTK release build bot that runs with flatpak,
331         so it bundles the version of ICU from the FreeDesktop SDK (67 currently)
332
333         * BuildSlaveSupport/build.webkit.org-config/config.json:
334         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
335
336 2020-10-26  Federico Bucchi  <fbucchi@apple.com>
337
338         Add Federico Bucchi to list of WebKit contributors
339         https://bugs.webkit.org/show_bug.cgi?id=218136
340
341         - Added Federico Bucchi
342         - Removed "slackId" : "UTWC5TTSP", because it was causing:
343         ERROR: Tools/Scripts/webkitpy/common/config/contributors.json:0:  contributors.json differs from the canonical format.
344
345         Reviewed by Brian Burg.
346
347         * Scripts/webkitpy/common/config/contributors.json:
348
349 2020-10-26  Aakash Jain  <aakash_jain@apple.com>
350
351         Allow skipping specific files from report-non-inclusive-language
352         https://bugs.webkit.org/show_bug.cgi?id=218199
353
354         Reviewed by Darin Adler.
355
356         * Scripts/report-non-inclusive-language:
357
358 2020-10-26  Matt Lewis  <jlewis3@apple.com>
359
360         Webkitscmpy has missing / in scm executable candidate list.
361         https://bugs.webkit.org/show_bug.cgi?id=218166
362
363         Reviewed by Jonathan Bedard.
364
365         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Version Bump
366         * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
367         (Scm.executable):
368
369 2020-10-26  Youenn Fablet  <youenn@apple.com>
370
371         W3C test importer should not import manual HTTPS tests
372         https://bugs.webkit.org/show_bug.cgi?id=217944
373
374         Reviewed by Jonathan Bedard.
375
376         Uodate manual test detection heuristic to simply search for '-manual.'.
377
378         * Scripts/webkitpy/w3c/test_parser.py:
379         (TestParser.is_wpt_manualtest):
380         * Scripts/webkitpy/w3c/test_parser_unittest.py:
381
382 2020-10-26  Zan Dobersek  <zdobersek@igalia.com>
383
384         Remove Accelerated2dCanvasEnabled WebPreferences entry
385         https://bugs.webkit.org/show_bug.cgi?id=218114
386
387         Reviewed by Adrian Perez de Castro.
388
389         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
390         (testWebKitSettings): Adjust the test case to properly evaluate the
391         deprecated no-op behavior.
392
393 2020-10-22  Ryosuke Niwa  <rniwa@webkit.org>
394
395         IPC testing API should expose ArrayBuffer for an unknown decoded argument
396         https://bugs.webkit.org/show_bug.cgi?id=218113
397
398         Reviewed by Darin Adler.
399
400         Updated a test case to check that the unknown type produces an ArrayBuffer.
401
402         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
403         (IPCTestingAPI.CanInterceptAlert):
404
405 2020-10-22  Darin Adler  <darin@apple.com>
406
407         REGRESSION(r266295): DOMSelection's addRange and containsNode behave incorrectly when selection crosses shadow boundaries
408         https://bugs.webkit.org/show_bug.cgi?id=218007
409
410         Reviewed by Ryosuke Niwa.
411
412         * TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp: Disabled the isPointInRange
413         test and added comments about how we will restore it in the future.
414
415 2020-10-23  Truitt Savell  <tsavell@apple.com>
416
417         Unreviewed, reverting r268761.
418
419         May have casued webrtc crashes on Catalina Debug.
420
421         Reverted changeset:
422
423         "[webkitpy] Use allowlist and blocklist"
424         https://bugs.webkit.org/show_bug.cgi?id=217985
425         https://trac.webkit.org/changeset/268761
426
427 2020-10-23  Jonathan Bedard  <jbedard@apple.com>
428
429         [webkitpy] Remove the old autointaller
430         https://bugs.webkit.org/show_bug.cgi?id=218131
431         <rdar://problem/70627699>
432
433         Rubber-stamped by Aakash Jain.
434
435         * Scripts/webkitpy/test/main.py:
436         (Tester._run_tests): Remove reference to old autoinstaller.
437         * Scripts/webkitpy/thirdparty/__init__.py: Deleted content.
438         (autoinstall_everything): Deleted.
439
440 2020-10-23  Jonathan Bedard  <jbedard@apple.com>
441
442         [webkitscmpy] Use 'which' to find git and svn paths
443         https://bugs.webkit.org/show_bug.cgi?id=217717
444         <rdar://problem/70299192>
445
446         Rubber-stamped by Aakash Jain.
447
448         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
449         * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
450         (Git):
451         (Git.executable): Generate git path from 'which' call.
452         * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
453         (Scm.executable): Generate a program path from a 'which' call.
454         * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
455         (Svn):
456         (Svn.executable): Generate svn path from 'which' call.
457         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
458         (Git):
459         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:
460         (Svn.__init__):
461
462 2020-10-23  Aakash Jain  <aakash_jain@apple.com>
463
464         [build.webkit.org] Add python 3 support - part 2
465         https://bugs.webkit.org/show_bug.cgi?id=218130
466
467         Reviewed by Jonathan Bedard.
468
469         * BuildSlaveSupport/build.webkit.org-config/buildbot.tac:
470         * BuildSlaveSupport/build.webkit.org-config/htdigestparser_unittest.py:
471         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
472         * BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py:
473
474 2020-10-23  Aakash Jain  <aakash_jain@apple.com>
475
476         [build.webkit.org] Create master.cfg for newer buildbot
477         https://bugs.webkit.org/show_bug.cgi?id=218102
478
479         Reviewed by Jonathan Bedard.
480
481         * BuildSlaveSupport/build.webkit.org-config/buildbot.tac:
482         * BuildSlaveSupport/build.webkit.org-config/master_buildbot2.cfg: Copied from Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg.
483
484 2020-10-23  Jonathan Bedard  <jbedard@apple.com>
485
486         [webkitpy] Use webkitcorepy's autoinstaller for buildbot and twisted
487         https://bugs.webkit.org/show_bug.cgi?id=218105
488         <rdar://problem/70593576>
489
490         Rubber-stamped by Aakash Jain.
491
492         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
493         (BuildBotConfigLoader._add_dependent_modules_to_sys_modules):
494         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version.
495         * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
496         (Package.archives): tar.bz2 archives are tar.gz archives.
497         (Package.install): After r267056, we don't need "old-and-unmanageable" and
498         "single-version-externally-managed", handle case of nested modules more completely.
499         * Scripts/webkitpy/autoinstalled/buildbot.py: Added.
500         * Scripts/webkitpy/autoinstalled/twisted.py: Added.
501         * Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
502         Import new auto installed twisted.
503         * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
504         (SimpleHTTPServerDriver._ensure_http_server_dependencies): Import new auto installed twisted.
505         * Scripts/webkitpy/thirdparty/__init__.py:
506         (AutoinstallImportHook.find_module): Remove all modules.
507         (AutoinstallImportHook._install_buildbot): Deleted.
508         (AutoinstallImportHook._install_twisted_15_5_0): Deleted.
509         * Scripts/webkitpy/thirdparty/__init___unittest.py: Removed.
510
511 2020-10-23  Aakash Jain  <aakash_jain@apple.com>
512
513         Rename slave to worker in webkitpy
514         https://bugs.webkit.org/show_bug.cgi?id=218123
515
516         Reviewed by Jonathan Bedard.
517
518         * Scripts/webkitpy/common/net/buildbot/buildbot.py:
519         * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
520         * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
521         * Scripts/webkitpy/common/system/crashlogs_unittest.py:
522         * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
523         * Scripts/webkitpy/layout_tests/controllers/manager.py:
524         * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
525         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
526         * Scripts/webkitpy/port/leakdetector_unittest.py:
527         * Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:
528
529 2020-10-22  Alex Christensen  <achristensen@webkit.org>
530
531         Null check platformStrategies when making blob read stream for an NSURLRequest
532         https://bugs.webkit.org/show_bug.cgi?id=218112
533         <rdar://problem/70507102>
534
535         Reviewed by Wenson Hsieh.
536
537         * TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm:
538         (TEST):
539
540 2020-10-22  Jonathan Bedard  <jbedard@apple.com>
541
542         [webkitpy] Use webkitcorepy's autoinstaller for chrome and gecko drivers
543         https://bugs.webkit.org/show_bug.cgi?id=218059
544         <rdar://problem/70551255>
545
546         Rubber-stamped by Aakash Jain.
547
548         * Scripts/webkitpy/autoinstalled: Added.
549         * Scripts/webkitpy/autoinstalled/__init__.py: Added.
550         * Scripts/webkitpy/autoinstalled/chromedriver.py: Added.
551         (ChromeDriverPackage): Special listing rules for the chrome driver.
552         * Scripts/webkitpy/autoinstalled/geckodriver.py: Added.
553         (GeckoDriverPackage): Special listing rules for the GeckoDriver.
554         * Scripts/webkitpy/benchmark_runner/utils.py:
555         (get_driver_binary_path):
556         * Scripts/webkitpy/thirdparty/__init__.py:
557         (AutoinstallImportHook.find_module): Remove Chrome and Gecko drivers.
558         (AutoinstallImportHook.install_chromedriver): Deleted.
559         (AutoinstallImportHook.install_geckodriver): Deleted.
560         (get_driver_filename): Deleted.
561         (get_os_info): Deleted.
562
563 2020-10-22  Aakash Jain  <aakash_jain@apple.com>
564
565         report-non-inclusive-language should also report total for all the non-inclusive terms
566         https://bugs.webkit.org/show_bug.cgi?id=218096
567
568         Reviewed by Darin Adler.
569
570         * Scripts/report-non-inclusive-language: Report total for all the non-inclusive terms. Also improved
571         formatting of the output to make it one-line.
572
573 2020-10-22  Aakash Jain  <aakash_jain@apple.com>
574
575         [webkitpy] Rename slave to worker in perftestsrunner
576         https://bugs.webkit.org/show_bug.cgi?id=218082
577
578         Reviewed by Ryosuke Niwa.
579
580         * Scripts/webkitpy/performance_tests/perftestsrunner.py:
581         (PerfTestsRunner._parse_args): Supporting both --slave-config-json-path and --worker-config-json-path for now.
582         (_generate_results):
583         (_merge_worker_config_json):
584         (_merge_slave_config_json): Deleted.
585         * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
586         * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
587         (MainTest.test_parse_args):
588         (MainTest.test_parse_deprecated_args): Added unit-test for deprecated parameter.
589         * BuildSlaveSupport/build.webkit.org-config/steps.py:
590         (RunAndUploadPerfTests):
591
592 2020-10-22  Jonathan Bedard  <jbedard@apple.com>
593
594         Few webkitpy tests fail for machines in non-PST timezones
595         https://bugs.webkit.org/show_bug.cgi?id=218079
596         <rdar://problem/70579517>
597
598         Reviewed by Aakash Jain.
599
600         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
601         * Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
602         * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
603         (TestGit.test_info):
604         * Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
605         (TestSvn.test_info):
606
607 2020-10-22  Eric Carlson  <eric.carlson@apple.com>
608
609         UIClient isn't notified when page muted state changes
610         https://bugs.webkit.org/show_bug.cgi?id=218085
611         <rdar://problem/70462420>
612
613         Reviewed by Youenn Fablet.
614
615         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
616         * TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme:
617         * TestWebKitAPI/Tests/WebKitCocoa/MediaMutedState.mm: Added.
618         (-[AudioStateObserver initWithWebView:]):
619         (-[AudioStateObserver observeValueForKeyPath:ofObject:change:context:]):
620         (-[AudioStateTestView setMuted:]):
621         (TestWebKitAPI::TEST):
622
623 2020-10-22  Angelos Oikonomopoulos  <angelos@igalia.com>
624
625         Detect unrecognized options in build-jsc
626         https://bugs.webkit.org/show_bug.cgi?id=218077
627
628         Reviewed by Yusuke Suzuki.
629
630         Currently, Getopt::Long is configured with pass_through, in order to
631         be able to forward arbitrary arguments in buildMyProject. However, that
632         means that typos in option names (e.g. using --cmake-args instead of
633         --cmakeargs) go undetected and the option is silently ignored.
634  
635         For cmake builds, there is no such forwarding, so check that there are
636         no remaining arguments in ARGV and refuse to continue if so. This runs
637         the risk of breaking wrapper scripts that incorrectly pass unrecognized
638         options, but that seems like a good thing.
639
640         * Scripts/build-jsc:
641
642 2020-10-22  Peng Liu  <peng.liu6@apple.com>
643
644         Let webkitDisplayingFullscreen() return true when a video element’s fullscreen mode is not VideoFullscreenModeNone
645         https://bugs.webkit.org/show_bug.cgi?id=216426
646
647         Reviewed by Jer Noble.
648
649         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm:
650         (TEST):
651         Use internals.isChangingPresentationMode() to make sure a video presentation mode
652         change (from inline to picture-in-picture) is completed before moving to the next
653         step of the test.
654
655 2020-10-22  Philippe Normand  <pnormand@igalia.com>
656
657         [Flatpak SDK] Backport GStreamer device monitor patch
658         https://bugs.webkit.org/show_bug.cgi?id=218021
659
660         Reviewed by Adrian Perez de Castro.
661
662         Backport of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679 to be shipped in 1.20.
663         This is needed to prevent false-positive critical warnings on the bots. See #217959.
664         
665         * buildstream/elements/sdk/gstreamer.bst:
666         * buildstream/patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch: Added.
667
668 2020-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
669
670         Unreviewed. Update W3C WebDriver imported tests.
671
672         Always connect to WebKitWebView::close even if the view is never made active.
673
674         * MiniBrowser/gtk/BrowserWindow.c:
675         (browserWindowSwitchTab):
676         (browser_window_append_view):
677
678 2020-10-21  Carlos Alberto Lopez Perez  <clopez@igalia.com>
679
680         [JHbuild] Add patch to wpebackend-fdo to fix the build on Ubuntu-18.04
681         https://bugs.webkit.org/show_bug.cgi?id=218068
682
683         Reviewed by Adrian Perez de Castro.
684
685         On r268591 I updated the version of wpebackend-fdo to the last stable 1.8
686         but this version is failing to build on Ubuntu-18.04 because of the cmake version.
687         Backport a patch to fix this.
688
689         * gtk/jhbuild.modules:
690         * gtk/patches/wpebackend-fdo-cmake-buildfix-3.10.patch: Added.
691         * jhbuild/jhbuild-minimal.modules:
692         * jhbuild/patches/wpebackend-fdo-cmake-buildfix-3.10.patch: Added.
693         * wpe/jhbuild.modules:
694         * wpe/patches/wpebackend-fdo-cmake-buildfix-3.10.patch: Added.
695
696 2020-10-21  Ryosuke Niwa  <rniwa@webkit.org>
697
698         IPC testing API should have the capability to observe messages being sent and received
699         https://bugs.webkit.org/show_bug.cgi?id=217870
700
701         Reviewed by Darin Adler.
702
703         Added tests to intercept IPC messages sent and received by WebContent process.
704
705         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
706         (IPCTestingAPI.CanInterceptAlert):
707         (IPCTestingAPI.CanInterceptHasStorageAccess):
708         (IPCTestingAPI.CanInterceptFindString):
709
710 2020-10-21  Jonathan Bedard  <jbedard@apple.com>
711
712         [webkitpy] Use webkitcorepy's autoinstaller for beautifulsoup
713         https://bugs.webkit.org/show_bug.cgi?id=218049
714         <rdar://problem/70542684>
715
716         Reviewed by Aakash Jain.
717
718         * Scripts/webkitpy/__init__.py:
719         * Scripts/webkitpy/thirdparty/BeautifulSoup.py:
720         * Scripts/webkitpy/thirdparty/__init__.py:
721         (AutoinstallImportHook.find_module): Remove _install_beatifulsoup.
722         (AutoinstallImportHook._install_pytest_timeout): Deleted.
723         (AutoinstallImportHook._install_pytest): Deleted.
724         (AutoinstallImportHook._install_beautifulsoup): Deleted.
725
726 2020-10-21  Carlos Alberto Lopez Perez  <clopez@igalia.com>
727
728         update-webkitgtk-libs and run-webkit-tests fail silently if flatpak has problems updating
729         https://bugs.webkit.org/show_bug.cgi?id=218047
730
731         Reviewed by Philippe Normand.
732
733         This scripts were returning zero status when flatpak failed to
734         update in some cases. Fix them to return a non-zero status.
735
736         * Scripts/update-webkit-flatpak: Add missing sys.exit call with the return code.
737         * flatpak/flatpakutils.py:
738         (WebkitFlatpak.run_in_sandbox): In python false is zero when casted to int.
739
740 2020-10-21  Lauro Moura  <lmoura@igalia.com>
741
742         webkitpy: Check for duplicated keys in json expectation files
743         https://bugs.webkit.org/show_bug.cgi?id=218032
744
745         Reviewed by Carlos Alberto Lopez Perez.
746
747         When JSON contains repeated keys, Python only uses the last key/value
748         pair in the resulting dict, without warnings. This may cause some
749         expectations to be ignored, like what r267323 fixed.
750
751         This change also makes MockTestExpectations use the same loading
752         validation as the actual expectation instead of calling json.loads
753         directly.
754
755         * Scripts/webkitpy/common/test_expectations.py:
756         (check_repeated_keys): Added.
757         (TestExpectations.__init__): Use helper function.
758         (TestExpectations._load_expectation_string): Moved validation here.
759         * Scripts/webkitpy/common/test_expectations_unittest.py:
760         (MockTestExpectations.__init__): Use helper function.
761         (test_repeated_keys): Added test when there are repeated keys.
762
763 2020-10-21  Alex Christensen  <achristensen@webkit.org>
764
765         Don't crash when deallocating WKWebView during TLS handshake
766         https://bugs.webkit.org/show_bug.cgi?id=218025
767         <rdar://problem/70225969>
768
769         Reviewed by Tim Horton.
770
771         * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
772         (TEST):
773
774 2020-10-20  Sam Weinig  <weinig@apple.com>
775
776         Cleanup DumpRenderTree in preparation for supporting arbitrary test header commands
777         https://bugs.webkit.org/show_bug.cgi?id=217962
778
779         Reviewed by Darin Adler.
780
781         - Moves DumpRenderTree's TestOptions to be fully backed by TestFeatures like WebKitTestRunnner,
782           allowing future changes to utilize any WebPreference once SPI is available from WebKitLegacy.
783
784         - Removes use of using namespace std; from DumpRenderTree.mm, which is not something we normally
785           do and made the code a bit confusing.
786
787         - Move some random setting of preferences to centralized reset functions.
788
789         * DumpRenderTree/TestOptions.cpp:
790         * DumpRenderTree/TestOptions.h:
791         * DumpRenderTree/mac/DumpRenderTree.mm:
792         * DumpRenderTree/mac/TestRunnerMac.mm:
793         * DumpRenderTree/mac/UIDelegate.mm:
794         * DumpRenderTree/win/DumpRenderTree.cpp:
795
796 2020-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
797
798         WebDriver: add support for wheel actions
799         https://bugs.webkit.org/show_bug.cgi?id=217174
800
801         Reviewed by Brian Burg.
802
803         Add webdriver-wheel-interactions option.
804
805         * Scripts/webkitperl/FeatureList.pm:
806
807 2020-10-21  Lauro Moura  <lmoura@igalia.com>
808
809         webkitpy: Fix webdriver logging message
810         https://bugs.webkit.org/show_bug.cgi?id=218006
811
812         Reviewed by Carlos Garcia Campos.
813
814         * Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
815         (WebDriverTestRunner.process_results): Use the test name instead of
816         the dir name.
817
818 2020-10-20  Aakash Jain  <aakash_jain@apple.com>
819
820         report-non-inclusive-language should do exact match for directory names to ignore
821         https://bugs.webkit.org/show_bug.cgi?id=217993
822
823         Reviewed by Darin Adler.
824
825         * Scripts/report-non-inclusive-language:
826
827 2020-10-20  Aakash Jain  <aakash_jain@apple.com>
828
829         [build.webkit.org] Rename slavename to workername in steps.py
830         https://bugs.webkit.org/show_bug.cgi?id=217988
831
832         Reviewed by Dewei Zhu.
833
834         * BuildSlaveSupport/build.webkit.org-config/steps.py:
835
836 2020-10-20  Aakash Jain  <aakash_jain@apple.com>
837
838         Make report-non-inclusive-language ignore autoinstalled directories and certain file types (follow-up fix)
839         https://bugs.webkit.org/show_bug.cgi?id=217972
840
841         Reviewed by Darin Adler.
842
843         * Scripts/report-non-inclusive-language: Rename IGNORE_DIRECTORIES to IGNORE_DIRECTORIES_CONTAINING.
844
845 2020-10-20  Sihui Liu  <sihui_liu@apple.com>
846
847         Add stubs for SpeechRecognition
848         https://bugs.webkit.org/show_bug.cgi?id=217780
849         <rdar://problem/70350727>
850
851         Reviewed by Youenn Fablet.
852
853         * DumpRenderTree/mac/DumpRenderTree.mm:
854         (enableExperimentalFeatures):
855
856 2020-10-20  Jonathan Bedard  <jbedard@apple.com>
857
858         [webkitpy] Use allowlist and blocklist
859         https://bugs.webkit.org/show_bug.cgi?id=217985
860         <rdar://problem/70499499>
861
862         Reviewed by Aakash Jain.
863
864         * Scripts/webkitpy/pylintrc:
865         * Scripts/webkitpy/style/checkers/cpp.py:
866         (check_namespace_indentation):
867         * Scripts/webkitpy/w3c/common.py:
868         (is_basename_skipped):
869         * flatpak/flatpakutils.py:
870         (WebkitFlatpak.setup_gstbuild):
871
872 2020-10-20  Aakash Jain  <aakash_jain@apple.com>
873
874         Make report-non-inclusive-language ignore autoinstalled directories and certain file types
875         https://bugs.webkit.org/show_bug.cgi?id=217972
876
877         Reviewed by Beth Dakin.
878
879         * Scripts/report-non-inclusive-language: startswith and endswith also takes a tuple of suffixes to
880         look for, reference: https://docs.python.org/3/library/stdtypes.html#str.endswith
881
882 2020-10-20  Aakash Jain  <aakash_jain@apple.com>
883
884         [build.webkit.org] Use builder tags instead of category for latest buildbot
885         https://bugs.webkit.org/show_bug.cgi?id=217958
886
887         Reviewed by Jonathan Bedard.
888
889         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
890         (loadBuilderConfig):
891         (PlatformSpecificScheduler.filter):
892         (getInvalidTags):
893         (getValidTags):
894         (getTagsForBuilder):
895         * BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py: Added unit-tests, copied from EWS code.
896         (TagsForBuilderTest):
897         (TagsForBuilderTest.verifyTags):
898         (TagsForBuilderTest.test_getTagsForBuilder):
899         (TagsForBuilderTest.test_tags_type):
900         (TagsForBuilderTest.test_getInvalidTags):
901
902 2020-10-20  Michael Catanzaro  <mcatanzaro@gnome.org>
903
904         TestOptionsGeneratedKeys.h:30:52: warning: backslash-newline at end of file
905         https://bugs.webkit.org/show_bug.cgi?id=217957
906
907         Reviewed by Sam Weinig.
908
909         I guess this is bad because something else from another header could be on the next line,
910         depending on the order that headers get included into the source file. So let's add a blank
911         line to the end of the file.
912
913         * WebKitTestRunner/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb:
914
915 2020-10-16  Jer Noble  <jer.noble@apple.com>
916
917         Add skeleton implementation of Media Session API
918         https://bugs.webkit.org/show_bug.cgi?id=217797
919         <rdar://problem/70367487>
920
921         Reviewed by Darin Adler.
922
923         * DumpRenderTree/mac/DumpRenderTree.mm:
924         (enableExperimentalFeatures):
925
926 2020-10-20  Aakash Jain  <aakash_jain@apple.com>
927
928         [ews] Remove blacklist terminology
929         https://bugs.webkit.org/show_bug.cgi?id=217953
930
931         Reviewed by Jonathan Bedard.
932
933         * BuildSlaveSupport/ews-build/loadConfig.py:
934         (getInvalidTags):
935         (getValidTags):
936         * BuildSlaveSupport/ews-build/loadConfig_unittest.py:
937         (TagsForBuilderTest.test_getInvalidTags):
938
939 2020-10-20  Philippe Normand  <pnormand@igalia.com>
940
941         Unreviewed, partial revert of r268721.
942
943         * buildstream/elements/sdk/libmanette.bst: libevdev is actually a requirement for libmanette.
944
945 2020-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
946
947         WebDriver: start a https server too for tests
948         https://bugs.webkit.org/show_bug.cgi?id=217223
949         <rdar://problem/70136595>
950
951         Reviewed by Adrian Perez de Castro.
952
953         Handle HTTPS configuration in WebDriver WPT server.
954
955         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
956         (WebDriverW3CExecutor.__init__): Set https configuration from server.
957         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
958         (WebDriverW3CWebServer._wait_for_server): Also wait for HTTPS port.
959         (WebDriverW3CWebServer.start): Write config file and get also https port.
960         (WebDriverW3CWebServer.http_port): Renamed port as http_port.
961         (WebDriverW3CWebServer.https_port): Added to return the https port.
962         (WebDriverW3CWebServer.port): Deleted.
963
964 2020-10-20  Philippe Normand  <pnormand@igalia.com>
965
966         [Flatpak SDK] Update rr for AMD Ryzen support
967         https://bugs.webkit.org/show_bug.cgi?id=217474
968
969         Reviewed by Adrian Perez de Castro.
970
971         * buildstream/Pipfile: Remove Python 3.8 hard requirement.
972         * buildstream/Pipfile.lock:
973         * buildstream/elements/freedesktop-sdk.bst: Bump to latest version of the 20.08 FDO junction.
974         * buildstream/elements/sdk/rr.bst: Bump to current git master.
975
976 2020-10-20  Adrian Perez de Castro  <aperez@igalia.com>
977
978         [GTK] Gamepad events do not occur in the flatpak shell.
979         https://bugs.webkit.org/show_bug.cgi?id=212453
980
981         Reviewed by Michael Catanzaro.
982
983         If the support for gudev is disabled in libmanette, it falls back to monitoring the
984         files under /dev/input by itself without trying to use udev at all. This works fine
985         because the Flatpak SDK environment has access to all of /dev.
986
987         * buildstream/elements/sdk/libmanette.bst: Pass -Dgudev=disabled to Meson, and remove
988         the libgudev dependency from the element.
989
990 2020-10-20  Sam Weinig  <weinig@apple.com>
991
992         Tweak WebPreferences*.yaml "exposed" key to only indicate that the key should not be changeable by the frontend
993         https://bugs.webkit.org/show_bug.cgi?id=217918
994
995         Reviewed by Darin Adler.
996
997         Update to use new "exposed" prefix bindings and use default value explicitly
998         when updating settings for non-exposed preferences.
999
1000         * DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb:
1001         * WebKitTestRunner/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb:
1002
1003 2020-10-19  Lauro Moura  <lmoura@igalia.com>
1004
1005         REGRESSION(r268115) [GTK] Build failures with GCC 7 (Ubuntu 18.04) and GCC 8 (Debian Buster)
1006         https://bugs.webkit.org/show_bug.cgi?id=217425
1007
1008         Reviewed by Carlos Alberto Lopez Perez.
1009
1010         * WebKitTestRunner/CMakeLists.txt: Link with stdc++fs if using
1011         <experimental/filesystem>.
1012
1013 2020-10-19  Ryan Haddad  <ryanhaddad@apple.com>
1014
1015         Unreviewed, reverting r268693.
1016
1017         Re-landing these changes as the underlying issue may have been
1018         with CI infrastructure (and should now be resolved)
1019
1020         Reverted changeset:
1021
1022         "Unreviewed, reverting r268495, r268571, and r268682."
1023         https://bugs.webkit.org/show_bug.cgi?id=217723
1024         https://trac.webkit.org/changeset/268693
1025
1026 2020-10-19  Jonathan Bedard  <jbedard@apple.com>
1027
1028         [results.webkit.org] Refresh S3 context when token expires
1029         https://bugs.webkit.org/show_bug.cgi?id=217924
1030         <rdar://problem/70381137>
1031
1032         Reviewed by Dewei Zhu.
1033
1034         * Scripts/libraries/resultsdbpy/resultsdbpy/model/s3_archiver.py:
1035         (S3Archiver.__init__): Add _cached_token variable.
1036         (S3Archiver.__enter__): Refresh S3 resource when the current token and cached token don't match.
1037         (S3Archiver.__exit__): Clear out the cached token.
1038
1039 2020-10-19  Ryan Haddad  <ryanhaddad@apple.com>
1040
1041         Unreviewed, reverting r268495, r268571, and r268682.
1042
1043         Caused failures for some internal build configurations
1044
1045         Reverted changesets:
1046
1047         "[Testing] Generate test header key map for DumpRenderTree"
1048         https://bugs.webkit.org/show_bug.cgi?id=217723
1049         https://trac.webkit.org/changeset/268495
1050
1051         "Attempt to fix the build."
1052         https://trac.webkit.org/changeset/268571
1053
1054         "Switch to a static pattern for DumpRenderTree preferences
1055         generation to avoid ambiguous rules"
1056         https://bugs.webkit.org/show_bug.cgi?id=217907
1057         https://trac.webkit.org/changeset/268682
1058
1059 2020-10-19  Aakash Jain  <aakash_jain@apple.com>
1060
1061         [ews] use -o while unzipping layout-test-results.zip
1062         https://bugs.webkit.org/show_bug.cgi?id=217914
1063
1064         Reviewed by Jonathan Bedard.
1065
1066         * BuildSlaveSupport/ews-build/steps.py:
1067         (ExtractTestResults.__init__):
1068         * BuildSlaveSupport/ews-build/steps_unittest.py:
1069
1070 2020-10-19  Sam Weinig  <weinig@apple.com>
1071
1072         Switch to a static pattern for DumpRenderTree preferences generation to avoid ambiguous rules
1073         https://bugs.webkit.org/show_bug.cgi?id=217907
1074
1075         Reviewed by Simon Fraser.
1076
1077         * DumpRenderTree/DerivedSources-input.xcfilelist:
1078         Add DerivedSources.make and generate-derived-sources.sh to ensure things get rebuilt when they change.
1079
1080         * DumpRenderTree/DerivedSources.make:
1081         Switch to using a static pattern to avoid ambiguous and ciruclar rules.
1082
1083 2020-10-19  Aakash Jain  <aakash_jain@apple.com>
1084
1085         [build.webkit.org] Use feature flag to support Buildbot 2 code
1086         https://bugs.webkit.org/show_bug.cgi?id=217834
1087
1088         Reviewed by Jonathan Bedard.
1089
1090         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
1091         (loadBuilderConfig):
1092
1093 2020-10-19  Jonathan Bedard  <jbedard@apple.com>
1094
1095         [webkitpy] Use webkitcorepy's autoinstaller for keyring
1096         https://bugs.webkit.org/show_bug.cgi?id=217839
1097         <rdar://problem/70389225>
1098
1099         Reviewed by Aakash Jain.
1100
1101         * Scripts/webkitpy/__init__.py: Add keyring.
1102         * Scripts/webkitpy/common/net/credentials.py:
1103         * Scripts/webkitpy/thirdparty/__init__.py:
1104         (AutoinstallImportHook.find_module): Remove _install_keyring.
1105         (AutoinstallImportHook._install_keyring): Deleted.
1106
1107 2020-10-18  Lauro Moura  <lmoura@igalia.com>
1108
1109         webkitcorepy: Allow one package to require another package
1110         https://bugs.webkit.org/show_bug.cgi?id=217856
1111
1112         Reviewed by Jonathan Bedard.
1113
1114         In some cases a package may check whether another package is
1115         installed without actually importing it, which would make
1116         the AutoInstall to miss the dependency as it would not be
1117         imported. An example is pytest autoload feature searching
1118         for plugins like pytest_timeout.
1119
1120         So, this commit adds a new argument to autoinstall.Package:
1121         implicit_deps. It is not intended to be a full fledged dependency
1122         tracking system, just covering these corner cases.
1123
1124         This commit also downgrades pytest from 3.10 to 3.6 to match the
1125         version used in WPT tests.
1126
1127         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump mini
1128         version.
1129         * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
1130         (Package.__init__): Add new implicit_deps argument.
1131         (Package.install): Install implicit_deps.
1132         * Scripts/webkitpy/__init__.py: Update pytest version and add
1133         pytest_timeout dependency.
1134         * Scripts/webkitpy/webdriver_tests/pytest_runner.py:
1135         (run): Ignore DISABLE_AUTOLOAD as it was added in pytest 3.8 and go
1136         back to implicitly loading pytest_timeout.
1137         * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
1138         (WebDriverTestRunnerSelenium.run): Add the harness error log messages
1139         like the ones in the w3c runner from r268402.
1140
1141 2020-10-17  Philippe Normand  <pnormand@igalia.com>
1142
1143         [Flatpak SDK] flatpakutils.py reports "KeyError: 'gcc'" error if using with icecc and toolchains aren't generated yet
1144         https://bugs.webkit.org/show_bug.cgi?id=217799
1145
1146         Reviewed by Fujii Hironori.
1147
1148         * flatpak/flatpakutils.py:
1149         (WebkitFlatpak.run_in_sandbox): Gracefully exit with an error message when the icecc
1150         configuration failed to complete.
1151
1152 2020-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>
1153
1154         Add system trace points for flushing remote image buffers
1155         https://bugs.webkit.org/show_bug.cgi?id=217853
1156
1157         Reviewed by Simon Fraser.
1158
1159         See WebKit ChangeLog for more details.
1160
1161         * Tracing/SystemTracePoints.plist:
1162
1163 2020-10-16  Ryosuke Niwa  <rniwa@webkit.org>
1164
1165         IPC testing API should expose whether a given IPC message has sync reply or not
1166         https://bugs.webkit.org/show_bug.cgi?id=217861
1167
1168         Reviewed by Darin Adler.
1169
1170         Added a test for IPC.messages.*.isSync using RunJavaScriptAlert.
1171
1172         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
1173         (createWebViewWithIPCTestingAPI): Extracted to share more code between tests.
1174         (IPCTestingAPI.AlertIsSyncMessage): Added.
1175
1176 2020-10-16  Antoine Quint  <graouts@webkit.org>
1177
1178         Enable individual CSS transform properties by default
1179         https://bugs.webkit.org/show_bug.cgi?id=217849
1180         <rdar://problem/70052493>
1181
1182         Reviewed by Dean Jackson.
1183
1184         * DumpRenderTree/mac/DumpRenderTree.mm:
1185         (enableExperimentalFeatures):
1186         * DumpRenderTree/win/DumpRenderTree.cpp:
1187         (enableExperimentalFeatures):
1188
1189 2020-10-16  Jiewen Tan  <jiewen_tan@apple.com>
1190
1191         [WebAuthn] Remove experimental feature flag: WebAuthenticationLocalAuthenticatorEnabled
1192         https://bugs.webkit.org/show_bug.cgi?id=217796
1193         <rdar://problem/70358912>
1194
1195         Reviewed by Brent Fulgham.
1196
1197         * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
1198         (TestWebKitAPI::TEST):
1199         * WebKitTestRunner/TestController.cpp:
1200         (WTR::TestController::resetPreferencesToConsistentValues):
1201         * WebKitTestRunner/TestOptions.cpp:
1202         (WTR::boolDefaultsMap):
1203         (WTR::keyTypeMap):
1204         * WebKitTestRunner/TestOptions.h:
1205         (WTR::TestOptions::enableWebAuthentication const):
1206         (WTR::TestOptions::enableWebAuthenticationLocalAuthenticator const): Deleted.
1207
1208 2020-10-16  Matt Lewis  <jlewis3@apple.com>
1209
1210         Move EWS to new SDKs: iOS 14.
1211         https://bugs.webkit.org/show_bug.cgi?id=217840
1212
1213         Reviewed by Aakash Jain.
1214
1215         * BuildSlaveSupport/ews-build/config.json:
1216
1217 2020-10-16  Sam Weinig  <weinig@apple.com>
1218
1219         [Testing] Support configuring any preference from test headers for WebKitTestRunner
1220         https://bugs.webkit.org/show_bug.cgi?id=217645
1221
1222         Reviewed by Tim Horton.
1223
1224         Support using any preference defined in any of the WebPreference*.yaml configuration files
1225         as a test header command rather than limiting it to a hard coded subset by generating the 
1226         list of supported commands and their types from the yaml files themselves.
1227         
1228         This currently only works for WebKitTestRunner, but will be made to work with DumpRenderTree
1229         in subsequent changes.
1230
1231         * WebKitTestRunner/CMakeLists.txt:
1232         * WebKitTestRunner/Configurations/Base.xcconfig:
1233         * WebKitTestRunner/DerivedSources-input.xcfilelist:
1234         * WebKitTestRunner/DerivedSources-output.xcfilelist:
1235         * WebKitTestRunner/DerivedSources.make:
1236         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
1237         * WebKitTestRunner/Scripts/PreferencesTemplates: Added.
1238         * WebKitTestRunner/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb: Added.
1239         Add generation of TestOptionsGeneratedKeys.h from the WebPreference*.yaml using
1240         the shared GeneratePreferences.rb script in WTF.
1241
1242         * WebKitTestRunner/TestController.cpp:
1243         (WTR::TestController::resetPreferencesToConsistentValues):
1244         Move preference setting to the bottom of the file to allow any preference
1245         to be overriden. Also adds in support for double, uint32_t, and string preferences
1246         though none of those are currently being used.
1247
1248         * WebKitTestRunner/TestOptions.cpp:
1249         (WTR::TestOptions::keyTypeMapping):
1250         Use generated macro GENERATED_WEB_PREFERENCE_KEY_TYPE_MAPPINGS rather than hardcoding
1251         all the preferences types.
1252
1253         * WebKitTestRunner/TestOptions.h:
1254         (WTR::TestOptions::boolWebPreferenceFeatures const):
1255         (WTR::TestOptions::doubleWebPreferenceFeatures const):
1256         (WTR::TestOptions::uint32WebPreferenceFeatures const):
1257         (WTR::TestOptions::stringWebPreferenceFeatures const):
1258         Expose accessors for preferences values for use in setting the actual preference
1259         values. Rather than setting all preferences, we now only set preferences that have
1260         been explicitly requested, using the default value for any that have not.
1261
1262 2020-10-16  Aakash Jain  <aakash_jain@apple.com>
1263
1264         [build.webkit.org Rename slave to worker in steps.py
1265         https://bugs.webkit.org/show_bug.cgi?id=217836
1266
1267         Reviewed by Jonathan Bedard.
1268
1269         * BuildSlaveSupport/build.webkit.org-config/steps.py: Renamed slave to worker.
1270         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Ditto.
1271
1272 2020-10-16  Jonathan Bedard  <jbedard@apple.com>
1273
1274         [webkitpy] Use webkitcorepy's autoinstaller for plint 
1275         https://bugs.webkit.org/show_bug.cgi?id=217793
1276         <rdar://problem/70356095>
1277
1278         Rubber-stamped by Aakash Jain.
1279
1280         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version.
1281         * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
1282         (AutoInstall): Support multiple aliases to a single library.
1283         (AutoInstall.register):
1284         (AutoInstall.install):
1285         (AutoInstall.install_everything):
1286         * Scripts/webkitpy/__init__.py: Add pylint, map install zope.interface when zope is imported. 
1287         * Scripts/webkitpy/style/checkers/python.py:
1288         (Pylinter.run):
1289         * Scripts/webkitpy/thirdparty/__init__.py:
1290         (AutoinstallImportHook.find_module): Remove _install_pylint().
1291         (AutoinstallImportHook._install_pylint): Deleted.
1292         * Scripts/webkitpy/thirdparty/__init___unittest.py:
1293         (ThirdpartyTest.test_imports): mechanize and pylint are managed by the new autoinstaller.
1294
1295 2020-10-16  Aakash Jain  <aakash_jain@apple.com>
1296
1297         [build.webkit.org] buildbot checkconfig fails when passwords.json is missing
1298         https://bugs.webkit.org/show_bug.cgi?id=217831
1299
1300         Reviewed by Darin Adler.
1301
1302         * BuildSlaveSupport/build.webkit.org-config/master.cfg: Set is_test_mode_enabled based on BUILDBOT_TESTING env variable.
1303         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: Renamed test_mode_is_enabled to is_test_mode_enabled to
1304         be consistent with EWS code.
1305         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Ditto.
1306
1307 2020-10-16  Aakash Jain  <aakash_jain@apple.com>
1308
1309         [build.webkit.org] Add copyright message to steps_unittest.py
1310         https://bugs.webkit.org/show_bug.cgi?id=217830
1311
1312         Reviewed by Jonathan Bedard.
1313
1314         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
1315
1316 2020-10-16  Aakash Jain  <aakash_jain@apple.com>
1317
1318         [build.webkit.org] Remove SVNMirror
1319         https://bugs.webkit.org/show_bug.cgi?id=217823
1320
1321         Reviewed by Jonathan Bedard.
1322
1323         * BuildSlaveSupport/build.webkit.org-config/factories.py: Removed SVNMirror.
1324         * BuildSlaveSupport/build.webkit.org-config/steps.py: Ditto.
1325         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: Ditto.
1326         (WaitForSVNServer): Deleted.
1327         (WaitForSVNServer.evaluateCommand): Deleted.
1328         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
1329         * BuildSlaveSupport/wait-for-SVN-server.py: Removed.
1330
1331 2020-10-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1332
1333         [JHBuild] Update libwpe and wpebackend-fdo and add libmanette to minimal moduleset
1334         https://bugs.webkit.org/show_bug.cgi?id=217825
1335
1336         Reviewed by Adrian Perez de Castro.
1337
1338         libmanette 0.2.4 is required for enabling gamepad support, which
1339         defaults to on since r268389 for developer builds. The version
1340         shipped by ubuntu-20.04 is not enough (0.2.3), so we should include
1341         this on the minimal moduleset which is used to generate the bundle
1342         products on the packaging bots.
1343
1344         Seize to also update the libwpe and wpebackend-fdo libraries.
1345
1346         * gtk/jhbuild.modules:
1347         * jhbuild/jhbuild-minimal.modules:
1348         * wpe/jhbuild.modules:
1349
1350 2020-10-16  Sam Sneddon  <gsnedders@apple.com>
1351
1352         Match webkitpy.port.base.Port's merging of .webarchive/.txt
1353         https://bugs.webkit.org/show_bug.cgi?id=217795
1354
1355         Reviewed by Alexey Proskuryakov.
1356
1357         * Scripts/check-for-duplicated-platform-test-results:
1358         (check_duplicate): Check for both .webarchive and .txt
1359         (check_platform): Don't call the function that probably just threw
1360
1361 2020-10-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1362
1363         Ensure the tests are run with US/Pacific time zone
1364         https://bugs.webkit.org/show_bug.cgi?id=186612
1365
1366         Reviewed by Michael Catanzaro.
1367
1368         Some tests fail if the time zone is not set to US/Pacific, and
1369         this causes issues for contributors living outside of that timezone.
1370         Ideally we should fix those tests, but in the meantime setting this
1371         environment variable before starting the layout tests seems like
1372         an acceptable workaround. Note that something similar is also
1373         already done for the JSC tests.
1374
1375         * Scripts/webkitpy/port/base.py:
1376         (Port.setup_environ_for_server):
1377
1378 2020-10-15  Sam Weinig  <weinig@apple.com>
1379
1380         Attempt to fix the build.
1381
1382         * DumpRenderTree/DerivedSources.make: Don't use such fancy substitution, it wasn't working.
1383
1384 2020-10-15  Jonathan Bedard  <jbedard@apple.com>
1385
1386         [webkitpy] Use webkitcorepy's autoinstaller for mechanize
1387         https://bugs.webkit.org/show_bug.cgi?id=217683
1388         <rdar://problem/70272262>
1389
1390         Reviewed by Aakash Jain.
1391
1392         * Scripts/webkitpy/__init__.py: Add mechanize.
1393         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
1394         (Bugzilla._get_browser): 
1395         * Scripts/webkitpy/common/net/buildbot/buildbot.py:
1396         * Scripts/webkitpy/common/net/ewsserver.py:
1397         (EWSServer.__init__):
1398         * Scripts/webkitpy/common/net/networktransaction_unittest.py:
1399         (NetworkTransactionTest._raise_500_error):
1400         (NetworkTransactionTest._raise_URLError):
1401         (NetworkTransactionTest._raise_404_error):
1402         * Scripts/webkitpy/thirdparty/__init__.py:
1403         (AutoinstallImportHook.find_module): Remov _install_mechanize().
1404         (AutoinstallImportHook._install_mechanize): Deleted.
1405
1406 2020-10-15  Lauro Moura  <lmoura@igalia.com>
1407
1408         [Flatpak SDK] Check for installed packages in setup_buildir
1409         https://bugs.webkit.org/show_bug.cgi?id=217768
1410
1411         Reviewed by Philippe Normand.
1412
1413         During a cleanup of one of the bots, setup_builddir failed with a null
1414         self.sdk member, which is set in get_packages.
1415
1416         While I could not reproduce it again, this commit prevents this by
1417         checking whether the packages are installed before continuing the
1418         original setup_builddir steps.
1419
1420         * flatpak/flatpakutils.py:
1421         (WebkitFlatpak.setup_builddir): Check for installed packages.
1422         (WebkitFlatpak.run_in_sandbox): Check for setup_builddir return code.
1423         (WebkitFlatpak.check_installed_packages): Extracted from
1424         setup_dev_env.
1425         (WebkitFlatpak.setup_dev_env): Call extracted method.
1426
1427 2020-10-15  Jonathan Bedard  <jbedard@apple.com>
1428
1429         [webkitscmpy] Unconditionally extract git-svn-id from commit message
1430         https://bugs.webkit.org/show_bug.cgi?id=217740
1431         <rdar://problem/70313868>
1432
1433         Reviewed by Dewei Zhu.
1434
1435         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
1436         * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
1437         (Git.commit): Unconditionally attempt to extract git-svn-id.
1438
1439 2020-10-15  Jonathan Bedard  <jbedard@apple.com>
1440
1441         [webkitscmpy] Support <identifier>@ abbreviated idiom
1442         https://bugs.webkit.org/show_bug.cgi?id=217716
1443         <rdar://problem/70299119>
1444
1445         Rubber-stamped by Aakash Jain.
1446
1447         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
1448         * Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:
1449         (Commit):
1450         (Commit._parse_identifier): Support <identifier>@ shorthand.
1451         * Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py:
1452         (TestCommit.test_parse_identifier):
1453
1454 2020-10-15  Aakash Jain  <aakash_jain@apple.com>
1455
1456         EWS bot should fail if a new test is missing its result
1457         https://bugs.webkit.org/show_bug.cgi?id=177723
1458
1459         Reviewed by Jonathan Bedard.
1460
1461         * BuildSlaveSupport/ews-build/steps.py:
1462         (RunWebKitTests.evaluateResult):
1463         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.
1464
1465 2020-10-15  Lauro Moura  <lmoura@igalia.com>
1466
1467         webkitpy: Fix remaining pytest autoinstall imports
1468         https://bugs.webkit.org/show_bug.cgi?id=217694
1469
1470         Reviewed by Carlos Garcia Campos.
1471
1472         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump mini
1473         version due to argument rename below.
1474         * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
1475         (Package.__init__): Change argument name to communicate that the first
1476         arg is the name of the package to be imported.
1477         * Scripts/webkitpy/__init__.py: Some changes:
1478         - Downgrade attr to a compatible version with the pytest used.
1479         - Fix pytest_timeout import name
1480         - Downgrade pytest to 3.x. Version 4.x deprecated direct invocation of
1481         fixtures, which is still used by W3C webdriver test code.
1482
1483         * Scripts/webkitpy/webdriver_tests/pytest_runner.py:
1484         (run): Avoid using pytest autoload features to ensure it would import
1485         plugins like pytest_timeout, triggering their install.
1486
1487 2020-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1488
1489         IPC testing JS API should expose a reply and describe the list of arguments for each message
1490         https://bugs.webkit.org/show_bug.cgi?id=217565
1491
1492         Reviewed by Geoffrey Garen.
1493
1494         Added tests for decoding replies for sync and async messages and one for argument descriptions.
1495
1496         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
1497         (-[IPCTestingAPIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
1498         (-[IPCTestingAPIDelegate _webView:webContentProcessDidTerminateWithReason:]):
1499         (IPCTestingAPI.DecodesReplyArgumentsForPrompt):
1500         (IPCTestingAPI.DecodesReplyArgumentsForAsyncMessage):
1501         (IPCTestingAPI.DescribesArguments):
1502
1503 2020-10-14  Hector Lopez  <hector_i_lopez@apple.com>
1504
1505         Unreviewed, reverting r268474.
1506
1507         Revision is causing a number of test failures across iOS and
1508         macOS
1509
1510         Reverted changeset:
1511
1512         "[Testing] Support configuring any preference from test
1513         headers for WebKitTestRunner"
1514         https://bugs.webkit.org/show_bug.cgi?id=217645
1515         https://trac.webkit.org/changeset/268474
1516
1517 2020-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1518
1519         Enabling IPC testing API should prevent the termination of WebContent process which sends an invalid IPC
1520         https://bugs.webkit.org/show_bug.cgi?id=217698
1521
1522         Reviewed by Geoffrey Garen.
1523
1524         Added regression tests.
1525
1526         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
1527         (IPCTestingAPI.CanSendInvalidAsyncMessageWithoutTermination):
1528         (IPCTestingAPI.CanSendInvalidMessageWithoutTermination):
1529
1530 2020-10-14  Aakash Jain  <aakash_jain@apple.com>
1531
1532         [build.webkit.org] Add python 3 support - part 1
1533         https://bugs.webkit.org/show_bug.cgi?id=217727
1534
1535         Reviewed by Jonathan Bedard.
1536
1537         * BuildSlaveSupport/build.webkit.org-config/steps.py:
1538         (UploadBuiltProduct.__init__): Changed 0644 to 0o644.
1539         (UploadTestResults.__init__): Ditto.
1540         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Removed unused imports.
1541         * BuildSlaveSupport/build.webkit.org-config/run-buildbot-test.py: Used .format() instead of % string formatting.
1542
1543 2020-10-14  Sam Weinig  <weinig@apple.com>
1544
1545         [Testing] Generate test header key map for DumpRenderTree
1546         https://bugs.webkit.org/show_bug.cgi?id=217723
1547
1548         Reviewed by Tim Horton.
1549
1550         Copy test header command type generation from WebKitTestRunner to DumpRenderTree, to 
1551         begin support for using any WebPreference from DumpRenderTree. This does not actually
1552         change any behavior yet, just updates the key mapping. 
1553
1554         * DumpRenderTree/CMakeLists.txt:
1555         * DumpRenderTree/DerivedSources-input.xcfilelist:
1556         * DumpRenderTree/DerivedSources-output.xcfilelist:
1557         * DumpRenderTree/DerivedSources.make:
1558         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
1559         * DumpRenderTree/Scripts/PreferencesTemplates: Added.
1560         * DumpRenderTree/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb: Added.
1561         * DumpRenderTree/TestOptions.cpp:
1562         (WTR::TestOptions::keyTypeMapping):
1563         * DumpRenderTree/TestOptions.h:
1564         * DumpRenderTree/mac/Configurations/Base.xcconfig:
1565
1566 2020-10-14  Alexey Proskuryakov  <ap@apple.com>
1567
1568         Remove WebKitLauncher
1569         https://bugs.webkit.org/show_bug.cgi?id=217729
1570
1571         Reviewed by Darin Adler.
1572
1573         This is part of long defunct nightly build infrastructure.
1574
1575         * .gitattributes:
1576         * BuildSlaveSupport/build-launcher-app: Removed.
1577         * Scripts/webkitpy/style/checkers/sdkvariant.py:
1578         * WebKitLauncher: Removed.
1579
1580 2020-10-14  Commit Queue  <commit-queue@webkit.org>
1581
1582         Unreviewed, reverting r268431 and r268443.
1583         https://bugs.webkit.org/show_bug.cgi?id=217728
1584
1585         Broke debug builds of GTK, WinCairo and Playstation ports
1586
1587         Reverted changesets:
1588
1589         "IPC testing JS API should expose a reply and describe the
1590         list of arguments for each message"
1591         https://bugs.webkit.org/show_bug.cgi?id=217565
1592         https://trac.webkit.org/changeset/268431
1593
1594         "IPC testing JS API should expose a reply and describe the
1595         list of arguments for each message"
1596         https://bugs.webkit.org/show_bug.cgi?id=217565
1597         https://trac.webkit.org/changeset/268443
1598
1599 2020-10-14  Alex Christensen  <achristensen@webkit.org>
1600
1601         Disallow ports in file URLs
1602         https://bugs.webkit.org/show_bug.cgi?id=217252
1603
1604         Reviewed by Darin Adler.
1605
1606         * TestWebKitAPI/Tests/WTF/URLParser.cpp:
1607         (TestWebKitAPI::TEST_F):
1608
1609 2020-10-14  Alexey Shvayka  <shvaikalesh@gmail.com>
1610
1611         Unreviewed. Update my status to "reviewer" and add WebIDL expertise.
1612
1613         * Scripts/webkitpy/common/config/contributors.json:
1614
1615 2020-10-14  Keith Rollin  <krollin@apple.com>
1616
1617         'make debug' fails on the repository root if ccache is installed on mac after r262147
1618         https://bugs.webkit.org/show_bug.cgi?id=212469
1619         <rdar://problem/70278783>
1620
1621         Reviewed by David Kilzer.
1622
1623         ccache is frequently installed in /usr/local/bin. However, when
1624         running under XCBuild, $PATH does not include /usr/local/bin. This
1625         leaves in a situation where the check for the existence of ccache in
1626         Makefile.shared succeeds, but the use of ccache in ccache-wrapper
1627         fails. To address this, look for ccache in a few well-known places
1628         rather than just relying on $PATH. If it still can't be found, fall
1629         back to compiling normally without ccache.
1630
1631         * ccache/ccache-wrapper:
1632
1633 2020-10-14  Sam Weinig  <weinig@apple.com>
1634
1635         [Testing] Support configuring any preference from test headers for WebKitTestRunner
1636         https://bugs.webkit.org/show_bug.cgi?id=217645
1637
1638         Reviewed by Tim Horton.
1639
1640         Support using any preference defined in any of the WebPreference*.yaml configuration files
1641         as a test header command rather than limiting it to a hard coded subset by generating the 
1642         list of supported commands and their types from the yaml files themselves.
1643         
1644         This currently only works for WebKitTestRunner, but will be made to work with DumpRenderTree
1645         in subsequent changes.
1646
1647         * WebKitTestRunner/CMakeLists.txt:
1648         * WebKitTestRunner/Configurations/Base.xcconfig:
1649         * WebKitTestRunner/DerivedSources-input.xcfilelist:
1650         * WebKitTestRunner/DerivedSources-output.xcfilelist:
1651         * WebKitTestRunner/DerivedSources.make:
1652         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
1653         * WebKitTestRunner/Scripts/PreferencesTemplates: Added.
1654         * WebKitTestRunner/Scripts/PreferencesTemplates/TestOptionsGeneratedKeys.h.erb: Added.
1655         Add generation of TestOptionsGeneratedKeys.h from the WebPreference*.yaml using
1656         the shared GeneratePreferences.rb script in WTF.
1657
1658         * WebKitTestRunner/TestController.cpp:
1659         (WTR::TestController::resetPreferencesToConsistentValues):
1660         Move preference setting to the bottom of the file to allow any preference
1661         to be overriden. Also adds in support for double, uint32_t, and string preferences
1662         though none of those are currently being used.
1663
1664         * WebKitTestRunner/TestOptions.cpp:
1665         (WTR::TestOptions::keyTypeMapping):
1666         Use generated macro GENERATED_WEB_PREFERENCE_KEY_TYPE_MAPPINGS rather than hardcoding
1667         all the preferences types.
1668
1669         * WebKitTestRunner/TestOptions.h:
1670         (WTR::TestOptions::boolWebPreferenceFeatures const):
1671         (WTR::TestOptions::doubleWebPreferenceFeatures const):
1672         (WTR::TestOptions::uint32WebPreferenceFeatures const):
1673         (WTR::TestOptions::stringWebPreferenceFeatures const):
1674         Expose accessors for preferences values for use in setting the actual preference
1675         values. Rather than setting all preferences, we now only set preferences that have
1676         been explicitly requested, using the default value for any that have not.
1677
1678 2020-10-14  Stephan Szabo  <stephan.szabo@sony.com>
1679
1680         builtins-generator-tests and bindings-generation-tests are reporting "Failed to install configparser-4.0.2!" since r268267 on WinCairo Buildbot
1681         https://bugs.webkit.org/show_bug.cgi?id=217586
1682
1683         Reviewed by Jonathan Bedard.
1684
1685         Pass proxy environment variables to setup.py so wincairo bots
1686         which need the proxy set can reach pypi.org.
1687
1688         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
1689         * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
1690
1691 2020-10-14  Ryan Haddad  <ryanhaddad@apple.com>
1692
1693         Temporarily reduce the number of iOS simulators booted during testing
1694         https://bugs.webkit.org/show_bug.cgi?id=217681
1695
1696         Reviewed by Jonathan Bedard.
1697
1698         To work around unexpected timouts with iOS 14 (webkit.org/b/217392),
1699         increase the estimated memory cost for booting iOS simulators.
1700
1701         * Scripts/webkitpy/xcode/simulated_device.py:
1702         (SimulatedDeviceManager): Remove an obsolete FIXME and change the
1703         estimated memory cost for a simulator to 8GB, which reduces the number
1704         of booted simulators in our CI from 10 to 8. This change reduced the
1705         number of unexpected timeouts seen on our bots from ~20 to 2, and came
1706         at a penalty of < 5 minutes to layout test duration.
1707
1708 2020-10-14  Kate Cheney  <katherine_cheney@apple.com>
1709
1710         Remove ResourceLoadStatistics telemetry
1711         https://bugs.webkit.org/show_bug.cgi?id=217665
1712         <rdar://problem/69748988>
1713
1714         Reviewed by Sam Weinig.
1715
1716         Telemetry calculation in ITP is unused, very complicated, a potential
1717         privacy risk, and it causes flaky tests. We should remove it.
1718
1719         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1720         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1721         (WTR::InjectedBundle::didReceiveMessageToPage):
1722         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1723         (WTR::TestRunner::installStatisticsDidRunTelemetryCallback): Deleted.
1724         (WTR::TestRunner::statisticsDidRunTelemetryCallback): Deleted.
1725         (WTR::TestRunner::statisticsSubmitTelemetry): Deleted.
1726         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1727         * WebKitTestRunner/TestController.cpp:
1728         (WTR::TestController::statisticsSubmitTelemetry): Deleted.
1729         * WebKitTestRunner/TestController.h:
1730         * WebKitTestRunner/TestInvocation.cpp:
1731         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1732
1733 2020-10-14  Kate Cheney  <katherine_cheney@apple.com>
1734
1735         Remove _WKWebViewCategory from WKWebViewConfiguration
1736         https://bugs.webkit.org/show_bug.cgi?id=217679
1737         <rdar://problem/70260337>
1738
1739         Reviewed by Sam Weinig.
1740
1741         * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
1742
1743 2020-10-14  Aakash Jain  <aakash_jain@apple.com>
1744
1745         Rename slave to bot for gtk-linux bot names
1746         https://bugs.webkit.org/show_bug.cgi?id=217702
1747
1748         Reviewed by Carlos Alberto Lopez Perez.
1749
1750         * BuildSlaveSupport/build.webkit.org-config/config.json:
1751
1752 2020-10-14  Zan Dobersek  <zdobersek@igalia.com>
1753
1754         Remove ACCELERATED_2D_CANVAS build flags and guarded code
1755         https://bugs.webkit.org/show_bug.cgi?id=217603
1756
1757         Reviewed by Carlos Garcia Campos.
1758
1759         * Scripts/webkitperl/FeatureList.pm:
1760         Remove the ACCELERATED_2D_CANVAS feature flag.
1761
1762 2020-10-14  Diego Pino Garcia  <dpino@igalia.com>
1763
1764         [webkitpy] Allow passing subtests to GLIB API testrunner
1765         https://bugs.webkit.org/show_bug.cgi?id=217466
1766
1767         Reviewed by Carlos Garcia Campos.
1768
1769         GLIB API testrunner didn't allow passing a list of subtests to run.
1770         That was possible, however, when executing a GLIB API binary directly
1771         using knob -p. The patch adds the same option to GLIB API testrunner
1772         and passes down the list of subtests accordingly.
1773
1774         * glib/api_test_runner.py:
1775         (TestRunner._run_test_glib):
1776         (TestRunner._run_test):
1777         (TestRunner.run_tests):
1778         (add_options):
1779
1780 2020-10-13  Ryosuke Niwa  <rniwa@webkit.org>
1781
1782         IPC testing JS API should expose a reply and describe the list of arguments for each message
1783         https://bugs.webkit.org/show_bug.cgi?id=217565
1784
1785         Fixed the tests.
1786
1787         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
1788
1789 2020-10-13  Jonathan Bedard  <jbedard@apple.com>
1790
1791         [webkitscmpy] Add `git-webkit find` (Follow up fix)
1792         https://bugs.webkit.org/show_bug.cgi?id=217534
1793         <rdar://problem/70152431>
1794
1795         Unreviewed follow up fix.
1796
1797         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Version bump.
1798         * Scripts/libraries/webkitscmpy/setup.py: "program" was not a directory in the landed change.
1799
1800 2020-10-13  Jonathan Bedard  <jbedard@apple.com>
1801
1802         [webkitscmpy] Add `git-webkit find`
1803         https://bugs.webkit.org/show_bug.cgi?id=217534
1804         <rdar://problem/70152431>
1805
1806         Reviewed by Dewei Zhu.
1807
1808         * Scripts/git-webkit: Added.
1809         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version.
1810         * Scripts/libraries/webkitcorepy/webkitcorepy/arguments.py:
1811         (NoAction.__call__):
1812         (CountAction): Create an action to increment or decrement a variable by a value.
1813         (CallbackAction): Create an action which will trigger a callback when set.
1814         (LoggingGroup): Create a group which allows the user to change logging behavior.
1815         * Scripts/libraries/webkitscmpy/git-webkit: Added.
1816         * Scripts/libraries/webkitscmpy/setup.py: Add webkitscmpy.program and git-webkit.
1817         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
1818         * Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:
1819         (Commit): Make the 12 character hash based on a class variable.
1820         * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
1821         (Git.default_branch): Fallback to 'master' or 'main' if the remote isn't available.
1822         (Git.find): Use git to match branches and tags to a hash instead of trying to do it ourselves.
1823         * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
1824         (Scm.find): Add function to convert generic string arguments to a commit, and then find that commit in
1825         the repository.
1826         * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
1827         (Svn): Support a few different SVN binary paths.
1828         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add rev-parse branch/tag/HEAD -> hash conversion.
1829         * Scripts/libraries/webkitscmpy/webkitscmpy/program.py: Added.
1830         (Command): Base class for all commands.
1831         (Find):
1832         (Find.parser): Configure parser for 'find' sub-program.
1833         (Find.main): Given an identifier, revision, hash or branch name, find and print the matching commit from
1834         (main): Entry point to git-<project> scripts.
1835         * Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py: Added.
1836         (TestFind):
1837         (TestFind.test_basic_git):
1838         (TestFind.test_basic_git_svn):
1839         (TestFind.test_basic_svn):
1840         (TestFind.test_branch_tilde):
1841         (TestFind.test_identifier_git):
1842         (TestFind.test_identifier_git_svn):
1843         (TestFind.test_identifier_svn):
1844         (TestFind.test_hash):
1845         (TestFind.test_revision_svn):
1846         (TestFind.test_revision_git_svn):
1847         (TestFind.test_standard):
1848
1849 2020-10-12  Ryosuke Niwa  <rniwa@webkit.org>
1850
1851         IPC testing JS API should expose a reply and describe the list of arguments for each message
1852         https://bugs.webkit.org/show_bug.cgi?id=217565
1853
1854         Reviewed by Geoffrey Garen.
1855
1856         Added tests for decoding replies for sync and async messages and one for argument descriptions.
1857
1858         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
1859         (-[IPCTestingAPIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
1860         (-[IPCTestingAPIDelegate _webView:webContentProcessDidTerminateWithReason:]):
1861         (IPCTestingAPI.DecodesReplyArgumentsForPrompt):
1862         (IPCTestingAPI.DecodesReplyArgumentsForAsyncMessage):
1863         (IPCTestingAPI.DescribesArguments):
1864
1865 2020-10-13  Aakash Jain  <aakash_jain@apple.com>
1866
1867         [build.webkit.org] Rename slave to worker in config.json
1868         https://bugs.webkit.org/show_bug.cgi?id=217672
1869
1870         Reviewed by Dewei Zhu.
1871
1872         * BuildSlaveSupport/build.webkit.org-config/config.json: Renamed slaves to workers and slavenames to workernames.
1873         Also deleted unused entry for test-slave.
1874         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: Renamed slave to worker.
1875         * BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py: Ditto.
1876         * BuildSlaveSupport/build.webkit.org-config/make_passwords_json.py: Ditto.
1877         (create_mock_worker_passwords_dict):
1878
1879 2020-10-13  Ellie Epskamp-Hunt  <eepskamphunt@apple.com>
1880
1881         Expose a property on WKWebView to know if it's being inspected.
1882         https://bugs.webkit.org/show_bug.cgi?id=217629
1883         rdar://70073369
1884
1885         Reviewed by Brian Burg.
1886
1887         Update the property name in existing tests.
1888
1889         * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:
1890         (TEST):
1891
1892 2020-10-13  Keith Rollin  <krollin@apple.com>
1893
1894         Remove leftover MACOSX_DEPLOYMENT_TARGET_macosx support
1895         https://bugs.webkit.org/show_bug.cgi?id=217649
1896         <rdar://problem/70236877>
1897
1898         Reviewed by Darin Adler.
1899
1900         Bug 42796 introduced MACOSX_DEPLOYMENT_TARGET_<PLATFORM> as "support
1901         for compiling WebKit against iOS SDKs". Support for the iOS part of
1902         this feature was later removed in several changes, including Bug
1903         139212, Bug 139463 and Bug 144762. However, vestiges have remained for
1904         five or six years in the form of MACOSX_DEPLOYMENT_TARGET_macosx. The
1905         inclusion of the platform in MACOSX_DEPLOYMENT_TARGET is no longer
1906         needed and can be removed.
1907
1908         This changes brings most projects in conformance with other projects
1909         that don't support including the platform in MACOSX_DEPLOYMENT_TARGET,
1910         including WebEditingTester, gtest, WebKitTestRunner, MiniBrowser, and
1911         TestWebKitAPI.
1912
1913         Along the way, remove a couple of left-over references to macOS 10.16,
1914         and a couple of places where [sdk=macosx*] was still being used.
1915
1916         With this change, initialization of MACOSX_DEPLOYMENT_TARGET should be
1917         consistent across all projects, with two exceptions: WebKitLauncher
1918         (which hardcodes it to 10.12) and libwebrtc's copy of googletest
1919         (which hardcodes it to 10.4). The reasons for these hard-coded values
1920         is not apparent, so leave them be.
1921
1922         * ContentExtensionTester/Configurations/DebugRelease.xcconfig:
1923         * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
1924         * ImageDiff/cg/Configurations/DebugRelease.xcconfig:
1925         * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:
1926
1927 2020-10-13  Lauro Moura  <lmoura@igalia.com>
1928
1929         webkitpy: Log and report webdriver harness errors
1930         https://bugs.webkit.org/show_bug.cgi?id=217659
1931
1932         Reviewed by Jonathan Bedard.
1933
1934         * Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
1935         (WebDriverTestRunner.process_results): Report failed harness tests,
1936         not just subtests.
1937         * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
1938         (WebDriverTestRunnerW3C.run): Print to error log when a test run
1939         fails, not just subtests.
1940
1941 2020-10-13  Sam Weinig  <weinig@apple.com>
1942
1943         [Testing] Rename test header commands to match names in WebPreferences*.yaml
1944         https://bugs.webkit.org/show_bug.cgi?id=217654
1945
1946         Reviewed by Simon Fraser.
1947
1948         Renames all the test header commands (e.g. useAcceleratedDrawing) to match name in
1949         WebPreferences*.yaml files (e.g. AcceleratedDrawingEnabled).
1950         
1951         Also splits up TestFeatures into test runner specific features (e.g. runSingly) that
1952         don't have a WebPreferences counterpart, and WebPreferences specific features. This
1953         will allow future patches to support arbritrary WebPreferences more easily.
1954
1955         * DumpRenderTree/TestOptions.cpp:
1956         * DumpRenderTree/TestOptions.h:
1957         * DumpRenderTree/mac/DumpRenderTree.mm:
1958         (setWebPreferencesForTestOptions):
1959         * TestRunnerShared/TestFeatures.cpp:
1960         * TestRunnerShared/TestFeatures.h:
1961         * WebKitTestRunner/TestController.cpp:
1962         * WebKitTestRunner/TestOptions.cpp:
1963         * WebKitTestRunner/TestOptions.h:
1964         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
1965         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
1966         * WebKitTestRunner/mac/TestControllerMac.mm:
1967         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
1968
1969 2020-10-13  Peng Liu  <peng.liu6@apple.com>
1970
1971         Clean up the API tests of CARingBuffer
1972         https://bugs.webkit.org/show_bug.cgi?id=217633
1973
1974         Reviewed by Simon Fraser.
1975
1976         Remove unused private functions and enable the tests for iOS.
1977
1978         * TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp:
1979         (TestWebKitAPI::CARingBufferTest::audioBufferListSizeForStream): Deleted.
1980         (TestWebKitAPI::CARingBufferTest::configureBufferListForStream): Deleted.
1981
1982 2020-10-13  Lauro Moura  <lmoura@igalia.com>
1983
1984         REGRESSION(r268267) [webkitpy] Add missing deps for pytest when running webdriver tests
1985         https://bugs.webkit.org/show_bug.cgi?id=217650
1986
1987         Reviewed by Jonathan Bedard.
1988
1989         scandir (needed as os.scandir was added only in py 3.5)
1990
1991         Also fixed more_itertools autoinstall declaration so the package
1992         name, with underscore, is the name of the webkitcorepy package and the
1993         dash is used for the pypi package name.
1994
1995         With these changes the script does not error anymore, although there
1996         seems to be some issues with the executor when running tests. They
1997         happen to only start and stop the webserver but not actually being
1998         run. To be investigated in a separate bug.
1999
2000         * Scripts/webkitpy/__init__.py:
2001
2002 2020-10-13  Adrian Perez de Castro  <aperez@igalia.com>
2003
2004         [GTK] Add support for gamepad tests
2005         https://bugs.webkit.org/show_bug.cgi?id=98937
2006
2007         Reviewed by Carlos Garcia Campos.
2008
2009         Change PLATFORM(MAC) guards to ENABLE(GAMEPAD) around the support code used for
2010         testing gamepad support in WKTR, and update GTK port test expectations accordingly.
2011
2012         * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Change guards to ENABLE(GAMEPAD).
2013         * WebKitTestRunner/TestController.cpp: Ditto.
2014         (WTR::TestController::initialize):
2015         * WebKitTestRunner/TestInvocation.cpp: Ditto.
2016         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2017
2018 2020-10-13  Diego Pino Garcia  <dpino@igalia.com>
2019
2020         Unreviewed GLIB gardening. Remove several tests that were only failing in EWS API-GTK.
2021
2022         * TestWebKitAPI/glib/TestExpectations.json:
2023
2024 2020-10-12  Devin Rousso  <drousso@apple.com>
2025
2026         CSS "any-pointer:fine" media query false on iPad/Pencil
2027         https://bugs.webkit.org/show_bug.cgi?id=212580
2028         <rdar://problem/63813283>
2029
2030         Reviewed by Wenson Hsieh.
2031
2032         * TestWebKitAPI/Tests/WebKitCocoa/iOSStylusSupport.mm: Added.
2033         (iOSStylusSupport.StylusInitiallyDisconnected):
2034         (iOSStylusSupport.StylusInitiallyConnected):
2035         (iOSStylusSupport.StylusLaterDisconnected):
2036         (iOSStylusSupport.StylusLaterConnected):
2037         (iOSStylusSupport.StylusDisconnectedTimeout):
2038
2039         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2040
2041 2020-10-12  Jonathan Bedard  <jbedard@apple.com>
2042
2043         [webkitcorepy] Attempt to terminate stuck processes before killing them
2044         https://bugs.webkit.org/show_bug.cgi?id=217632
2045         <rdar://problem/70222803>
2046
2047         Reviewed by Dewei Zhu.
2048
2049         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version.
2050         * Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py:
2051         (run): Killed processes will sometimes not have stdout or stderr, while terminated processes often will.
2052
2053 2020-10-12  Luming Yin  <luming_yin@apple.com>
2054
2055         [macOS] Workaround for MAC_OS_X_VERSION_MAJOR incorrectly including minor version when building 
2056         with Xcode 12 on macOS Big Sur SUs
2057         https://bugs.webkit.org/show_bug.cgi?id=217602
2058         rdar://70194453
2059
2060         Reviewed by Darin Adler.
2061
2062         The previous workaround turns out to be ineffective because we can't set the value of 
2063         TARGET_MAC_OS_X_VERSION_MAJOR based on a previous value of itself. Introduce a new 
2064         variable TARGET_MAC_OS_X_VERSION_MAJOR to determine whether we need to explicitly 
2065         adjust MAC_OS_X_VERSION_MAJOR to 110000.
2066
2067         * ContentExtensionTester/Configurations/DebugRelease.xcconfig:
2068         * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
2069         * ImageDiff/cg/Configurations/DebugRelease.xcconfig:
2070         * MiniBrowser/Configurations/DebugRelease.xcconfig:
2071         * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
2072         * WebEditingTester/Configurations/DebugRelease.xcconfig:
2073         * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
2074         * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:
2075
2076 2020-10-12  Sam Weinig  <weinig@apple.com>
2077
2078         Share TestFeatures and TestCommand infrastructure between DumpRenderTree and WebKitTestRunner
2079         https://bugs.webkit.org/show_bug.cgi?id=217614
2080
2081         Reviewed by Dean Jackson.
2082
2083         Move TestFeatures and TestCommand code from WebKitTestRunner to TestRunnerShared
2084         and adopt shared code in both WebKitTestRunner and DumpRenderTree.
2085         
2086         This allows us to remove duplicate argument and test header parsing code and
2087         avoid updating both when we want want change things.
2088         
2089         To support different sets of test header options, featureDefaultsFromTestHeaderForTest now
2090         has a parameter for a key type map, rather than the old hardcoded set. This allows
2091         WebKitTestRunner and DumpRenderTree, which currently have slightly different options
2092         to continue to behave in the same way. Eventually, it will probably make sense to have these
2093         mostly generated from the WebPreferences*.yaml configuration files.
2094
2095         Matching precedent, shared files use the WTR namespace. 
2096
2097         * DumpRenderTree/CMakeLists.txt:
2098         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
2099         * TestRunnerShared/CMakeLists.txt:
2100         * WebKitTestRunner/CMakeLists.txt:
2101         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2102         Add new files.
2103
2104         * DumpRenderTree/DumpRenderTree.h:
2105         Removes TestCommand and parseInputLine now that they come from shared TestCommand.h
2106
2107         * DumpRenderTree/DumpRenderTreeCommon.cpp: Removed.
2108         Moved contents to shared TestCommand.cpp
2109         
2110         * DumpRenderTree/TestOptions.cpp:
2111         * DumpRenderTree/TestOptions.h:
2112         Adopt model from WebKitTestRunner and use initialization from TestFeatures.
2113
2114         * DumpRenderTree/mac/DumpRenderTree.mm:
2115         Adopt shared TestFeatures and TestCommand infrastructure. Construct TestOptions
2116         in a similar manner to WebKitTestRunner by merging together hardcoded / path based
2117         features and test header based features.
2118  
2119         * DumpRenderTree/mac/UIDelegate.h:
2120         * DumpRenderTree/mac/UIDelegate.mm:
2121         Update for new namespace.
2122
2123         * TestRunnerShared/TestCommand.cpp: Added.
2124         * TestRunnerShared/TestCommand.h: Added.
2125         * TestRunnerShared/TestFeatures.cpp: Added.
2126         * TestRunnerShared/TestFeatures.h: Added.
2127         * WebKitTestRunner/TestController.cpp:
2128         * WebKitTestRunner/TestController.h:
2129         * WebKitTestRunner/TestOptions.cpp:
2130         * WebKitTestRunner/TestOptions.h:
2131         Moved from WebKitTestRunner. Generalized to TestFeatures to take a key type map,
2132         rather than hard coding it. Replace use of WebKit types, like WKURLRef, with std::string
2133         and std::filesystem::path.
2134
2135 2020-10-12  Luming Yin  <luming_yin@apple.com>
2136
2137         [macOS] Workaround for MAC_OS_X_VERSION_MAJOR incorrectly including minor version when building 
2138         with Xcode 12 on macOS Big Sur SUs
2139         https://bugs.webkit.org/show_bug.cgi?id=217602
2140         rdar://70194453
2141
2142         Reviewed by Darin Adler.
2143
2144         Due to a bug in Xcode (rdar://70185899), Xcode 12.0 and Xcode 12.1 Beta incorrectly includes the 
2145         minor release number in MAC_OS_X_VERSION_MAJOR, which causes Debug and Release builds of WebKit 
2146         to be misconfigured when building on macOS Big Sur SUs, leading to webpages failing to load.
2147
2148         To work around the Xcode bug, when the MAC_OS_X_VERSION_MAJOR includes the minor version number, 
2149         drop the minor version number by explicitly setting TARGET_MAC_OS_X_VERSION_MAJOR to 110000.
2150
2151         Note: This change should be reverted after <rdar://70185899> is resolved.
2152
2153         * ContentExtensionTester/Configurations/DebugRelease.xcconfig:
2154         * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
2155         * ImageDiff/cg/Configurations/DebugRelease.xcconfig:
2156         * MiniBrowser/Configurations/DebugRelease.xcconfig:
2157         * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
2158         * WebEditingTester/Configurations/DebugRelease.xcconfig:
2159         * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
2160         * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:
2161
2162 2020-10-11  Sam Weinig  <weinig@apple.com>
2163
2164         [Preferences] Introduce string based SPI for WKPreferences to allow tests to change internal behavior without always adding additional SPI
2165         https://bugs.webkit.org/show_bug.cgi?id=217582
2166
2167         Reviewed by Darin Adler.
2168
2169         Adopt new WebKit SPI to set preferences using the keys defined in the WebPreferences*.yaml 
2170         files. 
2171
2172         * WebKitTestRunner/TestController.cpp:
2173         (WTR::TestController::initialize):
2174         Remove need for m_shouldUseAcceleratedDrawing by merging it into the global feature set.
2175
2176         (WTR::TestController::createWebViewWithOptions):
2177         Move WKHTTPCookieStoreDeleteAllCookies() call out of resetPreferencesToConsistentValues
2178         where it did not make sense.
2179
2180         (WTR::TestController::resetPreferencesToConsistentValues):
2181         Replace preference setters that used values from TestOptions with use of the new
2182         WKPreferencesSetBoolValueForKey SPI. Also removes some unnecessary #ifdefs, as the API
2183         it was guarding is always available, though may just be a no-op if the feature is disabled.
2184
2185         (WTR::TestController::resetStateToConsistentValues):
2186         Move Cocoa specific call to WebCoreTestSupport::setAdditionalSupportedImageTypesForTesting to
2187         TestControllerCocoa.mm and Gtk specific call to WKTextCheckerContinuousSpellCheckingEnabledStateChanged
2188         to TestControllerGtk.cpp.
2189
2190         * WebKitTestRunner/TestController.h:
2191         Remove unimplemented globalFeatureDefaultsForTest() function and now unused m_shouldUseAcceleratedDrawing
2192         member variable.
2193
2194         * WebKitTestRunner/TestOptions.cpp:
2195         (WTR::TestOptions::boolWKPreferences const):
2196         Add helper to get all the bool options in TestOptions that correspond with WebKit preferences.
2197
2198         * WebKitTestRunner/TestOptions.h:
2199         (WTR::TestOptions::useAcceleratedDrawing const): Deleted.
2200         (WTR::TestOptions::useMockScrollbars const): Deleted.
2201         (WTR::TestOptions::needsSiteSpecificQuirks const): Deleted.
2202         (WTR::TestOptions::enableIntersectionObserver const): Deleted.
2203         (WTR::TestOptions::enableMenuItemElement const): Deleted.
2204         (WTR::TestOptions::enableKeygenElement const): Deleted.
2205         (WTR::TestOptions::enableModernMediaControls const): Deleted.
2206         (WTR::TestOptions::enablePointerLock const): Deleted.
2207         (WTR::TestOptions::enableWebAuthentication const): Deleted.
2208         (WTR::TestOptions::enableWebAuthenticationLocalAuthenticator const): Deleted.
2209         (WTR::TestOptions::enableInspectorAdditions const): Deleted.
2210         (WTR::TestOptions::allowCrossOriginSubresourcesToAskForCredentials const): Deleted.
2211         (WTR::TestOptions::domPasteAllowed const): Deleted.
2212         (WTR::TestOptions::enableColorFilter const): Deleted.
2213         (WTR::TestOptions::checkForWorldLeaks const): Deleted.
2214         (WTR::TestOptions::shouldIgnoreMetaViewport const): Deleted.
2215         (WTR::TestOptions::enableServiceControls const): Deleted.
2216         (WTR::TestOptions::enableAppNap const): Deleted.
2217         (WTR::TestOptions::enableBackForwardCache const): Deleted.
2218         (WTR::TestOptions::enableCaptureVideoInUIProcess const): Deleted.
2219         (WTR::TestOptions::enableCaptureVideoInGPUProcess const): Deleted.
2220         (WTR::TestOptions::enableCaptureAudioInUIProcess const): Deleted.
2221         (WTR::TestOptions::enableCaptureAudioInGPUProcess const): Deleted.
2222         Remove all getters that are now replaced by boolWKPreferences.
2223         Also, sorts all the lists to make it easier to find things.
2224
2225         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2226         (WTR::initializeWebViewConfiguration):
2227         (WTR::TestController::platformCreateWebView):
2228         Remove setting of configuration values that also covered by boolWKPreferences.
2229
2230         (WTR::TestController::cocoaResetStateToConsistentValues):
2231         Move Cocoa specific call here.
2232
2233         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
2234         (WTR::TestController::platformResetStateToConsistentValues):
2235         Move Gtk specific call here.
2236
2237         * WebKitTestRunner/ios/TestControllerIOS.mm:
2238         (WTR::TestController::platformResetPreferencesToConsistentValues):
2239         (WTR::TestController::platformConfigureViewForTest):
2240         Remove setting of configuration values that also covered by boolWKPreferences.
2241
2242         * WebKitTestRunner/win/TestControllerWin.cpp:
2243         (WTR::TestController::platformResetStateToConsistentValues):
2244         Moved default no-op implementation from TestController.cpp now that not all
2245         non-Cocoa platforms use the same implementation.
2246
2247         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
2248         (WTR::TestController::platformResetStateToConsistentValues):
2249         Moved default no-op implementation from TestController.cpp now that not all
2250         non-Cocoa platforms use the same implementation.
2251
2252 2020-10-11  Michael Catanzaro  <mcatanzaro@gnome.org>
2253
2254         -Wdeprecated-declarations caused by WKTR using WKBundlePostSynchronousMessage
2255         https://bugs.webkit.org/show_bug.cgi?id=217591
2256
2257         Reviewed by Darin Adler.
2258
2259         Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
2260
2261         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
2262         (WTR::postSynchronousMessage):
2263
2264 2020-10-11  Darin Adler  <darin@apple.com>
2265
2266         [macOS] Harden more build configurations against macOS versions 11 and higher as well as inclusion of patch versions
2267         https://bugs.webkit.org/show_bug.cgi?id=217595
2268
2269         Reviewed by Alexey Proskuryakov.
2270
2271         * ContentExtensionTester/Configurations/Base.xcconfig: Updated to same idiom used elsewhere.
2272         * DumpRenderTree/mac/Configurations/Base.xcconfig: Ditto.
2273         * ImageDiff/cg/Configurations/Base.xcconfig: Ditto.
2274         * WebKitTestRunner/Configurations/Base.xcconfig: Ditto.
2275         * lldb/lldbWebKitTester/Configurations/Base.xcconfig: Ditto.
2276
2277         * Scripts/webkitpy/common/config/contributors.json: Added contributor Luming Yin, an engineer who works on Safari at
2278         Apple who has been contributing build fixes like these.
2279
2280 2020-10-10  Darin Adler  <darin@apple.com>
2281
2282         REGRESSION (r267761): editing/mac/spelling/autocorrection-contraction.html is a constant timeout on macOS wk2 Debug
2283         https://bugs.webkit.org/show_bug.cgi?id=217548
2284
2285         Reviewed by Alexey Proskuryakov.
2286
2287         * TestRunnerShared/Bindings/JSBasics.cpp:
2288         (WTR::objectProperty): Use JSValueIsObject instead of JSValueToObject. The latter
2289         function is *very* slow when passed undefined or null, creating an exception object
2290         every time, even when we pass nullptr to indicate that we don't want the exception
2291         object, and also invoking debugging machinery to inform the "inspector" about this
2292         exception, which results in logging to the console while running tests. This
2293         inefficiency is something we can fix in JavaScriptCore if we like, and makes it a
2294         bad idea to call the function on undefined and null. And also points out the problem
2295         with passing exceptions to anyone except the caller: there's no reason the inspector
2296         needs to know about the exception in a case like this. Because the uses of this
2297         function in the test runners don't need that behavior of converting non-object values
2298         to objects, it was best just to stop using JSValueToObject entirely.
2299
2300         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2301         (WTR::InjectedBundle::didReceiveMessageToPage): Use uint64Value here. Just something
2302         missed in my earlier refactoring and spotted while debugging.
2303
2304 2020-10-11  Jonathan Bedard  <jbedard@apple.com>
2305
2306         [webkitscmpy] Support json encoding of Commit object
2307         https://bugs.webkit.org/show_bug.cgi?id=217533
2308         <rdar://problem/70151709>
2309
2310         Reviewed by Dewei Zhu.
2311
2312         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
2313         * Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:
2314         (Commit.__repr__): Support identifiers being 0.
2315         (Commit.Encoder): Encode commit as dictionary.
2316         * Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py:
2317
2318 2020-10-11  Yusuke Suzuki  <ysuzuki@apple.com>
2319
2320         Unreviewed, fix WK2 Debug test failures
2321         https://bugs.webkit.org/show_bug.cgi?id=217500
2322
2323         WebKitTestRunner also uses WebCoreTestSupport's JIT operations so we need to populate them too.
2324
2325         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
2326         (WTR::InjectedBundle::initialize):
2327
2328 2020-10-09  Yusuke Suzuki  <ysuzuki@apple.com>
2329
2330         [JSC] Assert Operation and HostFunction are in JITOperationsList
2331         https://bugs.webkit.org/show_bug.cgi?id=217500
2332
2333         Reviewed by Saam Barati.
2334
2335         This patch turned out that WebCoreTestSupport has its own JIT operations. So we need to populate them in test harness specially.
2336
2337         * DumpRenderTree/mac/DumpRenderTree.mm:
2338         (dumpRenderTree):
2339         * DumpRenderTree/win/DumpRenderTree.cpp:
2340         (main):
2341         * WebKitTestRunner/TestController.cpp:
2342         (WTR::TestController::initialize):
2343
2344 2020-10-09  Jonathan Bedard  <jbedard@apple.com>
2345
2346         [webkitscmpy] Handle svn info run from directory
2347         https://bugs.webkit.org/show_bug.cgi?id=217521
2348         <rdar://problem/70144173>
2349
2350         Reviewed by Dewei Zhu.
2351
2352         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
2353         * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
2354         (Svn.__init__): Set the root_path, so that svn info is run from the top level.
2355         (Svn.info): Rely on root_path, not path.
2356         (Svn.root_path): Use self._root_path instead of self.info() call.
2357         (Svn.list): Rely on root_path, not path.
2358         (Svn._cache_revisions):  Ditto.
2359         (Svn.remote): The repository root will not change during a single command invocation.
2360         (Svn._branch_for): Handle initial branch commits, which. may have non-standard change lists.
2361         (Svn.commit): Rely on root_path, not path, certain svn info calls will not change during
2362         the invocation of a single program.
2363
2364 2020-10-09  Alex Christensen  <achristensen@webkit.org>
2365
2366         REGRESSION: [Mac Release] 2 Cookie API are failing
2367         https://bugs.webkit.org/show_bug.cgi?id=217393
2368
2369         Reviewed by Chris Dumez.
2370
2371         If bad things happen when running API tests, the TestWebKitAPI default cookie storage can get stuck with
2372         a cookie accept policy of never, which causes future tests to fail.  All existing tests restore the cookie
2373         accept policy to what it was before the test started, but once a machine gets into a bad state, there's nothing
2374         to reset it to the default state.  Some of our test bots have gotten into this bad state, causing 2 cookie API
2375         tests to fail.  To fix this, set the cookie accept policy to its default value before running these two tests.
2376         I verified this works by getting my computer into this bad state, verifying repeated API test runs don't fix it,
2377         and verified this brings the computer back into a good state and causes the API tests to pass again.
2378
2379         * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:
2380         (TEST):
2381         * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
2382         (TestWebKitAPI::TEST):
2383
2384 2020-10-09  Jonathan Bedard  <jbedard@apple.com>
2385
2386         [webkitscmpy] Support unicode contributor names
2387         https://bugs.webkit.org/show_bug.cgi?id=217520
2388         <rdar://problem/70143490>
2389
2390         Reviewed by Dewei Zhu.
2391
2392         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
2393         * Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
2394         (Contributor.__init__): Standardize name and emails as unicode.
2395         (Contributor.__repr__): Ensure native string representation.
2396         * Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:
2397         (TestContributor):
2398         (TestContributor.test_unicode):
2399
2400 2020-10-09  Kate Cheney  <katherine_cheney@apple.com>
2401
2402         Promote WKWebView media playback SPI to API
2403         https://bugs.webkit.org/show_bug.cgi?id=217335
2404         <rdar://problem/63406100>
2405
2406         Reviewed by Jer Noble.
2407
2408         Add API testing coverage for new API. Also converted testing to
2409         use the new API instead of SPI.
2410
2411         * TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm:
2412         (TestWebKitAPI::TEST):
2413
2414 2020-10-09  Jonathan Bedard  <jbedard@apple.com>
2415
2416         [webkitpy] Use webkitcorepy's auto installer for pytest packages
2417         https://bugs.webkit.org/show_bug.cgi?id=215895
2418         <rdar://problem/67885471>
2419
2420         Rubber-stamped by Aakash Jain.
2421
2422         * Scripts/webkitpy/__init__.py: Add pytest and it's dependencies.
2423         * Scripts/webkitpy/thirdparty/__init__.py:
2424         (AutoinstallImportHook.find_module): Remove pytest and pytest_timeout.
2425         (AutoinstallImportHook._install_pytest_timeout): Deleted.
2426         (AutoinstallImportHook._install_pytest): Deleted.
2427         * Scripts/webkitpy/webdriver_tests/pytest_runner.py: Implicitly use webkitcorepy's autoinstaller.
2428
2429 2020-10-09  Alex Christensen  <achristensen@webkit.org>
2430
2431         Use sendWithAsyncReply for NetworkProcess::CancelDownload
2432         https://bugs.webkit.org/show_bug.cgi?id=217420
2433
2434         Reviewed by Youenn Fablet.
2435
2436         * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
2437         (-[WaitUntilDownloadCanceledDelegate _download:didFailWithError:]):
2438         (-[DownloadMonitorTestDelegate _download:didFailWithError:]):
2439         (-[DownloadMonitorTestDelegate waitForDidFail]):
2440         (-[DownloadMonitorTestDelegate stopWaitingForDidFail]):
2441         (TestWebKitAPI::monitorDelegate):
2442         (TestWebKitAPI::webViewWithDownloadMonitorSpeedMultiplier):
2443         (TestWebKitAPI::downloadAtRate):
2444         (TestWebKitAPI::TEST):
2445         (-[WaitUntilDownloadCanceledDelegate _downloadDidCancel:]): Deleted.
2446         (-[DownloadMonitorTestDelegate _downloadDidCancel:]): Deleted.
2447
2448 2020-10-09  Lauro Moura  <lmoura@igalia.com>
2449
2450         [GLIB] Fix tests compilation warnings with deprecated API
2451         https://bugs.webkit.org/show_bug.cgi?id=217504
2452
2453         Reviewed by Carlos Garcia Campos.
2454
2455         webkit_web_context_set_network_proxy_settings() is deprecated in favor of
2456         webkit_website_data_manager_set_network_proxy_settings().
2457
2458         * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
2459         (ProxyAuthenticationTest::ProxyAuthenticationTest):
2460
2461 2020-10-09  Paulo Matos  <pmatos@igalia.com>
2462
2463         Add armv8l arch to generic arm umbrella architecture variable
2464         https://bugs.webkit.org/show_bug.cgi?id=217470
2465
2466         Reviewed by Adrian Perez de Castro.
2467
2468         The armv8l architecture specifies a system running an arm64 kernel
2469         but running in 32bit user land. Therefore for JSC purposes armv8l and
2470         armv7l are arm (32bit) architectures.
2471
2472         * Scripts/webkitdirs.pm:
2473         (determineNativeArchitecture):
2474
2475 2020-10-01  Matt Lewis  <jlewis3@apple.com>
2476
2477         Move EWS to new SDKs: tvOS 14, and watchOS 7.
2478         https://bugs.webkit.org/show_bug.cgi?id=217145
2479
2480         Reviewed by Aakash Jain.
2481
2482         * BuildSlaveSupport/ews-build/config.json:
2483
2484 2020-10-08  Ryosuke Niwa  <rniwa@webkit.org>
2485
2486         Make it possible to send an arbitrary IPC message from JavaScript
2487         https://bugs.webkit.org/show_bug.cgi?id=217423
2488         <rdar://problem/69969351>
2489
2490         Reviewed by Geoffrey Garen.
2491
2492         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2493         * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: Added.
2494         (-[IPCTestingAPIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
2495         (TEST):
2496
2497 2020-10-08  Sam Weinig  <weinig@apple.com>
2498
2499         Refactor TestOptions code in WebKitTestRunner to make it easier to rationalize and extend
2500         https://bugs.webkit.org/show_bug.cgi?id=217390
2501
2502         Reviewed by Darin Adler.
2503
2504         Refactors TestOptions code in WebKitTestRunner to make it clear how options coming in at 
2505         different levels are treated and what precedence each has. The order is (from least to most):
2506         
2507         - Global features passed to WebKitTestRunner via the command line (e.g. --show-touches)
2508         - Hardcoded features based on the path of the test being run (hopefully we can remove all soon)
2509         - Hardcoded platform specific defaults (currently only used by macOS for useThreadedScrolling).
2510         - Features from the test headers within the test itself.
2511         - Finally, a second chance for more platform specific defaults (currenly only used the Cocoa ports
2512           for setting enableProcessSwapOnNavigation and enableProcessSwapOnWindowOpen based on NSUserDefaults.)
2513
2514         To make this change work, and pave the way for future autogeneration of some of these test options,
2515         the TestOptions struct (now class) was overhauled. Instead of storing the state itself, TestOptions
2516         is now an immutable owner of a TestFeatures object. TestFeatures is a simple struct that contains maps 
2517         of option keys to values and can be merged with other TestFeatures objects. TestOptions takes a 
2518         TestFeatures at construction, and exposes getters for all keys, as well as defaults for when they are
2519         not in the maps. In future changes, I would like to remove many of these (the ones that correspond
2520         with WebKit preferences anyway) and have the keys and values automatically dealt with by WKPreferences.
2521
2522         * WebKitTestRunner/Options.cpp:
2523         * WebKitTestRunner/Options.h:
2524         Switch to std::unordered_map for consistency and ease of conversion.
2525
2526         * WebKitTestRunner/PlatformWebView.h:
2527         (WTR::PlatformWebView::viewSupportsOptions const):
2528         Update to call new TestOptions functions.
2529
2530         * WebKitTestRunner/StringFunctions.h:
2531         (WTR::toWK):
2532         (WTR::toWTFString):
2533         Add conversions for std::string.
2534
2535         * WebKitTestRunner/TestController.h:
2536         * WebKitTestRunner/TestController.cpp:
2537         (WTR::TestController::initialize):
2538         Replace some bools with a new global TestFeatures instance that forms the base of
2539         all TestFeatures merges.
2540         
2541         (WTR::TestController::generateContextConfiguration const):
2542         (WTR::TestController::generatePageConfiguration):
2543         (WTR::TestController::createWebViewWithOptions):
2544         (WTR::TestController::ensureViewSupportsOptionsForTest):
2545         (WTR::TestController::resetPreferencesToConsistentValues):
2546         (WTR::TestController::resetStateToConsistentValues):
2547         Update to call new TestOptions functions.
2548         
2549         (WTR::TestController::createTestURL):
2550         Expose as a static member function on TestController for use in other files.
2551         
2552         (WTR::TestController::testOptionsForTest const):
2553         Rework to be a sequence of TestFeatures merges.
2554         
2555         (WTR::TestController::updateWebViewSizeForTest):
2556         (WTR::TestController::updateWindowScaleForTest):
2557         Update to call new TestOptions functions.
2558         
2559         (WTR::createTestURL): Deleted.
2560         (WTR::parseBooleanTestHeaderValue): Deleted.
2561         (WTR::parseStringTestHeaderValueAsRelativePath): Deleted.
2562         (WTR::parseStringTestHeaderValueAsURL): Deleted.
2563         (WTR::updateTestOptionsFromTestHeader): Deleted.
2564         (WTR::TestController::platformAddTestOptions const): Deleted.
2565         Moved TestOptions parsing to TestOptions.cpp
2566
2567         * WebKitTestRunner/TestInvocation.cpp:
2568         (WTR::TestInvocation::createTestSettingsDictionary):
2569         Update to call new TestOptions functions.
2570
2571         * WebKitTestRunner/TestOptions.h:
2572         Reworks TestOptions to be an immutable owner of a TestFeatures struct, which is a set
2573         of maps that map feature string keys, to values of type bool, double, string or string vector.
2574
2575         * WebKitTestRunner/TestOptions.cpp:
2576         (WTR::merge):
2577         Merges two TestFeatures objects. If both contain the same key, the 'additional'
2578         TestFeatures overrides the 'base' TestFeatures.
2579
2580         (WTR::dumpFeatures):
2581         Helper to dump features to stderr, useful for debugging.
2582
2583         (WTR::keyType):
2584         Helper for parser to know which value parser to use.
2585
2586         (WTR::parseBooleanTestHeaderValue):
2587         (WTR::parseStringTestHeaderValueAsRelativePath):
2588         (WTR::parseStringTestHeaderValueAsURL):
2589         Value parsers moved from TestController.cpp
2590
2591         (WTR::parseTestHeader):
2592         Header parser moved from TestController.cpp. Update to now return
2593         a TestFeatures object and use keyType to pick value parser rather
2594         than inlining the if statements.
2595         
2596         (WTR::hardcodedFeaturesBasedOnPathForTest):
2597         Moved from the TestOptions contructor and reworked to return a TestFeatures
2598         object to be merged by the caller.
2599
2600         (WTR::featureDefaultsFromTestHeaderForTest):
2601         Creates a TestFeatures for the test headers of the current test.
2602
2603         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2604         (WTR::TestController::platformSpecificFeatureOverridesDefaultsForTest const):
2605         Reworked to now return a TestFeatures object that will be merged, rather than updating
2606         a TestOptions. Moves enableInAppBrowserPrivacy work to TestController::platformWillRunTest
2607         where it is more appropriate.
2608
2609         (WTR::TestController::platformInitializeDataStore):
2610         (WTR::TestController::platformCreateWebView):
2611         (WTR::TestController::finishCreatingPlatformWebView):
2612         (WTR::TestController::setApplicationBundleIdentifier):
2613         (WTR::TestController::cocoaResetStateToConsistentValues):
2614         (WTR::contentMode):
2615         Update to call new TestOptions functions.
2616
2617         * WebKitTestRunner/ios/TestControllerIOS.mm:
2618         (WTR::TestController::platformResetStateToConsistentValues):
2619         (WTR::TestController::platformConfigureViewForTest):
2620         Update to call new TestOptions functions.
2621         
2622         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2623         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2624         Moved GeneratedTouchesDebugWindow work to TestController::platformConfigureViewForTest
2625         where it is more appropriate and removed shouldShowTouches setting as that is done
2626         globally now. 
2627         
2628         * WebKitTestRunner/mac/PlatformWebViewMac.mm:
2629         (WTR::PlatformWebView::PlatformWebView):
2630         Update to call new TestOptions functions.
2631
2632         * WebKitTestRunner/mac/TestControllerMac.mm:
2633         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2634         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2635         Remove shouldUseRemoteLayerTree and shouldShowWebView, as those are now done globally,
2636         and re-implemented useThreadedScrolling to use boolFeatures.
2637
2638         * WebKitTestRunner/win/TestControllerWin.cpp:
2639         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2640         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2641         Updated for new signature.
2642
2643         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
2644         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2645         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2646         Updated for new signature.
2647
2648         * WebKitTestRunner/gtk/TestControllerGTK.cpp:
2649         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2650         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2651         Updated for new signature.
2652
2653 2020-10-08  Alex Christensen  <achristensen@webkit.org>
2654
2655         REGRESSION (r267763): [ iOS wk2 ] http/tests/in-app-browser-privacy/non-app-bound-domain-does-not-get-app-bound-session.html is a constant failure
2656         https://bugs.webkit.org/show_bug.cgi?id=217386
2657
2658         Reviewed by Brent Fulgham.
2659
2660         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2661         (WTR::TestController::platformAddTestOptions const):
2662         (WTR::TestController::platformInitializeDataStore):
2663         * WebKitTestRunner/ios/TestControllerIOS.mm:
2664         (WTR::TestController::platformResetStateToConsistentValues):
2665
2666 2020-10-08  Jonathan Bedard  <jbedard@apple.com>
2667
2668         [webkitpy] Support custom version information
2669         https://bugs.webkit.org/show_bug.cgi?id=217485
2670         <rdar://problem/70069051>
2671
2672         Rubber-stamped by Aakash Jain.
2673
2674         * Scripts/webkitpy/common/system/platforminfo.py:
2675         (PlatformInfo.__init__):
2676
2677 2020-10-08  Keith Rollin  <krollin@apple.com>
2678
2679         Remove copy-webkitlibraries-to-product-directory
2680         https://bugs.webkit.org/show_bug.cgi?id=217465
2681         <rdar://problem/70082193>
2682
2683         Reviewed by Darin Adler.
2684
2685         This script no longer does anything, so remove it along with the
2686         scaffolding around it that invokes it during the build.
2687
2688         * Scripts/build-jsc:
2689         * Scripts/build-webkit:
2690         * Scripts/copy-webkitlibraries-to-product-directory: Removed.
2691
2692 2020-10-08  Chris Dumez  <cdumez@apple.com>
2693
2694         Crash under WebKit::WebProcessCache::clear()
2695         https://bugs.webkit.org/show_bug.cgi?id=217480
2696
2697         Reviewed by Geoffrey Garen.
2698
2699         Add API test coverage.
2700
2701         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2702
2703 2020-10-08  Sihui Liu  <sihui_liu@apple.com>
2704
2705         Adjust heuristic for checking whether view reaches visually non-empty state
2706         https://bugs.webkit.org/show_bug.cgi?id=217400
2707
2708         Reviewed by Geoffrey Garen.
2709
2710         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2711         * TestWebKitAPI/Tests/WebKit/deferred-script-load-in-empty-document.html: Added.
2712         * TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm:
2713         (-[RenderingProgressNavigationDelegate _webView:renderingProgressDidChange:]):
2714         (TEST):
2715
2716 2020-10-07  Aditya Keerthi  <akeerthi@apple.com>
2717
2718         REGRESSION(r268123): [ iOS ] 4 TestWebKitAPI.WebKitLegacy failures: File name unavailable. Unknown C++ exception thrown in the test body.
2719         https://bugs.webkit.org/show_bug.cgi?id=217445
2720         <rdar://problem/70063370>
2721
2722         Reviewed by Wenson Hsieh.
2723
2724         The patch which introduced these tests swizzled [UIDatePicker setDatePickerMode:]
2725         to avoid a crash within UIKit, resulting from the fact that TestWebKitAPI isn't
2726         actually an app.
2727  
2728         However, this was not a reliable solution since UIKit was still attempting to
2729         create a QoS interval. To fix, swizzle out a method much closer to the source
2730         of the exception: [UITableView cellForRowAtIndexPath:].
2731
2732         * TestWebKitAPI/Tests/WebKitLegacy/ios/DateTimeInputsAccessoryViewTests.mm:
2733         (cellForRowAtIndexPath):
2734         (runTestWithInputType):
2735
2736 2020-10-07  Aakash Jain  <aakash_jain@apple.com>
2737
2738         [build.webkit.org] Ensure that builder names are valid Buildbot identifiers
2739         https://bugs.webkit.org/show_bug.cgi?id=217434
2740
2741         Reviewed by Dewei Zhu.
2742
2743         * BuildSlaveSupport/build.webkit.org-config/config.json: Updated builder names.
2744         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Ditto.
2745         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: Ditto.
2746         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: Ensure that unit-tests fail when any builder name does
2747         not follow required naming convention.
2748
2749 2020-10-07  Jonathan Bedard  <jbedard@apple.com>
2750
2751         REGRESSION (r268080): [test-webkitpy] Mojave bots failing to install python-dateutil-2.8.1
2752         https://bugs.webkit.org/show_bug.cgi?id=217438
2753
2754         Reviewed by Dewei Zhu.
2755
2756         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Include wheel package.
2757         * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
2758         (Package.install): The wheel package may be needed by setup tools.
2759
2760 2020-10-07  Konstantin Tokarev  <annulen@yandex.ru>
2761
2762         [GTK][WPE] Remove Apache's mod_bw from install-dependencies
2763         https://bugs.webkit.org/show_bug.cgi?id=217441
2764
2765         Reviewed by Carlos Alberto Lopez Perez.
2766
2767         It is not activated in any of Apache configs in LayoutTests, and is not
2768         referenced anywhere else.
2769
2770         * gtk/install-dependencies:
2771         * wpe/install-dependencies:
2772
2773 2020-10-07  Karl Rackler  <rackler@apple.com>
2774
2775         Unreviewed, reverting r268115.
2776
2777         This reverts commit r268115 while investigating ews test
2778         failure.
2779
2780         Reverted changeset:
2781
2782         "Refactor TestOptions code in WebKitTestRunner to make it
2783         easier to rationalize and extend"
2784         https://bugs.webkit.org/show_bug.cgi?id=217390
2785         https://trac.webkit.org/changeset/268115
2786
2787 2020-10-07  Basuke Suzuki  <basuke.suzuki@sony.com>
2788
2789         [build-webkit] Compare with cmakeargs and unhandled to detect configuration change
2790         https://bugs.webkit.org/show_bug.cgi?id=207012
2791
2792         Reviewed by Carlos Alberto Lopez Perez.
2793
2794         Added command line arguments on top of @featureArgs for comparison with previous build
2795         options. This forces regeneration of CMakeCache.txt when any configuration is changed.
2796
2797         * Scripts/webkitdirs.pm:
2798         (shouldRemoveCMakeCache):
2799
2800 2020-10-07  Aakash Jain  <aakash_jain@apple.com>
2801
2802         [build.webkit.org] Ensure that invalid step names are not allowed
2803         https://bugs.webkit.org/show_bug.cgi?id=217431
2804
2805         Reviewed by Darin Adler.
2806
2807         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
2808         (loadBuilderConfig):
2809
2810 2020-10-07  Aditya Keerthi  <akeerthi@apple.com>
2811
2812         REGRESSION: Date/time pickers are not displayed in UIWebViews
2813         https://bugs.webkit.org/show_bug.cgi?id=217341
2814         <rdar://problem/66881739>
2815
2816         Reviewed by Wenson Hsieh.
2817
2818         Added regression tests to ensure this preference is not accidently
2819         modified in the future.
2820
2821         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2822         * TestWebKitAPI/Tests/WebKitLegacy/ios/DateTimeInputsAccessoryViewTests.mm: Added.
2823         (-[DateTimeInputsTestsLoadingDelegate webViewDidFinishLoad:]):
2824         (runTestWithInputType):
2825
2826         Note that [UIDatePicker setDatePickerMode:] had to be swizzled to an
2827         empty implementation as the UIKit version on the bots attempts to
2828         create a QoS interval upon setting the initially selected row in
2829         a UITableView when the date picker is presented. This fails because
2830         TestWebKitAPI isn't actually an app. To avoid an exception, the method
2831         is swizzled out.
2832
2833 2020-10-06  Devin Rousso  <drousso@apple.com>
2834
2835         Move platform logic for CSS `hover` and `pointer` media queries outside of WebCore
2836         https://bugs.webkit.org/show_bug.cgi?id=217413
2837
2838         Reviewed by Tim Horton.
2839
2840         * TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:
2841         (iOSMouseSupport.MouseInitiallyDisconnected):
2842         (iOSMouseSupport.MouseInitiallyConnected):
2843         (iOSMouseSupport.MouseLaterDisconnected):
2844         (iOSMouseSupport.MouseLaterConnected):
2845         (iOSMouseSupport.MouseAlwaysConnected):
2846
2847 2020-10-06  Sam Weinig  <weinig@apple.com>
2848
2849         Refactor TestOptions code in WebKitTestRunner to make it easier to rationalize and extend
2850         https://bugs.webkit.org/show_bug.cgi?id=217390
2851
2852         Reviewed by Darin Adler.
2853
2854         Refactors TestOptions code in WebKitTestRunner to make it clear how options coming in at 
2855         different levels are treated and what precedence each has. The order is (from least to most):
2856         
2857         - Global features passed to WebKitTestRunner via the command line (e.g. --show-touches)
2858         - Hardcoded features based on the path of the test being run (hopefully we can remove all soon)
2859         - Hardcoded platform specific defaults (currently only used by macOS for useThreadedScrolling).
2860         - Features from the test headers within the test itself.
2861         - Finally, a second chance for more platform specific defaults (currenly only used the Cocoa ports
2862           for setting enableProcessSwapOnNavigation and enableProcessSwapOnWindowOpen based on NSUserDefaults.)
2863
2864         To make this change work, and pave the way for future autogeneration of some of these test options,
2865         the TestOptions struct (now class) was overhauled. Instead of storing the state itself, TestOptions
2866         is now an immutable owner of a TestFeatures object. TestFeatures is a simple struct that contains maps 
2867         of option keys to values and can be merged with other TestFeatures objects. TestOptions takes a 
2868         TestFeatures at construction, and exposes getters for all keys, as well as defaults for when they are
2869         not in the maps. In future changes, I would like to remove many of these (the ones that correspond
2870         with WebKit preferences anyway) and have the keys and values automatically dealt with by WKPreferences.
2871
2872         * WebKitTestRunner/Options.cpp:
2873         * WebKitTestRunner/Options.h:
2874         Switch to std::unordered_map for consistency and ease of conversion.
2875
2876         * WebKitTestRunner/PlatformWebView.h:
2877         (WTR::PlatformWebView::viewSupportsOptions const):
2878         Update to call new TestOptions functions.
2879
2880         * WebKitTestRunner/StringFunctions.h:
2881         (WTR::toWK):
2882         (WTR::toWTFString):
2883         Add conversions for std::string.
2884
2885         * WebKitTestRunner/TestController.h:
2886         * WebKitTestRunner/TestController.cpp:
2887         (WTR::TestController::initialize):
2888         Replace some bools with a new global TestFeatures instance that forms the base of
2889         all TestFeatures merges.
2890         
2891         (WTR::TestController::generateContextConfiguration const):
2892         (WTR::TestController::generatePageConfiguration):
2893         (WTR::TestController::createWebViewWithOptions):
2894         (WTR::TestController::ensureViewSupportsOptionsForTest):
2895         (WTR::TestController::resetPreferencesToConsistentValues):
2896         (WTR::TestController::resetStateToConsistentValues):
2897         Update to call new TestOptions functions.
2898         
2899         (WTR::TestController::createTestURL):
2900         Expose as a static member function on TestController for use in other files.
2901         
2902         (WTR::TestController::testOptionsForTest const):
2903         Rework to be a sequence of TestFeatures merges.
2904         
2905         (WTR::TestController::updateWebViewSizeForTest):
2906         (WTR::TestController::updateWindowScaleForTest):
2907         Update to call new TestOptions functions.
2908         
2909         (WTR::createTestURL): Deleted.
2910         (WTR::parseBooleanTestHeaderValue): Deleted.
2911         (WTR::parseStringTestHeaderValueAsRelativePath): Deleted.
2912         (WTR::parseStringTestHeaderValueAsURL): Deleted.
2913         (WTR::updateTestOptionsFromTestHeader): Deleted.
2914         (WTR::TestController::platformAddTestOptions const): Deleted.
2915         Moved TestOptions parsing to TestOptions.cpp
2916
2917         * WebKitTestRunner/TestInvocation.cpp:
2918         (WTR::TestInvocation::createTestSettingsDictionary):
2919         Update to call new TestOptions functions.
2920
2921         * WebKitTestRunner/TestOptions.h:
2922         Reworks TestOptions to be an immutable owner of a TestFeatures struct, which is a set
2923         of maps that map feature string keys, to values of type bool, double, string or string vector.
2924
2925         * WebKitTestRunner/TestOptions.cpp:
2926         (WTR::merge):
2927         Merges two TestFeatures objects. If both contain the same key, the 'additional'
2928         TestFeatures overrides the 'base' TestFeatures.
2929
2930         (WTR::dumpFeatures):
2931         Helper to dump features to stderr, useful for debugging.
2932
2933         (WTR::keyType):
2934         Helper for parser to know which value parser to use.
2935
2936         (WTR::parseBooleanTestHeaderValue):
2937         (WTR::parseStringTestHeaderValueAsRelativePath):
2938         (WTR::parseStringTestHeaderValueAsURL):
2939         Value parsers moved from TestController.cpp
2940
2941         (WTR::parseTestHeader):
2942         Header parser moved from TestController.cpp. Update to now return
2943         a TestFeatures object and use keyType to pick value parser rather
2944         than inlining the if statements.
2945         
2946         (WTR::hardcodedFeaturesBasedOnPathForTest):
2947         Moved from the TestOptions contructor and reworked to return a TestFeatures
2948         object to be merged by the caller.
2949
2950         (WTR::featureDefaultsFromTestHeaderForTest):
2951         Creates a TestFeatures for the test headers of the current test.
2952
2953         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
2954         (WTR::TestController::platformSpecificFeatureOverridesDefaultsForTest const):
2955         Reworked to now return a TestFeatures object that will be merged, rather than updating
2956         a TestOptions. Moves enableInAppBrowserPrivacy work to TestController::platformWillRunTest
2957         where it is more appropriate.
2958
2959         (WTR::TestController::platformInitializeDataStore):
2960         (WTR::TestController::platformCreateWebView):
2961         (WTR::TestController::finishCreatingPlatformWebView):
2962         (WTR::TestController::setApplicationBundleIdentifier):
2963         (WTR::TestController::cocoaResetStateToConsistentValues):
2964         (WTR::contentMode):
2965         Update to call new TestOptions functions.
2966
2967         * WebKitTestRunner/ios/TestControllerIOS.mm:
2968         (WTR::TestController::platformResetStateToConsistentValues):
2969         (WTR::TestController::platformConfigureViewForTest):
2970         Update to call new TestOptions functions.
2971         
2972         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2973         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2974         Moved GeneratedTouchesDebugWindow work to TestController::platformConfigureViewForTest
2975         where it is more appropriate and removed shouldShowTouches setting as that is done
2976         globally now. 
2977         
2978         * WebKitTestRunner/mac/PlatformWebViewMac.mm:
2979         (WTR::PlatformWebView::PlatformWebView):
2980         Update to call new TestOptions functions.
2981
2982         * WebKitTestRunner/mac/TestControllerMac.mm:
2983         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2984         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2985         Remove shouldUseRemoteLayerTree and shouldShowWebView, as those are now done globally,
2986         and re-implemented useThreadedScrolling to use boolFeatures.
2987
2988         * WebKitTestRunner/win/TestControllerWin.cpp:
2989         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2990         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2991         Updated for new signature.
2992
2993         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
2994         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
2995         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
2996         Updated for new signature.
2997
2998         * WebKitTestRunner/gtk/TestControllerGTK.cpp:
2999         (WTR::TestController::platformSpecificFeatureDefaultsForTest const):
3000         (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted.
3001         Updated for new signature.
3002
3003 2020-10-06  Sam Weinig  <weinig@apple.com>
3004
3005         <input type="datetime-local"> not show calendar UI when it's inside ShadowDOM
3006         https://bugs.webkit.org/show_bug.cgi?id=216985
3007         <rdar://problem/69660273>
3008
3009         Reviewed by Darin Adler.
3010
3011         * TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp:
3012         (TestWebKitAPI::createDocument):
3013         Update to pass a Settings object to Document::create which is now required.
3014
3015 2020-10-06  Chris Dumez  <cdumez@apple.com>
3016
3017         Reloading a view in its processTerminationHandler does not work reliably when using related views
3018         https://bugs.webkit.org/show_bug.cgi?id=217407
3019
3020         Reviewed by Geoff Garen.
3021
3022         Add API test coverage.
3023
3024         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
3025         (-[NavigationDelegateWithCrashHandlerThatLoadsAgain _webView:webContentProcessDidTerminateWithReason:]):
3026         (-[NavigationDelegateWithCrashHandlerThatLoadsAgain webView:didFinishNavigation:]):
3027         (TEST):
3028
3029 2020-10-06  Devin Rousso  <drousso@apple.com>
3030
3031         CSS hover and "pointer: fine" media queries do not evaluate to true with iOS 13.4 mouse support
3032         https://bugs.webkit.org/show_bug.cgi?id=209292
3033         <rdar://problem/60663124>
3034
3035         Reviewed by Tim Horton.
3036
3037         * TestWebKitAPI/cocoa/TestWKWebView.h:
3038         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3039         (-[TestWKWebView evaluateMediaQuery:]): Added.
3040         Create helper function for synchronously testing media queries.
3041
3042         * TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:
3043         (iOSMouseSupport.MouseInitiallyDisconnected): Added.
3044         (iOSMouseSupport.MouseInitiallyConnected): Added.
3045         (iOSMouseSupport.MouseLaterDisconnected): Added.
3046         (iOSMouseSupport.MouseLaterConnected): Added.
3047         (iOSMouseSupport.MouseAlwaysConnected): Added.
3048
3049 2020-10-06  Jonathan Bedard  <jbedard@apple.com>
3050
3051         [webkitscmpy] Generate Commit object from local repository
3052         https://bugs.webkit.org/show_bug.cgi?id=216404
3053         <rdar://problem/68702897>
3054
3055         Reviewed by Dewei Zhu.
3056
3057         * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version.
3058         * Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py:
3059         (Memoize.__call__.decorator): Handle case where function arguments are different.
3060         * Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py:
3061         (PopenBase.poll): Reset stdout and stderr after calling the completion handler.
3062         * Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py:
3063         (TestMemoize.test_conflicting_args):
3064         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version.
3065         * Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
3066         (Contributor): Number of lines may be singular.
3067         * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
3068         (Git):
3069         (Git.__init__): Caller may wish to specify the patterns for production and development branches.
3070         (Git.branches): Call the more general _branches_for to unify remote stripping logic.
3071         (Git._commit_count): Given a parameter (hash, branch, difference between default branch and commit), compute
3072         the number of commits.
3073         (Git._branches_for): Given a hash, return all branches the commit is part of.
3074         (Git.commit): Construct a commit given a commit hash, revision, identifier or branch.
3075         * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
3076         (Scm):
3077         (Scm.__init__): Caller may wish to specify the patterns for production and development branches.
3078         (Scm.commit): Construct a commit given a commit hash, revision, identifier or branch.
3079         (Scm.prioritize_branches): Given a set of branches, pick the highest priority one.
3080         (Scm.log): Log error to a configured logger or stderr.
3081         * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
3082         (Svn):
3083         (Svn.__init__): Caller may wish to specify the patterns for production and development branches.
3084         (Svn.info): Allow info for a specific commit to be queried.
3085         (Svn._cache_path): Path to json cache of branch-commit mapping.
3086         (Svn._cache_revisions): Query the remote for a specific branch to get the list of all commits on that branch.
3087         (Svn._commit_count): Given a revision or branch, compute the number of commits.
3088         (Svn._branch_for): Given a revision, use local data to determine the most likely branch before asking the remote which branch
3089         a commit is on.
3090         (Svn.commit): Construct a commit given a commit hash, revision, identifier or branch.
3091         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
3092         (Git): Add commands needed to construct an identifier, add mock commits.
3093         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:
3094         (Svn): Add commands needed to construct an identifier, add mock commits.
3095         * Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:
3096         (TestContributor.test_short_svn_log):
3097         * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
3098         (TestGit):
3099         * Scripts/libraries/webkitscmpy/webkitscmpy/test/scm_unittest.py:
3100         (TestScm.test_remote):
3101         (TestScm):
3102         * Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
3103         (TestSvn):
3104
3105 2020-10-06  Aakash Jain  <aakash_jain@apple.com>
3106
3107         [build.webkit.org] Ensure that steps names are valid Buildbot identifiers
3108         https://bugs.webkit.org/show_bug.cgi?id=217394
3109
3110         Reviewed by Jonathan Bedard.
3111
3112         * BuildSlaveSupport/build.webkit.org-config/steps.py: Removed spaces from step names.
3113         (ConfigureBuild):
3114         (KillOldProcesses):
3115         (CleanBuildIfScheduled):
3116         (DeleteStaleBuildFiles):
3117         (RunGLibAPITests):
3118         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Updated unit-tests.
3119         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
3120
3121 2020-10-06  Philippe Normand  <pnormand@igalia.com>
3122
3123         run-minibrowser not compatible with python3
3124         https://bugs.webkit.org/show_bug.cgi?id=217368
3125
3126         Reviewed by Adrian Perez de Castro.
3127
3128         * Scripts/webkitpy/minibrowser/run_webkit_app.py: Use webkitcorepy's unicode().
3129
3130 2020-10-06  Adrian Perez de Castro  <aperez@igalia.com>
3131
3132         REGRESSION(r267399): [WPE] Build broken with ENABLE_ACCESSIBILITY=OFF
3133         https://bugs.webkit.org/show_bug.cgi?id=217380
3134
3135         Reviewed by Philippe Normand.
3136
3137         Before the ATK::Bridge target got introduced in r267399 a couple of CMake variables were
3138         used, which were empty when the accessility support was disabled and nothing was being
3139         added to the WebKit and WPEToolingBackends targets. Now that an imported target is used
3140         it is needed to add it as a dependency conditionally to avoid using an undefined target
3141         name.
3142
3143         * wpe/backends/CMakeLists.txt: Use the ATK::Bridge target only when ENABLE_ACCESSIBILITY is set.
3144
3145 2020-10-05  Aditya Keerthi  <akeerthi@apple.com>
3146
3147         Unreviewed. Update my primary email address.
3148
3149         * Scripts/webkitpy/common/config/contributors.json:
3150
3151 2020-10-05  Eric Carlson  <eric.carlson@apple.com>
3152
3153         Disable media capture if an app's entitlements won't allow access to capture devices
3154         https://bugs.webkit.org/show_bug.cgi?id=217319
3155         <rdar://problem/69956112>
3156
3157         Unreviewed, address post-review comments.
3158
3159         * MiniBrowser/mac/Info.plist: Update media capture usage strings.
3160         * MobileMiniBrowser/MobileMiniBrowser/Info.plist: Ditto.
3161
3162 2020-10-05  Eric Carlson  <eric.carlson@apple.com>
3163
3164         Disable media capture if an app's entitlements won't allow access to capture devices
3165         https://bugs.webkit.org/show_bug.cgi?id=217319
3166         <rdar://problem/69956112>
3167
3168         Reviewed by Youenn Fablet.
3169
3170         * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
3171         * MiniBrowser/mac/AppDelegate.m:
3172         (-[BrowserAppDelegate defaultConfiguration]): Don't set configuration._mediaCaptureEnabled,
3173         it should no longer be necessary.
3174
3175         * MiniBrowser/mac/Info.plist: Remove unneeded keys.
3176
3177         * MobileMiniBrowser/MobileMiniBrowser/Info.plist: Ditto. Add usage strings.
3178
3179 2020-10-05  Aditya Keerthi  <akeerthi@apple.com>
3180
3181         [Contact Picker API] Introduce bindings for the Contact Picker API
3182         https://bugs.webkit.org/show_bug.cgi?id=216793
3183         <rdar://problem/69317957>
3184
3185         Reviewed by Wenson Hsieh.
3186
3187         Added plumbing to support the associated experimental test option.
3188
3189         * DumpRenderTree/TestOptions.cpp:
3190         (TestOptions::TestOptions):
3191         * DumpRenderTree/TestOptions.h:
3192         * DumpRenderTree/mac/DumpRenderTree.mm:
3193         (setWebPreferencesForTestOptions):
3194         * DumpRenderTree/win/DumpRenderTree.cpp:
3195         (setWebPreferencesForTestOptions):
3196
3197 2020-10-05  Sam Weinig  <weinig@apple.com>
3198
3199         Remove support for enabling subpixel CSSOM values, it's off by default everywhere and known to be not-compatible with the web
3200         https://bugs.webkit.org/show_bug.cgi?id=217300
3201
3202         Reviewed by Simon Fraser.
3203
3204         Remove support in MiniBrowser for toggling support for subpixel CSSOM values since it
3205         is no longer supported in WebCore.
3206
3207         * MiniBrowser/mac/SettingsController.h:
3208         * MiniBrowser/mac/SettingsController.m:
3209         (-[SettingsController _populateMenu]):
3210         (-[SettingsController validateMenuItem:]):
3211         (-[SettingsController toggleEnableSubPixelCSSOMMetrics:]): Deleted.
3212         (-[SettingsController subPixelCSSOMMetricsEnabled]): Deleted.
3213         * MiniBrowser/mac/WK1BrowserWindowController.m:
3214         (-[WK1BrowserWindowController didChangeSettings]):
3215
3216 2020-10-05  Alex Christensen  <achristensen@webkit.org>
3217
3218         Unify linkedOnOrAfter duplicate code and use SPI/WebCoreTestSupport instead of NSUserDefaults
3219         https://bugs.webkit.org/show_bug.cgi?id=217239
3220
3221         Reviewed by Darin Adler.
3222
3223         * DumpRenderTree/mac/DumpRenderTree.mm:
3224         (setDefaultsToConsistentValuesForTesting):
3225         (DumpRenderTreeMain):
3226         * MiniBrowser/mac/main.m:
3227         (main):
3228         * MobileMiniBrowser/MobileMiniBrowser/main.m:
3229         (main):
3230         * TestWebKitAPI/Configurations/TestWTF.xcconfig:
3231         * TestWebKitAPI/ios/mainIOS.mm:
3232         (main):
3233         * TestWebKitAPI/mac/mainMac.mm:
3234         (main):
3235         * WebKitTestRunner/ios/mainIOS.mm:
3236         (main):
3237         * WebKitTestRunner/mac/main.mm:
3238         (setDefaultsToConsistentValuesForTesting):
3239         (main):
3240
3241 2020-10-05  Alex Christensen  <achristensen@webkit.org>
3242
3243         Fix UTF-8 encoding in URL parsing
3244         https://bugs.webkit.org/show_bug.cgi?id=217289
3245
3246         Reviewed by Darin Adler.
3247
3248         * TestWebKitAPI/Tests/WTF/URLParser.cpp:
3249         (TestWebKitAPI::TEST_F):
3250
3251 2020-10-05  Rob Buis  <rbuis@igalia.com>
3252
3253         MIME type parser should skip trailing HTTP whitespace
3254         https://bugs.webkit.org/show_bug.cgi?id=217179
3255
3256         Reviewed by Darin Adler.
3257
3258         Add unit tests for trailing HTTP whitespace.
3259
3260         * TestWebKitAPI/Tests/WebCore/ParsedContentType.cpp:
3261         (TestWebKitAPI::TEST):
3262
3263 2020-10-04  Brian Burg  <bburg@apple.com>
3264
3265         [Cocoa] Add WKUIDelegate SPI to inform clients when a _WKInspector is about to close
3266         https://bugs.webkit.org/show_bug.cgi?id=217233
3267
3268         Reviewed by Timothy Hatcher and Devin Rousso.
3269
3270         Add new test case for -_webView:willCloseLocalInspector:.
3271
3272         * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:
3273         (-[InspectorDelegate inspectorDidEnableBrowserDomain:]):
3274         (-[UIDelegate _webView:didAttachLocalInspector:]):
3275         (-[UIDelegate _webView:willCloseLocalInspector:]):
3276         (TEST):
3277         Clean up how the other test case works so we don't call close from
3278         inside a delegate callback. Let's keep our tests structured the same way.
3279
3280 2020-10-04  Ryan Hostetler  <rhost@apple.com>
3281
3282         Submission failure with "make: *** No rule to make target `installsrc'. Stop"
3283         https://bugs.webkit.org/show_bug.cgi?id=214696
3284         <rdar://problem/62268104>
3285
3286         Reviewed by Darin Adler.
3287
3288         Add support for XBS single base project build for WebKit repository.
3289         This change allows internal tools to submit and build from the repository root in a single step.
3290
3291         * Makefile:
3292         Tools does not need to be submitted, so we stub out the installsrc phase.
3293
3294 2020-10-03  Alex Christensen  <achristensen@webkit.org>
3295
3296         Add extra slash after empty host copied from base URL if path is also empty
3297         https://bugs.webkit.org/show_bug.cgi?id=217278
3298
3299         Reviewed by Darin Adler.
3300
3301         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
3302
3303 2020-10-03  Alex Christensen  <achristensen@webkit.org>
3304
3305         "http:" should not be a valid URL
3306         https://bugs.webkit.org/show_bug.cgi?id=217250
3307
3308         Reviewed by Brady Eidson.
3309
3310         * TestWebKitAPI/Tests/WTF/URLParser.cpp:
3311         (TestWebKitAPI::TEST_F):
3312
3313 2020-10-03  Aditya Keerthi  <akeerthi@apple.com>
3314
3315         [macOS] Enable date, time, and datetime-local input types
3316         https://bugs.webkit.org/show_bug.cgi?id=217229
3317         <rdar://problem/69882757>
3318
3319         Reviewed by Sam Weinig.
3320
3321         Update test expectations now that these input types no longer fallback
3322         to text fields. Also removed the test for input type=datetime, as it
3323         has been removed from the spec.
3324
3325         * TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsTextField.mm:
3326         (-[InjectedBundleNodeHandleIsTextField webProcessPlugIn:didCreateBrowserContextController:]):
3327
3328 2020-10-02  Yusuke Suzuki  <ysuzuki@apple.com>
3329
3330         std::once_flag must be allocated in static storage
3331         https://bugs.webkit.org/show_bug.cgi?id=217271
3332
3333         Reviewed by Mark Lam.
3334
3335         Added cpplint rule for non-static std::once_flag / dispatch_once_t.
3336
3337         * Scripts/webkitpy/style/checkers/cpp.py:
3338         (check_once_flag):
3339         (check_style):
3340         (CppChecker):
3341         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
3342         (WebKitStyleTest.test_once_flag):
3343
3344 2020-10-02  Kate Cheney  <katherine_cheney@apple.com>
3345
3346         Multiple calls to suspend media playback for the same page may result in resuming media playback too soon
3347         https://bugs.webkit.org/show_bug.cgi?id=217228
3348         rdar://problem/69709346
3349
3350         Reviewed by Eric Carlson.
3351
3352         Add API test coverage. Fix the existing SuspendResumeAllMediaPlayback
3353         test which had a small JavaScript bug, and was missing a call to
3354         TestWebKitAPI::Util::run(&didReject) which allowed the bug to go
3355         unnoticed.
3356
3357         * TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm:
3358         (TestWebKitAPI::TEST):
3359
3360 2020-10-02  Jonathan Bedard  <jbedard@apple.com>
3361
3362         [webkitscmpy] Remove "i" from canonical identifier
3363         https://bugs.webkit.org/show_bug.cgi?id=217238
3364         <rdar://problem/69888017>
3365
3366         Reviewed by Dewei Zhu.
3367
3368         * Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:
3369         (Commit):
3370         (Commit.pretty_print): Remove "i" from canonical identifier, add branch point.
3371         (Commit.__repr__): Remove "i" from canonical identifier.
3372         * Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py:
3373         (TestCommit.test_parse_revision):
3374         (TestCommit.test_parse_identifier):
3375         (TestCommit.test_parse):
3376         (TestCommit.test_pretty_print):
3377
3378 2020-10-02  Philippe Normand  <pnormand@igalia.com>
3379
3380         [CMake] unused variable warning spam in UIScriptController.h
3381         https://bugs.webkit.org/show_bug.cgi?id=217176
3382
3383         Reviewed by Adrian Perez de Castro.
3384
3385         * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
3386         (_generateImplementationFile): Generate macros for unused variables.
3387         * TestRunnerShared/UIScriptContext/UIScriptController.h: Remove unused variable names declarations.
3388         (WTR::UIScriptController::doAsyncTask):
3389         (WTR::UIScriptController::ensurePositionInformationIsUpToDateAt):
3390         (WTR::UIScriptController::overridePreference):
3391         (WTR::UIScriptController::zoomToScale):
3392         (WTR::UIScriptController::immediateZoomToScale):
3393         (WTR::UIScriptController::setSafeAreaInsets):
3394         (WTR::UIScriptController::propertiesOfLayerWithID const):
3395         (WTR::UIScriptController::scrollToOffset):
3396         (WTR::UIScriptController::immediateScrollToOffset):
3397         (WTR::UIScriptController::immediateScrollElementAtContentPointToOffset):
3398         (WTR::UIScriptController::touchDownAtPoint):
3399         (WTR::UIScriptController::liftUpAtPoint):
3400         (WTR::UIScriptController::singleTapAtPoint):
3401         (WTR::UIScriptController::singleTapAtPointWithModifiers):
3402         (WTR::UIScriptController::twoFingerSingleTapAtPoint):
3403         (WTR::UIScriptController::doubleTapAtPoint):
3404         (WTR::UIScriptController::dragFromPointToPoint):
3405         (WTR::UIScriptController::longPressAtPoint):
3406         (WTR::UIScriptController::activateAtPoint):
3407         (WTR::UIScriptController::typeCharacterUsingHardwareKeyboard):
3408         (WTR::UIScriptController::keyDown):
3409         (WTR::UIScriptController::toggleCapsLock):
3410         (WTR::UIScriptController::applyAutocorrection):
3411         (WTR::UIScriptController::replaceTextAtRange):
3412         (WTR::UIScriptController::stylusDownAtPoint):
3413         (WTR::UIScriptController::stylusMoveToPoint):
3414         (WTR::UIScriptController::stylusUpAtPoint):
3415         (WTR::UIScriptController::stylusTapAtPoint):
3416         (WTR::UIScriptController::stylusTapAtPointWithModifiers):
3417         (WTR::UIScriptController::sendEventStream):
3418         (WTR::UIScriptController::playBackEventStream):
3419         (WTR::UIScriptController::dismissFilePicker):
3420         (WTR::UIScriptController::setTimePickerValue):
3421         (WTR::UIScriptController::setDefaultCalendarType):
3422         (WTR::UIScriptController::findString):
3423         (WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):
3424         (WTR::UIScriptController::beginBackSwipe):
3425         (WTR::UIScriptController::completeBackSwipe):
3426         (WTR::UIScriptController::rectForMenuAction const):
3427         (WTR::UIScriptController::attachmentInfo):
3428         (WTR::UIScriptController::insertAttachmentForFilePath):
3429
3430 2020-10-02  Jonathan Bedard  <jbedard@apple.com>
3431
3432         Update my information in contributors.json
3433
3434         Unreviewed.
3435
3436         * Scripts/webkitpy/common/config/contributors.json:
3437
3438 2020-10-02  Sam Weinig  <weinig@apple.com>
3439
3440         Remove code behind ENABLE(MEDIA_SESSION), no ports enable it
3441         https://bugs.webkit.org/show_bug.cgi?id=216831
3442
3443         Reviewed by Alex Christensen.
3444
3445         * Scripts/webkitperl/FeatureList.pm:
3446         Remove support for building with MEDIA_SESSION enabled.
3447
3448         * WebKitTestRunner/TestController.cpp:
3449         (WTR::TestController::createOtherPage):
3450         (WTR::TestController::createWebViewWithOptions):
3451         Update names to new 'unused' naming.
3452
3453 2020-10-02  Karl Rackler  <rackler@apple.com>
3454
3455         Unreviewed, reverting r267796.
3456
3457         This change is breaking the build on AzulE debug bots.
3458
3459         Reverted changeset:
3460
3461         "Remove code behind ENABLE(MEDIA_SESSION), no ports enable it"
3462         https://bugs.webkit.org/show_bug.cgi?id=216831
3463         https://trac.webkit.org/changeset/267796
3464
3465 2020-10-02  Andres Gonzalez  <andresg_22@apple.com>
3466
3467         Layout Test accessibility/mac/html5-input-number.html is flaky.
3468         https://bugs.webkit.org/show_bug.cgi?id=180560
3469         <rdar://problem/36029379>
3470
3471         Reviewed by Chris Fleizach.
3472
3473         Dispatch the computation of the role and subrole to secondary AX thread in isolated tree mode = 2.
3474
3475         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
3476         (WTR::AccessibilityUIElement::role):
3477         (WTR::AccessibilityUIElement::subrole):
3478
3479 2020-10-02  Philippe Normand  <pnormand@igalia.com>
3480
3481         [GTK] Fix MiniBrowser compilation warnings
3482         https://bugs.webkit.org/show_bug.cgi?id=217208
3483
3484         Reviewed by Carlos Garcia Campos.
3485
3486         webkit_web_context_set_network_proxy_settings() is deprecated in favor of
3487         webkit_website_data_manager_set_network_proxy_settings().
3488         webkit_web_context_set_tls_errors_policy() is deprecated in favor of
3489         webkit_website_data_manager_set_tls_errors_policy().
3490
3491         * MiniBrowser/gtk/main.c:
3492         (activate):
3493         * MiniBrowser/wpe/main.cpp:
3494         (main):
3495
3496 2020-10-02  Kimmo Kinnunen  <kkinnunen@apple.com>
3497
3498         [iOS WK1] Crashes when using ANGLE WebGL from another thread
3499         https://bugs.webkit.org/show_bug.cgi?id=216106
3500         <rdar://problem/68602452>
3501
3502         Reviewed by Kenneth Russell.
3503
3504         Add a WK1 test which runs WebGL code both in
3505         client main thread and in web thread.
3506         This tests the case where ANGLE EGL context is
3507         not being held current in one thread while the
3508         other thread runs WebGL and thus ANGLE EGL code.
3509
3510         * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
3511         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3512         * TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLNoCrashOnOtherThreadAccess.mm: Added.
3513         (-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webViewDidFinishLoad:]):
3514         (-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]):
3515         (TestWebKitAPI::TEST):
3516
3517 2020-10-01  Aakash Jain  <aakash_jain@apple.com>
3518
3519         Limit number of tests to log in case of large number of API test failures
3520         https://bugs.webkit.org/show_bug.cgi?id=217181
3521
3522         Reviewed by Jonathan Bedard.
3523
3524         * BuildSlaveSupport/ews-build/steps.py:
3525         (AnalyzeAPITestsResults.analyzeResults):
3526
3527 2020-10-01  Chris Dumez  <cdumez@apple.com>
3528
3529         [DRT] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/active-processing.https.html is flaky
3530         https://bugs.webkit.org/show_bug.cgi?id=217187
3531
3532         Reviewed by Eric Carlson.
3533
3534         The test sometimes fails with DRT only because window.AudioWorkletNode does not exist. The thing is that
3535         window.AudioWorkletNode only exists in secure contexts. DumpRenderTree::resetWebViewToConsistentState()
3536         was calling [WebFrame globalContext] before each test, which would eagerly create the Window JS wrapper
3537         if it did not exist yet. Because the wrapper would get created too early, its security origin upon
3538         creation was null and we would decide NOT to expose window.AudioWorkletNode.
3539
3540         To address the issue, I updated DumpRenderTree::resetWebViewToConsistentState() to only call
3541         `WebCoreTestSupport::resetInternalsObject([mainFrame globalContext])` after each test, instead of doing
3542         it both before AND after. This new behavior is also more consistent with WebKitTestRunner.
3543
3544         * DumpRenderTree/mac/DumpRenderTree.mm:
3545         (resetWebViewToConsistentState):
3546         (runTest):
3547
3548 2020-10-01  Jonathan Bedard  <jbedard@apple.com>
3549
3550         [webkitscmpy] Support git-svn committers
3551         https://bugs.webkit.org/show_bug.cgi?id=217151
3552         <rdar://problem/69812996>
3553
3554         Rubber-stamped by Aakash Jain.
3555
3556         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version number.
3557         * Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
3558         (Contributor):
3559         (Contributor.from_scm_log): Handle case where a commit does not contain an author.
3560         * Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:
3561         (TestContributor):
3562         (TestContributor.test_git_no_author):
3563         (TestContributor.test_git_svn_no_author):
3564
3565 2020-10-01  Aakash Jain  <aakash_jain@apple.com>
3566
3567         [build.webkit.org] Rename type to factory in config.json
3568         https://bugs.webkit.org/show_bug.cgi?id=217127
3569
3570         Reviewed by Jonathan Bedard.
3571
3572         * BuildSlaveSupport/build.webkit.org-config/config.json:
3573         * BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
3574         (loadBuilderConfig):
3575         * BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py:
3576
3577 2020-10-01  Eric Carlson  <eric.carlson@apple.com>
3578
3579         Prevent media capture unless the application has correct data for system permission prompt
3580         https://bugs.webkit.org/show_bug.cgi?id=217104
3581         <rdar://problem/69761929>
3582
3583         Reviewed by Darin Adler.
3584
3585         * MiniBrowser/mac/Info.plist: Add necessary entitlements and usage strings.
3586
3587         * MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m:
3588         (-[WebViewController createWebView]): Setting the private capture preference is
3589         not necessary because we set configuration._mediaCaptureEnabled.
3590
3591 2020-10-01  Alex Christensen  <achristensen@webkit.org>
3592
3593         Non-special URLs are not idempotent
3594         https://bugs.webkit.org/show_bug.cgi?id=215762
3595
3596         Reviewed by Tim Horton.
3597
3598         * TestWebKitAPI/Tests/WTF/URLParser.cpp:
3599         (TestWebKitAPI::TEST_F):
3600
3601 2020-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3602
3603         Unreviewed. Update W3C WebDriver imported tests.
3604
3605         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
3606         (WebKitDriverProtocol):
3607         (WebDriverW3CExecutor.__init__):
3608         (WebDriverW3CExecutor.setup):
3609
3610 2020-10-01  Philippe Normand  <pnormand@igalia.com>
3611
3612         [Flatpak] Nightly runner requires user interaction
3613         https://bugs.webkit.org/show_bug.cgi?id=217092
3614
3615         Reviewed by Carlos Alberto Lopez Perez.
3616
3617         * Scripts/webkit-flatpak-run-nightly: The most recent version is 0.3 currently, this is the
3618         branch that should be installed. At some point we could add a new option to override this
3619         though.
3620
3621 2020-09-30  Jonathan Bedard  <jbedard@apple.com>
3622
3623         [webkitscmpy] Add Commit object
3624         https://bugs.webkit.org/show_bug.cgi?id=216403
3625         <rdar://problem/68702779>
3626
3627         Reviewed by Dewei Zhu.
3628
3629         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version number.
3630         * Scripts/libraries/webkitscmpy/webkitscmpy/commit.py: Added.
3631         (Commit):
3632         (Commit._parse_hash): Given a hash, verify that the provided argument is
3633         Actually a git hash.
3634         (Commit._parse_revision): Given a string or integer, verify the provided
3635         argument is a valid SVN revision and return the revision as an integer.
3636         (Commit._parse_identifier): Given a string or integer, verify the provided
3637         argument is a valid identifier and return the identifier and branch.
3638         (Commit.parse): Given a string representing a commit hash, svn revision or
3639         identifier, return a commit object.
3640         (Commit.__init__):
3641         (Commit.pretty_print): Return a long string displaying the metadata for the commit
3642         (Commit.__repr__): Return a one-line representation of the commit.
3643         (Commit.__hash__):
3644         (Commit.__cmp__): Compare two commit objects.
3645         * Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py: Added.
3646         (TestCommit):
3647         (TestCommit.test_parse_hash):
3648         (TestCommit.test_parse_revision):
3649         (TestCommit.test_parse_identifier):
3650         (TestCommit.test_parse):
3651         (TestCommit.test_pretty_print):
3652
3653 2020-09-30  Jonathan Bedard  <jbedard@apple.com>
3654
3655         [webkitscmpy] Check if a git checkout is linked to an SVN checkout
3656         https://bugs.webkit.org/show_bug.cgi?id=216888
3657         <rdar://problem/69446322>
3658
3659         Reviewed by Dewei Zhu.
3660
3661         * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Increment library version.
3662         * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
3663         (Git.info): Run `git svn info` if in a Git-SVN checkout.
3664         (Git.is_svn): Check if in a Git-SVN checkout.
3665         (Git.is_git): Return True.
3666         * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
3667         (Scm.is_svn): Return False.
3668         (Scm.is_git): Ditto.
3669         * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
3670         (Svn.is_svn): Return True.
3671         * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
3672         (Git.__init__): Add `git svn` commands.
3673         * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
3674         (TestGit.test_scm_type):
3675         (TestGit.test_info):
3676         * Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
3677         (TestSvn.test_scm_type):
3678
3679 2020-09-30  Jonathan Bedard  <jbedard@apple.com>
3680
3681         [webkitpy] Use webkitcorepy's auto installer for html5lib
3682         https://bugs.webkit.org/show_bug.cgi?id=217130
3683         <rdar://problem/69798724>
3684
3685         Rubber-stamped by Aakash Jain.
3686
3687         * Scripts/webkitpy/__init__.py: Add html5lib, webencodings and genshi.
3688         * Scripts/webkitpy/thirdparty/__init__.py:
3689         (AutoinstallImportHook.find_module): Remove html5lib.
3690         (AutoinstallImportHook._install_mechanize):Ditto.
3691         (AutoinstallImportHook._install_beautifulsoup): Ditto.
3692         (AutoinstallImportHook._install_html5lib): Deleted.
3693
3694 2020-09-30  Sam Weinig  <weinig@apple.com>
3695
3696         Remove code behind ENABLE(MEDIA_SESSION), no ports enable it
3697         https://bugs.webkit.org/show_bug.cgi?id=216831
3698
3699         Reviewed by Alex Christensen.
3700
3701         * Scripts/webkitperl/FeatureList.pm:
3702         Remove support for building with MEDIA_SESSION enabled.
3703
3704         * WebKitTestRunner/TestController.cpp:
3705         (WTR::TestController::createOtherPage):
3706         (WTR::TestController::createWebViewWithOptions):
3707         Update names to new 'unused' naming.
3708
3709 2020-09-30  Philippe Normand  <pnormand@igalia.com>
3710
3711         [GStreamer] Internal audio rendering support
3712         https://bugs.webkit.org/show_bug.cgi?id=207634
3713
3714         Reviewed by Xabier Rodriguez-Calvar.
3715
3716         * Scripts/webkitpy/style/checker.py: White-list the new audio sink from the style checker.
3717         * TestWebKitAPI/Tests/WebKit/file-with-video.html: New utility functions to pause and seek in the video.
3718         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: WPE test for external audio
3719         rendering support. A video file is loaded through the webview and the test receives
3720         notifications during playback. In order to reduce timeout risks, a seek near the end of the
3721         video is performed early on.
3722         (AudioRenderingWebViewTest::setup):
3723         (AudioRenderingWebViewTest::teardown):
3724         (AudioRenderingWebViewTest::AudioRenderingWebViewTest):
3725         (AudioRenderingWebViewTest::handleStart):
3726         (AudioRenderingWebViewTest::handleStop):
3727         (AudioRenderingWebViewTest::handlePause):
3728         (AudioRenderingWebViewTest::handleResume):
3729         (AudioRenderingWebViewTest::handlePacket):
3730         (AudioRenderingWebViewTest::waitUntilPaused):
3731         (AudioRenderingWebViewTest::waitUntilEOS):
3732         (AudioRenderingWebViewTest::state const):
3733         (beforeAll):
3734
3735 2020-09-30  Philippe Normand  <pnormand@igalia.com>
3736
3737         [Flatpak SDK] Bump libwpe and wpebackend-fdo
3738         https://bugs.webkit.org/show_bug.cgi?id=217122
3739
3740         Reviewed by Carlos Garcia Campos.
3741
3742         * buildstream/elements/sdk/libwpe.bst: Bump to 1.8.0 and switch to Meson build system.
3743         * buildstream/elements/sdk/wpebackend-fdo.bst: Bump to 1.9.0 development version and switch
3744         to Meson build system.
3745
3746 2020-09-30  Nikolas Zimmermann  <nzimmermann@igalia.com>
3747
3748         Fix assertion in linux_get_crash_log.py using Python 2.7
3749         https://bugs.webkit.org/show_bug.cgi?id=217121
3750
3751         Reviewed by Philippe Normand.
3752
3753         Fix assertion in linux_get_crash_log.py using Python 2.7:
3754         worker/6: UnicodeEncodeError(''ascii' codec can't encode character u'\u201c' in position 85: ordinal not in range(128)') raised:
3755
3756         Encode data as utf-8 before passing on to communicate(). 
3757
3758         * Scripts/webkitpy/port/linux_get_crash_log.py:
3759         (GDBCrashLogGenerator.generate_crash_log):
3760
3761 2020-09-29  Andres Gonzalez  <andresg_22@apple.com>
3762
3763         Modify END_AX_OBJC_EXCEPTIONS macro to assert to aid debugging of layout tests.
3764         https://bugs.webkit.org/show_bug.cgi?id=217096
3765
3766         Reviewed by Chris Fleizach.
3767
3768         ASSERT_NOT_REACHED on thrown exceptions. This will tell us immediately
3769         the location of a failure instead of silently swallowing the exception
3770         and posibly causing a hang/timeout much harder to find after the fact.
3771
3772         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
3773
3774 2020-09-29  Jonathan Bedard  <jbedard@apple.com>
3775
3776         [watchOS] AVKitSPI build fixes
3777         https://bugs.webkit.org/show_bug.cgi?id=217070
3778         <rdar://problem/69724883>
3779
3780         Rubber-stamped by Eric Carlson.
3781
3782         * Scripts/configure-xcode-for-embedded-development: Copy AVKit headers for watchOS.
3783
3784 2020-09-29  Alex Christensen  <achristensen@webkit.org>
3785
3786         Move NetworkProcessProxy ownership from WebProcessPool to WebsiteDataStore
3787         https://bugs.webkit.org/show_bug.cgi?id=216041
3788
3789         Reviewed by Brady Eidson.
3790
3791         Most changes to tests are just calling a function on the WKWebsiteDataStore instead of the WKProcessPool
3792         because we want to do something with the network process and it has a new owner.
3793         Exceptions are noted inline.
3794
3795         * TestWebKitAPI/Tests/WebKit/NetworkProcessCrashWithPendingConnection.mm:
3796         (TestWebKitAPI::TEST):
3797         * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
3798         (TestWebKitAPI::downloadAtRate):
3799         * TestWebKitAPI/Tests/WebKitCocoa/IDBCheckpointWAL.mm:
3800         (TEST):
3801         * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
3802         (TEST):
3803         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
3804         (TEST):
3805         * TestWebKitAPI/Tests/WebKitCocoa/IDBObjectStoreInfoUpgradeToV2.mm:
3806         (TEST):
3807         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
3808         (TEST):
3809         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
3810         (TEST):
3811         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
3812         (TEST):
3813         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm:
3814         (TEST):
3815         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm:
3816         (TEST):
3817         * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
3818         (TEST):
3819         * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
3820         (TEST):
3821         * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm:
3822         (checkRecoveryAfterCrash):
3823         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3824         * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
3825         (TEST):
3826         This test was making a WKWebsiteDataStore, getting its resource load statistics directory,
3827         putting things in that directory, then starting the network process and making sure everything
3828         works when initializing the network process.  Now, network process initialization happens when a
3829         WKWebsiteDataStore is instantiated, so we need to put things there before instantiating a WKWebsiteDataStore.
3830         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3831         Before this change, each WKProcessPool had its own network process, which holds the service worker registry
3832         for the WebsiteDataStores used with that process pool.  Now, the network process still needs to have a service
3833         worker registry in it, but when we receive a message from it looking for a web process to run the service
3834         worker, we go arbitrarily to the first process pool that has a process we can use.  This logic is in 
3835         WebProcessPool::establishWorkerContextConnectionToNetworkProcess.  Because we use the first process pool each
3836         time, setting the custom user agent to two different things in two different process pools causes only one
3837         to be used.  This is not a problem in practice, though, because the only application that uses the SPI to
3838         set a service worker's custom user agent is Safari, which only has one process pool.  This test still verifies
3839         that a user ageint is correctly sent.
3840         Similarly, the tests that count service worker processes either have different results or need to be run with
3841         one process pool per parent process.  To keep the results the same, I separated the tests into different
3842         TEST(ServiceWorkers, ...) macros which are run in separate parent processes.
3843         The test RestoreFromDiskNonDefaultStore needs to use the same data store for both WKWebViews now because otherwise
3844         there was a race condition in the startup of a new network process that wasn't there before because we were using the
3845         same process pool and therefore the same network process.  I added spinning the run loop and sleeping to be able to
3846         reproduce the race condition failure and I use the same WKWebsiteDataStore to use the same network process, which was
3847         the intent of using the same WKProcessPool before.  The test still tests that the registration is re-used when we are
3848         not using the default data store.
3849         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
3850         * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
3851         (-[CheckSessionCookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
3852         (-[CheckSessionCookieUIDelegate waitForMessage]):
3853         (-[CheckSessionCookieUIDelegate alertCookieHTML]):
3854         (TEST):
3855         This is the whole point of me doing this.
3856         I took a test that was flaky only on iOS (because of different NSHTTPCookieStorage syncing behavior) and made
3857         it flaky nowhere (fingers crossed!) and added a test that correctly handles session cookies like we could not
3858         before this change.
3859         I also re-used some test infrastructure and made it stop using process-global static variables for test state.
3860         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm:
3861         (TEST):
3862         * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
3863         (runWebsiteDataStoreCustomPaths):
3864         (TEST):
3865         * TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm:
3866         (-[CloseWhileStartingProtocol startLoading]):
3867         (TestWebKitAPI::runTest):
3868         * WebKitTestRunner/TestController.cpp:
3869         (WTR::TestController::resetStateToConsistentValues):
3870         (WTR::TestController::findAndDumpWebKitProcessIdentifiers):
3871         (WTR::TestController::networkProcessDidCrash):
3872         (WTR::TestController::terminateNetworkProcess):
3873         (WTR::TestController::platformAdjustContext):
3874         WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting is not needed, so I removed it.
3875         WKContextSetPrimaryWebsiteDataStore isn't needed any more because WKContextRef (WebProcessPool) doesn't
3876         own a network process any more, so it doesn't care which is the default WebsiteDataStore.
3877         In fact, the "default" WebsiteDataStore isn't really important in the network process any more.
3878
3879 2020-09-26  Darin Adler  <darin@apple.com>
3880
3881         Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms
3882         https://bugs.webkit.org/show_bug.cgi?id=217028
3883
3884         Reviewed by Sam Weinig.
3885
3886         I did a lot of simplifying, but even more is possible. For some reason, the test
3887         code is a hotbed of repeated idioms, and copy and paste rather than helper functions.
3888         Even after the refactoring, I have some doubts about the way this code is written with
3889         so much repeated marshaling for each function.
3890
3891         * DumpRenderTree/AccessibilityController.cpp:
3892         (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty.
3893         (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a
3894         JSRetainPtr to make it clear this passes ownership to the caller.
3895         * DumpRenderTree/AccessibilityController.h: Updated for the above.
3896
3897         * DumpRenderTree/AccessibilityUIElement.cpp:
3898         (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of
3899         JSRetainPtr, which starts out null.
3900
3901         * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
3902         (_platformTypeConstructor): Use toOptionalBool and createJSString.
3903         (_returnExpression): Use makeValue.
3904
3905         * DumpRenderTree/GCController.cpp:
3906         (GCController::GCController): Deleted.
3907         (GCController::~GCController): Deleted.
3908         (collectCallback): Use a reference and auto.
3909         (collectOnAlternateThreadCallback): Ditto.
3910         (getJSObjectCountCallback): Ditto.
3911         (GCController::makeWindowObject): Use setGlobalObjectProperty.
3912         (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a
3913         JSRetainPtr to make it clear this passes ownership to the caller.
3914         * DumpRenderTree/GCController.h: Updated for the above.
3915
3916         * DumpRenderTree/TestRunner.cpp:
3917         (encodeHostNameCallback): Use createJSString.
3918         (execCommandCallback): Ditto.
3919         (findStringCallback): Ditto.
3920         (isCommandEnabledCallback): Ditto.
3921         (overridePreferenceCallback): Ditto.
3922         (queueLoadCallback): Ditto.
3923         (queueLoadHTMLStringCallback): Ditto.
3924         (TestRunner::makeWindowObject): Use setGlobalObjectProperty.
3925         (TestRunner::createJSClass): Replaced getJSClass with this. Return a
3926         JSRetainPtr to make it clear this passes ownership to the caller.
3927         (TestRunner::staticValues): Made return value const*.
3928         (TestRunner::staticFunctions): Ditto.
3929         (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing.
3930         (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash
3931         table values instead of values, since callbacks need to be objects.
3932         (TestRunner::callTestRunnerCallback): Ditto.
3933         (TestRunner::clearTestRunnerCallbacks): Ditto.
3934         (TestRunner::setOpenPanelFiles): Use arrayLength.
3935         * DumpRenderTree/TestRunner.h: Updated for the above.
3936
3937         * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
3938         (AccessibilityController::platformName const): Use createJSString.
3939
3940         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
3941         (createEmptyJSString): Dleted.
3942         (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString.
3943         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
3944         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
3945         (AccessibilityUIElement::attributesOfChildren): Ditto.
3946         (AccessibilityUIElement::allAttributes): Ditto.
3947         (AccessibilityUIElement::stringAttributeValue): Ditto.
3948         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
3949         (AccessibilityUIElement::role): Ditto.
3950         (AccessibilityUIElement::subrole): Ditto.
3951         (AccessibilityUIElement::roleDescription): Ditto.
3952         (AccessibilityUIElement::computedRoleString): Ditto.
3953         (AccessibilityUIElement::title): Ditto.
3954         (AccessibilityUIElement::orientation const): Ditto.
3955         (AccessibilityUIElement::language): Ditto.
3956         (AccessibilityUIElement::valueDescription): Ditto.
3957         (AccessibilityUIElement::ariaDropEffects const): Ditto.
3958         (AccessibilityUIElement::boundsForRange): Ditto.
3959         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
3960         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
3961         (AccessibilityUIElement::attributesOfColumns): Ditto.
3962         (AccessibilityUIElement::attributesOfRows): Ditto.
3963         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
3964         (AccessibilityUIElement::attributesOfHeader): Ditto.
3965         (AccessibilityUIElement::selectedTextRange): Ditto.
3966         (AccessibilityUIElement::accessibilityValue const): Ditto.
3967         (AccessibilityUIElement::documentEncoding): Ditto.
3968         (AccessibilityUIElement::documentURI): Ditto.
3969
3970         * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern".
3971
3972         * DumpRenderTree/mac/AccessibilityCommonMac.mm:
3973         (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength.
3974         Removed unneeded call to JSValueToObject after JSValueIsObject.
3975
3976         * DumpRenderTree/mac/AccessibilityControllerMac.mm:
3977         (AccessibilityController::platformName const): Use createJSString.
3978
3979         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
3980         (createEmptyJSString): Deleted.
3981         (selectTextParameterizedAttributeForCriteria): Use arrayLength.
3982         Removed unneeded call to JSValueToObject after JSValueIsObject.
3983         (searchTextParameterizedAttributeForCriteria): Ditto.
3984         (AccessibilityUIElement::accessibilityValue const): Use createJSString.
3985         (AccessibilityUIElement::documentEncoding): Ditto.
3986         (AccessibilityUIElement::documentURI): Ditto.
3987
3988         * DumpRenderTree/mac/FrameLoadDelegate.mm:
3989         (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]):
3990         Use auto. Pass fewer arguments to makeWindowObject. Simplified object
3991         creation code by using adoptNS instead of release.
3992         (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]):
3993         Use createJSString.
3994
3995         * DumpRenderTree/mac/TestRunnerMac.mm:
3996         (TestRunner::findString): Use arrayLength.
3997
3998         * DumpRenderTree/win/FrameLoadDelegate.cpp:
3999         (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld):
4000         Pass fewer arguments to makeWindowObject.
4001
4002         * DumpRenderTree/win/TextInputController.cpp:
4003         (TextInputController::makeWindowObject): Use setGlobalObjectProperty.
4004         (TextInputController::createJSClass): Replaced getJSClass with this. Return a
4005         JSRetainPtr to make it clear this passes ownership to the caller.
4006         (TextInputController::staticValues): Made return value const*.
4007         (TextInputController::staticFunctions): Ditto.
4008         * DumpRenderTree/win/TextInputController.h: Updated for above.
4009
4010         * TestRunnerShared/Bindings/JSBasics.cpp:
4011         (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull.
4012         (WTR::toOptionalDouble): Added.
4013         (WTR::makeValue): Added with overloads for various types.
4014         Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull.
4015         (WTR::createJSString): Added with overloads for various types.
4016         (WTR::property): Added.
4017         (WTR::stringProperty): Added.
4018         (WTR::booleanProperty): Added.
4019         (WTR::numericProperty): Added.
4020         (WTR::objectProperty): Refactored to call property.
4021         (WTR::arrayLength): Added.
4022         (WTR::setGlobalObjectProperty): Added.
4023         (WTR::call): Refactored to let objectProperty do more of the null checking.
4024         (WTR::callConstructor): Ditto.
4025         * TestRunnerShared/Bindings/JSBasics.h: Updated for the above.
4026
4027         * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit.
4028
4029         * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty.
4030
4031         * TestRunnerShared/UIScriptContext/UIScriptContext.cpp:
4032         (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject.
4033         (UIScriptContext::runUIScript): Use createJSString.
4034         (UIScriptContext::objectFromRect const): Use setProperty.
4035         * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above.
4036
4037         * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp:
4038         (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString.
4039         (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty.
4040
4041         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
4042         (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString
4043         and removed unneeded use of lroundl.
4044
4045         * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions
4046         for dealing with WKDictionaryRef.
4047
4048         * WebKitTestRunner/EventSenderProxy.h: Initialize data members.
4049
4050         * WebKitTestRunner/GeolocationProviderMock.cpp:
4051         (GeolocationProviderMock::setPosition): Use Optional instead of separate bool.
4052         * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above.
4053
4054         * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
4055         (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty.
4056         * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above.
4057
4058         * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
4059         (_generateImplementationFile): Use static initialization and a lambda instead of
4060         an if statement to initialize.
4061         (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added
4062         support for nullable doubles and used auto a bit more.
4063         (_returnExpression): Use makeValue.
4064
4065         * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the
4066         setMockGeolocationPosition function "double?" instead of "object".
4067
4068         * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
4069         (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject.
4070         (WTR::arrayLength): Moved to JSBasics.h/cpp.
4071         (WTR::parseTouchModifier): Added. Factored out of the
4072         EventSendingController::setTouchModifier function.
4073         (WTR::parseModifierArray): Use createJSString and remove unneeded ignored
4074         exception out argument, since that is optional. Also added overload that
4075         gets the context.
4076         (WTR::EventSendingController::EventSendingController): Deleted.
4077         (WTR::EventSendingController::~EventSendingController): Deleted.
4078         (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr.
4079         (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage.
4080         (WTR::EventSendingController::mouseUp): Ditto.
4081         (WTR::EventSendingController::mouseMoveTo): Use setValue and
4082         postSynchronousPageMessages.
4083         (WTR::EventSendingController::mouseForceClick): Ditto.
4084         (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto.
4085         (WTR::EventSendingController::mouseForceDown): Ditto.
4086         (WTR::EventSendingController::mouseForceUp): Ditto.
4087         (WTR::EventSendingController::mouseForceChanged): Ditto.
4088         (WTR::EventSendingController::leapForward): Ditto.
4089         (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage.
4090         (WTR::createKeyDownMessageBody): Use setValue.
4091         (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage.
4092         (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage.
4093         (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage.
4094         (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use
4095         setValue and postPageMessage.
4096         (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and
4097         postSynchronousPageMessage.
4098         (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject.
4099         (WTR::toMonitorWheelEventsOptions): Use booleanProperty.
4100         (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage.
4101         (WTR::EventSendingController::updateTouchPoint): Ditto.
4102         (WTR::EventSendingController::setTouchModifier): Ditto.
4103         (WTR::EventSendingController::setTouchPointRadius): Ditto.
4104         (WTR::EventSendingController::touchStart): Ditto.
4105         (WTR::EventSendingController::touchMove): Ditto.
4106         (WTR::EventSendingController::touchEnd): Ditto.
4107         (WTR::EventSendingController::touchCancel): Ditto.
4108         (WTR::EventSendingController::clearTouchPoints): Ditto.
4109         (WTR::EventSendingController::releaseTouchPoint): Ditto.
4110         (WTR::EventSendingController::cancelTouchPoint): Ditto.
4111         (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty.
4112         * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above.
4113         Deleted various unneeded functions.
4114
4115         * WebKitTestRunner/InjectedBundle/GCController.cpp:
4116         (WTR::GCController::GCController): Deleted.
4117         (WTR::GCController::~GCController): Deleted.
4118         (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty.
4119
4120         * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above.
4121         Also marked the class final.
4122
4123         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
4124         (WTR::InjectedBundle::didCreatePage): Use booleanValue.
4125         (WTR::InjectedBundle::didReceiveMessage): Use toWK.
4126         (WTR::InjectedBundle::postPageMessage): Added.
4127         (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage.
4128         (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue,
4129         booleanValue, postPageMessage, value, and more to streamline.
4130         (WTR::InjectedBundle::booleanForKey): Deleted.
4131         (WTR::InjectedBundle::stringForKey): Deleted.
4132         (WTR::InjectedBundle::beginTesting): Use booleanValue.
4133         (WTR::InjectedBundle::done): Use stringValue.
4134         (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK.
4135         (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage
4136         (WTR::InjectedBundle::outputText): Use toWK.
4137         (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage.
4138         (WTR::InjectedBundle::postAddChromeInputField): Ditto.
4139         (WTR::InjectedBundle::postRemoveChromeInputField): Ditto.
4140         (WTR::InjectedBundle::postFocusWebView): Ditto.
4141         (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto.
4142         (WTR::InjectedBundle::postSetWindowIsKey): Use toWK.
4143         (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK.
4144         (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage.
4145         (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto.
4146         (WTR::InjectedBundle::setGeolocationPermission): Ditto.
4147         (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage,
4148         and use Optional instead of bool/double pairs.
4149         (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage.
4150         (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue.
4151         (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value.
4152         (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage.
4153         (WTR::InjectedBundle::resetUserMediaPermission): Ditto.
4154         (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue
4155         and postPageMessage.
4156         (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto.
4157         (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue
4158         and uint64Value.
4159         (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage.
4160         (WTR::InjectedBundle::setHidden): Ditto.
4161         (WTR::InjectedBundle::setCacheModel): Ditto.
4162         (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue.
4163         (WTR::InjectedBundle::processWorkQueue): Use postPageMessage.
4164         (WTR::InjectedBundle::queueBackNavigation): Ditto.
4165         (WTR::InjectedBundle::queueForwardNavigation): Ditto.
4166         (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage.
4167         (WTR::InjectedBundle::queueLoadHTMLString): Ditto.
4168         (WTR::InjectedBundle::queueReload): Ditto.
4169         (WTR::InjectedBundle::queueLoadingScript): Ditto.
4170         (WTR::InjectedBundle::queueNonLoadingScript): Ditto.
4171         (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined.
4172         (WTR::postSynchronousMessage): Ditto.
4173         (WTR::postPageMessage): Ditto.
4174         (WTR::postSynchronousPageMessage): Ditto.
4175         * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above.
4176
4177         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
4178         (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead.
4179         (WTR::propertyValueDouble): Ditto.
4180         (WTR::propertyValueInt): Ditto.
4181         (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity
4182         and for consistency with JSBasics.h functions.
4183         (WTR::dumpPath): Use stringProperty, objectProperty, and makeString.
4184         (WTR::rangeToStr): Use auto, numericProperty, and makeString.
4185         (WTR::NavigationTypeToString): Use toWK.
4186         (WTR::string): Renamed from securityOriginToStr. Use makeString.
4187         (WTR::frameToStr): Use auto.
4188         (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local.
4189         (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto.
4190         (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto.
4191         (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK.
4192         (WTR::dumpFrameScrollPosition): Update for name change.
4193         (WTR::toJS): Deleted. Use functions from JSBasics.h instead.
4194         (WTR::hasDocumentElement): Use objectProperty.
4195         (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty,
4196         and pass fewer arguments to makeWindowObject.
4197         (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit.
4198         (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString.
4199         (WTR::lastFileURLPathComponent): Ditto.
4200         (WTR::InjectedBundlePage::willSetStatusbarText): Ditto.
4201         (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto.
4202         (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto.
4203         (WTR::InjectedBundlePage::shouldBeginEditing): Ditto.
4204         (WTR::InjectedBundlePage::shouldEndEditing): Ditto.
4205
4206         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
4207         (WTR::TestRunner::TestRunner): Use toWK.
4208         (WTR::page): Added.
4209         (WTR::mainFrame): Added.
4210         (WTR::mainFrameJSContext): Added.
4211         (WTR::TestRunner::display): Use page.
4212         (WTR::TestRunner::displayAndTrackRepaints): Use page.
4213         (WTR::toWK): Added overload for double.
4214         (WTR::createWKDictionary): Added.
4215         (WTR::postSynchronousMessageWithReturnValue): Added.
4216         (WTR::postSynchronousMessageReturningBoolean): Added.
4217         (WTR::postSynchronousPageMessageWithReturnValue): Added.
4218         (WTR::postSynchronousPageMessageReturningBoolean): Added.
4219         (WTR::postSynchronousPageMessageReturningUInt64): Added.
4220         (WTR::postSynchronousMessageReturningUInt64): Added.
4221         (WTR::overridePreference): Added.
4222         (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean.
4223         (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage.
4224         (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64.
4225         (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage.
4226         (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage.
4227         (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean.
4228         (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage.
4229         (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean.
4230         (WTR::TestRunner::addUserScript): Use page.
4231         (WTR::TestRunner::addUserStyleSheet): Ditto.
4232         (WTR::TestRunner::execCommand): Ditto.
4233         (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString.
4234         (WTR::TestRunner::findString): Use page.
4235         (WTR::TestRunner::findStringMatchesInPage): Ditto.
4236         (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and
4237         removed unneeded call to std::round.
4238         (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage.
4239         (WTR::TestRunner::syncLocalStorage): Ditto.
4240         (WTR::TestRunner::clearAllApplicationCaches): Use page.
4241         (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto.
4242         (WTR::TestRunner::setAppCacheMaximumSize): Ditto.
4243         (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto.
4244         (WTR::stringArrayToJS): Tweaked coding style a bit.
4245         (WTR::TestRunner::originsWithApplicationCache): Use page.
4246         (WTR::TestRunner::isCommandEnabled): Ditto.
4247         (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage.
4248         (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference.
4249         (WTR::TestRunner::setMediaDevicesEnabled): Ditto.
4250         (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto.
4251         (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage.
4252         (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference.
4253         (WTR::TestRunner::setModernMediaControlsEnabled): Ditto.
4254         (WTR::TestRunner::setWebGL2Enabled): Ditto.
4255         (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto.
4256         (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto.
4257         (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto.
4258         (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto.
4259         (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto.
4260         (WTR::TestRunner::setGenericCueAPIEnabled): Ditto.
4261         (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage.
4262         (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto.
4263         (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto.
4264         (WTR::TestRunner::setPluginsEnabled): Use overridePreference.
4265         (WTR::TestRunner::isPageBoxVisible): Use mainFrame.
4266         (WTR::TestRunner::setValueForUser): Removed local.
4267         (WTR::TestRunner::setAudioResult): Ditto.
4268         (WTR::TestRunner::clearBackForwardList): Use page.
4269         (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty.
4270         (WTR::TestRunner::showWebInspector): Use page.
4271         (WTR::TestRunner::closeWebInspector): Ditto.
4272         (WTR::TestRunner::evaluateInWebInspector): Ditto.
4273         (WTR::TestRunner::worldIDForWorld): Use range-based for loop.
4274         (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame.
4275         (WTR::TestRunner::setTextDirection): Use mainFrame.
4276         (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
4277         Use postSynchronousPageMessageReturningBoolean.
4278         (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
4279         Use postSynchronousPageMessage.
4280         (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values.
4281         (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext.
4282         (WTR::TestRunner::clearTestRunnerCallbacks): Ditto.
4283         (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage.
4284         (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK.
4285         (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK.
4286         (WTR::TestRunner::setUserStyleSheetLocation): Use page.
4287         (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto.
4288         (WTR::TestRunner::grantWebNotificationPermission): Ditto.
4289         (WTR::TestRunner::denyWebNotificationPermission): Ditto.
4290         (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext.
4291         (WTR::TestRunner::simulateWebNotificationClick): Ditto.
4292         (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double
4293         pairs, letting the IDL bindings do the work for us.
4294         (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local.
4295         (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean.
4296         (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals.
4297         (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto.
4298         (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto.
4299         (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame.
4300         (WTR::TestRunner::queueLoad): Ditto.
4301         (WTR::TestRunner::queueLoadHTMLString): Removed a local.
4302         (WTR::TestRunner::queueLoadingScript): Ditto.
4303         (WTR::TestRunner::queueNonLoadingScript): Ditto.
4304         (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges):
4305         Use postPageMessage.
4306         (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto.
4307         (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto.
4308         (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto.
4309         (WTR::TestRunner::setAuthenticationUsername): Ditto.
4310         (WTR::TestRunner::setAuthenticationPassword): Ditto.
4311         (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean.
4312         (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage.
4313         (WTR::TestRunner::setPluginSupportedMode): Ditto.
4314         (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext.
4315         (WTR::TestRunner::numberOfDFGCompiles): Ditto.
4316         (WTR::TestRunner::neverInlineFunction): Ditto.
4317         (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage.
4318         (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto.
4319         (WTR::TestRunner::setNavigationGesturesEnabled): Ditto.
4320         (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto.
4321         (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto.
4322         (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto.
4323         (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage.
4324         (WTR::TestRunner::terminateServiceWorkers): Ditto.
4325         (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto.
4326         (WTR::TestRunner::runUIScript): Use postPageMessage.
4327         (WTR::TestRunner::runUIScriptImmediately): Ditto.
4328         (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext.
4329         (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength,
4330         and postPageMessage.
4331         (WTR::TestRunner::installCustomMenuAction): Use postPageMessage.
4332         (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage.
4333         (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use
4334         postSynchronousPageMessageReturningBoolean.
4335         (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage.
4336         (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean.
4337         (WTR::TestRunner::setStatisticsDebugMode): Use postMessage.
4338         (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto.
4339         (WTR::TestRunner::setStatisticsLastSeen): Ditto.
4340         (WTR::TestRunner::setStatisticsMergeStatistic): Ditto.
4341         (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto.
4342         (WTR::TestRunner::setStatisticsPrevalentResource): Ditto.
4343         (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto.
4344         (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage.
4345         (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean.
4346         (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto.
4347         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto.
4348         (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto.
4349         (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto.
4350         (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage.
4351         (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean.
4352         (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto.
4353         (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage.
4354         (WTR::TestRunner::setUseITPDatabase): Ditto.
4355         (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean.
4356         (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage.
4357         (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto.
4358         (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto.
4359         (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto.
4360         (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto.
4361         (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto.
4362         (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto.
4363         (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto.
4364         (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext.
4365         (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage.
4366         (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage.
4367         (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage.
4368         (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto.
4369         (WTR::TestRunner::setStatisticsIsRunningTest): Ditto.
4370         (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto.
4371         (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto.
4372         (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto.
4373         (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto.
4374         (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto.
4375         (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage.
4376         (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto.
4377         (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto.
4378         (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage.
4379         (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean.
4380         (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage.
4381         (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean.
4382         (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage.
4383         (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto.
4384         (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto.
4385         (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto.
4386         (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto.
4387         (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto.
4388         (WTR::TestRunner::statisticsResetToConsistentState): Ditto.
4389         (WTR::TestRunner::getAllStorageAccessEntries): Ditto.
4390         (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext.
4391         (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue.
4392         (WTR::TestRunner::loadedSubresourceDomains): Use postMessage.
4393         (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue.
4394         (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage.
4395         (WTR::TestRunner::clearMockMediaDevices): Ditto.
4396         (WTR::TestRunner::removeMockMediaDevice): Ditto.
4397         (WTR::TestRunner::resetMockMediaDevices): Ditto.
4398         (WTR::TestRunner::setMockCameraOrientation): Ditto.
4399         (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use
4400         postSynchronousMessageReturningBoolean.
4401         (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage.
4402         (WTR::TestRunner::disconnectMockGamepad): Ditto.
4403         (WTR::TestRunner::setMockGamepadDetails): Ditto.
4404         (WTR::TestRunner::setMockGamepadAxisValue): Ditto.
4405         (WTR::TestRunner::setMockGamepadButtonValue): Ditto.
4406         (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString,
4407         and postPageMessage.
4408         (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage.
4409         (WTR::TestRunner::removeAllSessionCredentials): Use postMessage.
4410         (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage.
4411         (WTR::TestRunner::clearDOMCaches): Ditto.
4412         (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean.
4413         (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64.
4414         (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage.
4415         (WTR::TestRunner::getApplicationManifestThen): Use postMessage.
4416         (WTR::TestRunner::injectUserScript): Use postSynchronousMessage.
4417         (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto.
4418         (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto.
4419         (WTR::TestRunner::addTestKeyToKeychain): Ditto.
4420         (WTR::TestRunner::cleanUpKeychain): Ditto.
4421         (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean.
4422         (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use
4423         postSynchronousMessageReturningUInt64.
4424         (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use
4425         postSynchronousMessage.
4426         (WTR::TestRunner::abortModal): Ditto.
4427         (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage.
4428         (WTR::TestRunner::clearAdClickAttribution): Ditto.
4429         (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto.
4430         (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto.
4431         (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto.
4432         (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto.
4433         (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference.
4434         (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean.
4435         (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage.
4436         (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString,
4437         and toWK.
4438         (WTR::TestRunner::postMessage): Added.
4439
4440         * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed
4441         overridePreference ot a static member function.
4442
4443         * WebKitTestRunner/InjectedBundle/TextInputController.cpp:
4444         (WTR::TextInputController::TextInputController): Deleted.
4445         (WTR::TextInputController::~TextInputController): Deleted.
4446         (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty.
4447         (WTR::arrayLength): Deleted. Use the one from JSBasics.h now.
4448         (WTR::createCompositionHighlightData): Use setValue.
4449         * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above.
4450
4451         * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
4452         (WTR::AccessibilityController::platformName): Use createJSString.
4453
4454         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
4455         (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now.
4456         (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString.
4457         (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
4458         (WTR::AccessibilityUIElement::attributesOfChildren): Ditto.
4459         (WTR::AccessibilityUIElement::allAttributes): Ditto.
4460         (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto.
4461         (WTR::AccessibilityUIElement::stringAttributeValue): Ditto.
4462         (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto.
4463         (WTR::AccessibilityUIElement::role): Ditto.
4464         (WTR::AccessibilityUIElement::subrole): Ditto.
4465         (WTR::AccessibilityUIElement::computedRoleString): Ditto.
4466         (WTR::AccessibilityUIElement::title): Ditto.
4467         (WTR::AccessibilityUIElement::orientation const): Ditto.
4468         (WTR::AccessibilityUIElement::language): Ditto.
4469         (WTR::AccessibilityUIElement::valueDescription): Ditto.
4470         (WTR::AccessibilityUIElement::isFocused const): Ditto.
4471         (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto.
4472         (WTR::AccessibilityUIElement::isIndeterminate const): Ditto.
4473         (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto.
4474         (WTR::AccessibilityUIElement::boundsForRange): Ditto.
4475         (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
4476         (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
4477         (WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
4478         (WTR::AccessibilityUIElement::attributesOfRows): Ditto.
4479         (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
4480         (WTR::AccessibilityUIElement::attributesOfHeader): Ditto.
4481         (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto.
4482         (WTR::AccessibilityUIElement::accessibilityValue const): Ditto.
4483         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
4484         (WTR::AccessibilityUIElement::documentURI): Ditto.
4485         (WTR::AccessibilityUIElement::isSelectable const): Ditto.
4486         (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto.
4487         (WTR::AccessibilityUIElement::isVisible const): Ditto.
4488         (WTR::AccessibilityUIElement::isOffScreen const): Ditto.
4489         (WTR::AccessibilityUIElement::isCollapsed const): Ditto.
4490         (WTR::AccessibilityUIElement::isSingleLine const): Ditto.
4491         (WTR::AccessibilityUIElement::isMultiLine const): Ditto.
4492         (WTR::AccessibilityUIElement::takeFocus): Ditto.
4493         (WTR::AccessibilityUIElement::takeSelection): Ditto.
4494         (WTR::AccessibilityUIElement::addSelection): Ditto.
4495         (WTR::AccessibilityUIElement::removeSelection): Ditto.
4496         (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto.
4497
4498         * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm:
4499         (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition.
4500         (WTR::EventSenderProxy::~EventSenderProxy): Deleted.
4501
4502         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
4503         (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray.
4504         (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary.
4505         (WTR::makeValueRefForValue): Updated for the above.
4506         (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString
4507         and arrayLength.
4508
4509         * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
4510         (WTR::AccessibilityController::platformName): Use createJSString.
4511
4512         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
4513         (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead.
4514         (WTR::convertVectorToObjectArray): Deleted.
4515         (WTR::makeJSArray): Renamed from convertVectorToObjectArray.
4516         (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength.
4517         (WTR::searchTextParameterizedAttributeForCriteria): Ditto.
4518         (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray.
4519         (WTR::AccessibilityUIElement::columnHeaders const): Ditto.
4520         (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto.
4521         (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto.
4522         (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString.
4523         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
4524         (WTR::AccessibilityUIElement::documentURI): Ditto.
4525
4526         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
4527         (WTR::TestRunner::inspectorTestStubURL): Remove locals.
4528
4529         * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from
4530         a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts
4531         from a const char*.
4532
4533         * WebKitTestRunner/TestController.cpp:
4534         (WTR::TestController::initialize): Use toWK.
4535         (WTR::TestController::generateContextConfiguration const): Ditto.
4536         (WTR::TestController::resetPreferencesToConsistentValues): Ditto.
4537         (WTR::TestController::resetStateToConsistentValues): Use setValue.
4538         (WTR::TestController::updateLiveDocumentsAfterTest): Ditto.
4539         (WTR::TestController::checkForWorldLeaks): Use toWK.
4540         (WTR::contentExtensionJSONPath): Use toSTD.
4541         (WTR::TestController::configureContentExtensionForTest): Use toWK.
4542         (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue
4543         and uint64Value.
4544         (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and
4545         uint64Value.
4546         (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue,
4547         stringValue, uint64Value, doubleValue, booleanValue.
4548         (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto.
4549         (WTR::TestController::setBlockAllPlugins): Use toWK.
4550         (WTR::TestController::setPluginSupportedMode): Ditto.
4551         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto.
4552         (WTR::TestController::didFinishNavigation): Removed local.
4553         (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString
4554         instead of toSTD.
4555         (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs
4556         of bool and double.
4557         (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK.
4558         (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto.
4559         (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK.
4560         * WebKitTestRunner/TestController.h: Updated for the above.
4561
4562         * WebKitTestRunner/TestInvocation.cpp:
4563         (WTR::postPageMessage): Added.
4564         (WTR::TestInvocation::TestIncovation): Use toWTFString.
4565         (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue.
4566         (WTR::TestInvocation::invoke): Use postPageMessage and setValue.
4567         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage
4568         and stringValue.
4569         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use
4570         dictionaryValue, booleanValue, value, stringValue, doubleValue, and
4571         optionalDoubleValue.
4572         (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue.
4573         (WTR::TestInvocation::didBeginSwipe): Use postPageMessage.
4574         (WTR::TestInvocation::willEndSwipe): Ditto.
4575         (WTR::TestInvocation::didEndSwipe): Ditto.
4576         (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto.
4577         (WTR::TestInvocation::notifyDownloadDone): Ditto.
4578         (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto.
4579         (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto.
4580         (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto.
4581         (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto.
4582         (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto.
4583         (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto.
4584         (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto.
4585         (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto.
4586         (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto.
4587         (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto.
4588         (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto.
4589         (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto.
4590         (WTR::TestInvocation::didSetLastSeen): Ditto.
4591         (WTR::TestInvocation::didMergeStatistic): Ditto.
4592         (WTR::TestInvocation::didSetExpiredStatistic): Ditto.
4593         (WTR::TestInvocation::didSetPrevalentResource): Ditto.
4594         (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto.
4595         (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto.
4596         (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto.
4597         (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto.
4598         (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto.
4599         (WTR::TestInvocation::didSetAppBoundDomains): Ditto.
4600         (WTR::TestInvocation::performCustomMenuAction): Ditto.
4601
4602         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
4603         Added JSBasics.h to DictionaryFunctions.h to appropriate targets.
4604
4605         * WebKitTestRunner/WorkQueueManager.cpp:
4606         (WTR::ScriptItem::ScriptItem): Use toWK.
4607         (WTR::WorkQueueManager::queueLoadHTMLString): Ditto.
4608
4609         * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private.
4610
4611         * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
4612         (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString.
4613
4614         * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made
4615         most functions private.
4616
4617         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
4618         (WTR::arrayLength): Deleted. Use the one in JSBasics.h.
4619         (WTR::parseModifierArray): Use the new toWTFString overload.
4620         (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto.
4621
4622         * WebKitTestRunner/mac/EventSenderProxy.mm:
4623         (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition.
4624         (WTR::EventSenderProxy::keyDown): Use toWTFString.
4625
4626         * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made
4627         most functions private.
4628
4629 2020-09-27  Darin Adler  <darin@apple.com>
4630
4631         Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms
4632         https://bugs.webkit.org/show_bug.cgi?id=217028
4633
4634         Reviewed by Sam Weinig.
4635
4636 2020-09-29  Jonathan Bedard  <jbedard@apple.com>
4637
4638         [tvOS] [watchOS] Add support in libTestWTFAlwaysMissing-iOS-v2.tbd
4639         https://bugs.webkit.org/show_bug.cgi?id=217068
4640         <rdar://problem/69724742>
4641
4642         Rubber-stamped by Aakash Jain.
4643
4644         * TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS-v2.tbd: Add watchOS and tvOS.
4645
4646 2020-09-29  Ryan Haddad  <ryanhaddad@apple.com>
4647
4648         URL for Apple-iOS-14-Simulator-Debug-WK2-Tests is broken on the dashboard
4649         https://bugs.webkit.org/show_bug.cgi?id=217094
4650
4651         Reviewed by Aakash Jain.
4652
4653         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
4654         (WebKitBuildbot): Remove a space in the queue name.
4655
4656 2020-09-29  Sihui Liu  <sihui_liu@apple.com>
4657
4658         IndexedDB Index Corruption after upgrade from iOS 13 to iOS 14
4659         https://bugs.webkit.org/show_bug.cgi?id=216962
4660         <rdar://problem/69587004>
4661
4662         Reviewed by Brady Eidson.
4663
4664         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4665         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
4666         (runMultipleIndicesTestWithDatabase):
4667         (TEST):
4668         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2WithMultipleIndices.html: Added.
4669         * TestWebKitAPI/Tests/WebKitCocoa/IndexUpgradeWithMultipleIndices.sqlite3: Added.
4670         * TestWebKitAPI/Tests/WebKitCocoa/IndexUpgradeWithMultipleIndicesHaveSameID.sqlite3: Added.
4671
4672 2020-09-29  Alex Christensen  <achristensen@webkit.org>
4673
4674         Remove plist-based ResourceLoadStatistics storage, which has been replaced by database-based storage
4675         https://bugs.webkit.org/show_bug.cgi?id=217063
4676
4677         Reviewed by John Wilander.
4678
4679         These three tests API tests have been removed:
4680
4681         ResourceLoadStatistics.ChildProcessesNotLaunched
4682         ResourceLoadStatistics.GrandfatherCallback
4683         ResourceLoadStatistics.ShouldNotGrandfatherOnStartup
4684
4685         Each of those tests has a corresponding test that ends with "Database" that tests the database backend,
4686         so the only test coverage loss was of the code that was removed.
4687
4688         * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
4689         (ensureITPFileIsCreated):
4690         (TEST):
4691         (isITPDatabaseEnabled): Deleted.
4692         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
4693         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
4694         (WTR::TestRunner::setUseITPDatabase): Deleted.
4695         * WebKitTestRunner/InjectedBundle/TestRunner.h:
4696         * WebKitTestRunner/TestController.cpp:
4697         (WTR::TestController::setUseITPDatabase): Deleted.
4698         * WebKitTestRunner/TestController.h:
4699         * WebKitTestRunner/TestInvocation.cpp:
4700         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
4701
4702 2020-09-29  Jonathan Bedard  <jbedard@apple.com>
4703
4704         [resultsdbpy] Restrict incoming traffic to localhost
4705         https://bugs.webkit.org/show_bug.cgi?id=217089
4706         <rdar://problem/69749845>
4707
4708         Reviewed by Aakash Jain.
4709
4710         * Scripts/libraries/resultsdbpy/resultsdbpy/model/docker-compose.yml: Restrict incoming traffic to localhost.
4711
4712 2020-09-29  Aakash Jain  <aakash_jain@apple.com>
4713
4714         Limit number of tests to log in case of large number of JSC test failures
4715         https://bugs.webkit.org/show_bug.cgi?id=217085
4716
4717         Reviewed by Jonathan Bedard.
4718
4719         * BuildSlaveSupport/ews-build/steps.py:
4720         (AnalyzeJSCTestsResults.start):
4721
4722 2020-09-29  Aakash Jain  <aakash_jain@apple.com>
4723
4724         [ews] Refactor NUM_API_FAILURES_TO_DISPLAY
4725         https://bugs.webkit.org/show_bug.cgi?id=217086
4726
4727         Reviewed by Jonathan Bedard.
4728
4729         * BuildSlaveSupport/ews-build/steps.py:
4730         (AnalyzeAPITestsResults):
4731         (AnalyzeAPITestsResults.analyzeResults):
4732
4733 2020-09-29  Aakash Jain  <aakash_jain@apple.com>
4734
4735         Limit maximum number of webkitpy failures to display
4736         https://bugs.webkit.org/show_bug.cgi?id=217087
4737
4738         Reviewed by Jonathan Bedard.
4739
4740         * BuildSlaveSupport/ews-build/steps.py:
4741         (WebKitPyTest):
4742         (WebKitPyTest.getResultSummary):
4743         * BuildSlaveSupport/ews-build/steps_unittest.py:
4744         (test_lot_of_failures): Added unit-tests.
4745
4746 2020-09-29  Aakash Jain  <aakash_jain@apple.com>
4747
4748         [build.webkit.org] Add unit-test to detect invalid triggers in config.json
4749         https://bugs.webkit.org/show_bug.cgi?id=216898
4750
4751         Reviewed by Jonathan Bedard.
4752
4753         * BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py: Added.
4754         (ConfigDotJSONTest):
4755         (ConfigDotJSONTest.get_config):
4756         (ConfigDotJSONTest.test_builder_keys):
4757         (ConfigDotJSONTest.test_multiple_scheduers_for_builder):
4758         (ConfigDotJSONTest.test_schduler_contains_valid_builder_name):
4759         (ConfigDotJSONTest.test_single_builder_for_triggerable_scheduler):
4760
4761 2020-09-28  Jonathan Bedard  <jbedard@apple.com>
4762
4763         [webkitpy] Use webkitcorepy's auto installer for pycodestyle (Follow-up fix)
4764         https://bugs.webkit.org/show_bug.cgi?id=215427
4765         <rdar://problem/66931291>
4766
4767         Unreviewed follow-up fix.
4768
4769         Conflict resolution at some point broke the original change.
4770
4771         * Scripts/webkitpy/style/checkers/python.py: Import directly from pycodestyle.
4772         * Scripts/webkitpy/thirdparty/__init__.py:
4773         (AutoinstallImportHook._install_pycodestyle): Deleted.
4774
4775 2020-09-28  Mark Lam  <mark.lam@apple.com>
4776
4777         Add Bounds Check Elimination validation for debugging.
4778         https://bugs.webkit.org/show_bug.cgi?id=217055
4779         rdar://69122891
4780
4781         Reviewed by Keith Miller.
4782
4783         Added --validateBCE=true to ftl-no-cjit-validate-sampling-profiler
4784         and ftl-eager-no-cjit.
4785
4786         * Scripts/run-jsc-stress-tests:
4787
4788 2020-09-28  Matt Lewis  <jlewis3@apple.com>
4789
4790         Fix Build triggers for iOS, watchOS, and tvOS
4791         https://bugs.webkit.org/show_bug.cgi?id=217057
4792
4793         Reviewed by Jonathan Bedard.
4794
4795         * BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
4796         * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
4797         (ShouldBuildTest):
4798         (ShouldBuildTest.test_should_build):
4799
4800 2020-09-28  Jonathan Bedard  <jbedard@apple.com>
4801
4802         [webkitpy] Use webkitcorepy's auto installer for pycodestyle
4803         https://bugs.webkit.org/show_bug.cgi?id=215427
4804         <rdar://problem/66931291>
4805
4806         Reviewed by Darin Adler.
4807
4808         * Scripts/webkitpy/__init__.py: Add pycodestyle.
4809         * Scripts/webkitpy/thirdparty/__init__.py:
4810         (AutoinstallImportHook.find_module): Remove pycodestyle.
4811
4812 2020-09-28  Devin Rousso  <drousso@apple.com>
4813
4814         [iOS] unable to airplay directly loaded fullscreen video
4815         https://bugs.webkit.org/show_bug.cgi?id=216858
4816         <rdar://problem/68746321>
4817
4818         Reviewed by Eric Carlson.
4819
4820         * TestWebKitAPI/Tests/WebKitCocoa/MediaDocument.mm: Added.
4821         (MediaDocument.WirelessPlaybackEnabled):
4822
4823         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4824
4825 2020-09-28  Aakash Jain  <aakash_jain@apple.com>
4826
4827         Notify igalia team about pre-existing test failures and build failures for WPE and GTK queues
4828         https://bugs.webkit.org/show_bug.cgi?id=217052
4829
4830         Reviewed by Jonathan Bedard.
4831
4832         * BuildSlaveSupport/ews-build/send_email.py:
4833         (send_email_to_bot_watchers): Moved the logic here to determine whether to email igalia folks.
4834         * BuildSlaveSupport/ews-build/steps.py:
4835         (AnalyzeCompileWebKitResults.send_email_for_preexisting_build_failure): Passed builder_name parameter.
4836         (AnalyzeJSCTestsResults.send_email_for_flaky_failure):
4837         (AnalyzeJSCTestsResults.send_email_for_pre_existing_failure):
4838         (ReRunWebKitTests.send_email_for_flaky_failure):