41e9a8784c74f381523387f6f690a975a60eb6e1
[WebKit-https.git] / Tools / ChangeLog
1 2015-12-15  David Kilzer  <ddkilzer@apple.com>
2
3         REGRESSION (r192375): DumpRenderTree.app exits immediately with no error
4         <http://webkit.org/b/152314>
5
6         Reviewed by Daniel Bates.
7
8         The change to DumpRenderTreeMain.mm in r192375 caused the iOS
9         code path to exit immediately when calling main().
10         Unfortunately, DumpRenderTreeMain.mm was used for both
11         DumpRenderTree command-line binary and DumpRenderTree.app, which
12         meant that the app would exit immediately with no error code
13         when run!
14
15         The workaround is to introduce a separate source file called
16         DumpRenderTreeAppMain.mm, similar to what WebKitTestRunner
17         already does.
18
19         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Add
20         DumpRenderTreeAppMain.mm to the project.  Make it the only
21         compiled source for the DumpRenderTree.app target.
22         * DumpRenderTree/ios/DumpRenderTreeAppMain.mm: Copied from Tools/DumpRenderTree/mac/DumpRenderTreeMain.mm.
23         (main): Call DumpRenderTreeMain() on iOS.  Assert on OS X in
24         case someone tries mistakenly to use the app.
25         * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
26         Link to JavaScriptCore.framework on iOS for the assert.
27         * DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:
28         Link to JavaScriptCore.framework on OS X for the assert.  Remove
29         unneeded EXCLUDED_SOURCE_FILE_NAMES setting.
30         * DumpRenderTree/mac/DumpRenderTreeMain.mm:
31         (main): Add assert for iOS so that a crash occurs if someone
32         tries to run the wrong command.
33
34 2015-12-14  Tim Horton  <timothy_horton@apple.com>
35
36         Frequent crash under -[WKPDFView web_setMinimumSize:]_block_invoke
37         https://bugs.webkit.org/show_bug.cgi?id=152266
38         <rdar://problem/22092676>
39
40         Reviewed by Simon Fraser.
41
42         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
43         * TestWebKitAPI/Tests/WebKit2Cocoa/WKPDFViewResizeCrash.mm: Added.
44         Add a test that crashed before this change, and doesn't crash after.
45
46 2015-12-14  Chris Fleizach  <cfleizach@apple.com>
47
48         AX: iOS: Text field variations do not have the correct traits
49         https://bugs.webkit.org/show_bug.cgi?id=152237
50
51         Reviewed by Mario Sanchez Prada.
52
53         Add iOS calls for determing if an object is a search field or a text area.
54
55         * DumpRenderTree/AccessibilityUIElement.cpp:
56         (getIsSearchFieldCallback):
57         (getIsTextAreaCallback):
58         (stringForSelectionCallback):
59         (AccessibilityUIElement::getJSClass):
60         * DumpRenderTree/AccessibilityUIElement.h:
61         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
62         (AccessibilityUIElement::identifier):
63         (AccessibilityUIElement::isTextArea):
64         (AccessibilityUIElement::isSearchField):
65         (AccessibilityUIElement::traits):
66         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
67         (WTR::AccessibilityUIElement::scrollPageRight):
68         (WTR::AccessibilityUIElement::hasContainedByFieldsetTrait):
69         (WTR::AccessibilityUIElement::fieldsetAncestorElement):
70         (WTR::AccessibilityUIElement::isSearchField):
71         (WTR::AccessibilityUIElement::isTextArea):
72         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
73         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
74         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
75         (WTR::AccessibilityUIElement::fieldsetAncestorElement):
76         (WTR::AccessibilityUIElement::isTextArea):
77         (WTR::AccessibilityUIElement::isSearchField):
78         (WTR::AccessibilityUIElement::rowCount):
79
80 2015-12-14  Carlos Alberto Lopez Perez  <clopez@igalia.com>
81
82         [GTK] [JHBuild] package libtool-bin is now required on Debian systems.
83         https://bugs.webkit.org/show_bug.cgi?id=152252
84
85         Reviewed by Sergio Villar Senin.
86
87         * gtk/install-dependencies: Add libtool-bin to the list of packages required
88         for building the JHBuild on Debian systems.
89
90 2015-12-11  Joseph Pecoraro  <pecoraro@apple.com>
91
92         check-for-inappropriate-objc-class-names should check all class names, not just externally visible ones
93         https://bugs.webkit.org/show_bug.cgi?id=152156
94
95         Reviewed by Dan Bernstein.
96
97         Our frameworks should appropriately prefix all ObjC classes,
98         not just external symbols.
99
100         * Scripts/check-for-inappropriate-objc-class-names:
101         Remove the -g switch to check all ObjC class names.
102
103 2015-12-10  Eric Carlson  <eric.carlson@apple.com>
104
105         [MediaStream] Expose media capture devices persistent permissions to WebCore
106         https://bugs.webkit.org/show_bug.cgi?id=152087
107
108         Add support for the new user media permission checker page UI client method.
109
110         Reviewed by Chris Dumez.
111
112         * WebKitTestRunner/TestController.cpp:
113         (WTR::decidePolicyForUserMediaPermissionRequest):
114         (WTR::checkUserMediaPermissionForOrigin):
115         (WTR::TestController::createOtherPage): Add checkUserMediaPermissionForOrigin.
116         (WTR::TestController::createWebViewWithOptions): Ditto.
117         (WTR::TestController::resetStateToConsistentValues): Clear m_userMediaOriginPermissions.
118         (WTR::originUserVisibleName): New, create a string for the origin.
119         (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Set the WKUserMediaPermissionCheckRef
120           according to the state of the origin permission map.
121         (WTR::TestController::handleUserMediaPermissionRequest): Remember both the origin and the
122           request so we can update the origin permission map in decidePolicyForUserMediaPermissionRequestIfPossible.
123         (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Update the
124           origin permission map.
125         * WebKitTestRunner/TestController.h:
126
127 2015-12-10  Alex Christensen  <achristensen@webkit.org>
128
129         REGRESSION (r192796) WKBundlePageResourceLoadClient should be able to setHTTPBody in willSendRequestForFrame
130         https://bugs.webkit.org/show_bug.cgi?id=152022
131         rdar://problem/23763584
132
133         Reviewed by Darin Adler.
134
135         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
136         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
137         (WTR::InjectedBundlePage::willSendRequestForFrame):
138         * WebKitTestRunner/InjectedBundle/TestRunner.h:
139         (WTR::TestRunner::setWillSendRequestReturnsNull):
140         (WTR::TestRunner::willSendRequestReturnsNullOnRedirect):
141         (WTR::TestRunner::setWillSendRequestReturnsNullOnRedirect):
142         (WTR::TestRunner::setWillSendRequestAddsHTTPBody):
143         (WTR::TestRunner::willSendRequestHTTPBody):
144         Added setWillSendRequestAddsHTTPBody that uses new SPI for testing.
145
146 2015-12-10  Aakash Jain  <aakash_jain@apple.com>
147
148         Remove additional simulator checks before running layout-tests
149         https://bugs.webkit.org/show_bug.cgi?id=152146
150
151         Reviewed by Darin Adler.
152
153         * Scripts/webkitpy/port/ios.py:
154         (IOSSimulatorPort.check_sys_deps): Removed additional simulators verifications.
155         * Scripts/webkitpy/xcode/simulator.py:
156         (Simulator._boot_and_shutdown_simulator_device): Deleted.
157         (Simulator.check_simulator_device_and_erase_if_needed): Deleted.
158
159 2015-12-09  Aakash Jain  <aakash_jain@apple.com>
160
161         Run atleast one simulator even if max process limit is low
162         https://bugs.webkit.org/show_bug.cgi?id=152081
163         <rdar://problem/23819694>
164
165         Reviewed by Alexey Proskuryakov.
166
167 2015-12-09  Mario Sanchez Prada  <mario@endlessm.com>
168
169         [GTK] Crash in WebProcess when loading large content with custom URI schemes
170         https://bugs.webkit.org/show_bug.cgi?id=144262
171
172         Reviewed by Carlos Garcia Campos.
173
174         Added new unit test to check the additional scenarios we now
175         handle for custom URI schemes.
176
177         * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
178         (generateHTMLContent): New helper function to generate big enough content.
179         (testWebContextURIScheme): New unit test.
180
181 2015-12-09  Ryuan Choi  <ryuan.choi@navercorp.com>
182
183         [EFL] Fix unhandled web process message when launching MiniBrowser
184         https://bugs.webkit.org/show_bug.cgi?id=152048
185
186         Reviewed by Gyuyoung Kim.
187
188         * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp:
189         (TestWebKitAPI::TEST):
190
191 2015-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
192
193         [GTK] Add API to handle beforeunload events
194         https://bugs.webkit.org/show_bug.cgi?id=139090
195
196         Reviewed by Gustavo Noronha Silva.
197
198         * MiniBrowser/gtk/BrowserWindow.c:
199         (browserWindowConstructed):
200         (browserWindowDeleteEvent):
201         (browser_window_class_init):
202         Handle delete-event to prevent the window from being closed when
203         the page has beforeunload handlers. Use
204         webkit_web_view_try_close() when the window is requested to be
205         closed.
206         * TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
207         (testWebViewJavaScriptDialogs):
208         Add a test case for the WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM
209         script dialog type.
210
211 2015-12-09  Mario Sanchez Prada  <mario@endlessm.com>
212
213         Refactored initialization code in LoadTrackingTest.
214
215         Rubber-stamped by Carlos Garcia Campos.
216
217         Small refactoring to make sure that the state of a LoadTrackingTest
218         gets properly reset before loading new web content.
219
220         * TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h:
221         * TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
222         (LoadTrackingTest::reset): New, refactored code from *load*() and go*()
223         functions and reset the remaining local variables.
224         (LoadTrackingTest::loadURI): Call reset();
225         (LoadTrackingTest::loadHtml): Ditto.
226         (LoadTrackingTest::loadPlainText): Ditto.
227         (LoadTrackingTest::loadBytes): Ditto.
228         (LoadTrackingTest::loadRequest): Ditto.
229         (LoadTrackingTest::reload): Ditto.
230         (LoadTrackingTest::goBack): Ditto.
231         (LoadTrackingTest::goForward): Ditto.
232
233 2015-12-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
234
235         [EFL] REGRESSION(r193616): WKPreferences test has been failed since r193616
236         https://bugs.webkit.org/show_bug.cgi?id=151942
237
238         Reviewed by Darin Adler.
239
240         * MiniBrowser/efl/main.c:
241         (window_create): Enable offline web application cache feature on MiniBrowser.
242         (elm_main):
243
244 2015-12-08  Aakash Jain  <aakash_jain@apple.com>
245
246         https://bugs.webkit.org/show_bug.cgi?id=151243
247         <rdar://problem/22955197>
248
249         Reviewed by Alexey Proskuryakov.
250
251         * LayoutTestRelay/LayoutTestRelay/main.m:
252         (getTestingSimDevice): Use separate testing device for each worker.
253         * Scripts/webkitpy/layout_tests/controllers/manager.py:
254         (Manager.run): Perform cleanup even if setup fails.
255         * Scripts/webkitpy/port/ios.py:
256         (IOSSimulatorPort.default_child_processes): Calculate number of simulators to use.
257         (IOSSimulatorPort.child_processes): Gets the number of simulators from options variable.
258         (IOSSimulatorPort.setup_test_run): Handle mulitple simulators.
259         (IOSSimulatorPort._quit_ios_simulator): Same
260         (IOSSimulatorPort.clean_up_test_run): Same
261         (IOSSimulatorPort.check_sys_deps): Same
262         (IOSSimulatorPort.testing_device): Same
263         (IOSSimulatorPort.reset_preferences): Same
264         (IOSSimulatorPort.get_simulator_path): Return simulator path.
265         (IOSSimulatorPort._createSimulatorApp): Create the copy of simulator app.
266         * Scripts/webkitpy/xcode/simulator.py:
267         (Device.delete): Delete the simulator device.
268         (Simulator.delete_device): Same
269         (Simulator.wait_until_device_is_booted): Wait for device booting.
270
271 2015-12-08  Ryuan Choi  <ryuan.choi@navercorp.com>
272
273         [EFL] Add API to provide preferences before creating ewk_view
274         https://bugs.webkit.org/show_bug.cgi?id=151587
275
276         Reviewed by Gyuyoung Kim.
277
278         * MiniBrowser/efl/main.c:
279         (on_key_down):
280         (quit):
281         (window_create):
282         Moved settings related code to configuration() not to update settings
283         whenever ewk_view is created.
284         (configuration):
285         (elm_main):
286
287 2015-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
288
289         Unreviewed. Fix GTK+ API tests after r193639.
290
291         The new jhbuild version needs some more variables ot be present in
292         the builtin dict, even if they are set to None.
293
294         * jhbuild/jhbuildutils.py:
295         (enter_jhbuild_environment_if_available):
296
297 2015-12-07  Gustavo Noronha Silva  <gns@gnome.org>
298
299         [GTK] Notify WebCore when notification is clicked
300         https://bugs.webkit.org/show_bug.cgi?id=151951
301
302         Reviewed by Carlos Garcia Campos.
303
304         * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
305         (testWebViewNotification): test the new API.
306
307 2015-12-07  Michael Catanzaro  <mcatanzaro@igalia.com>
308
309         'jhbuild build' should fail immediately when building any module fails
310         https://bugs.webkit.org/show_bug.cgi?id=145697
311
312         Reviewed by Carlos Garcia Campos.
313
314         * efl/jhbuildrc: Update jhbuildrc to account for the removal of the use_lib64 option.
315         * gtk/jhbuildrc: Update jhbuildrc to account for the removal of the use_lib64 option.
316         Everything is placed under lib instead of lib64 now.
317         * jhbuild/jhbuild-wrapper: Update jhbuild to the latest upstream commit, and pass
318         --exit-on-error when running 'jhbuild build'.
319         * jhbuild/jhbuildrc_common.py:
320         (init): Don't override PKG_CONFIG_PATH, CMAKE_PREFIX_PATH, or CMAKE_LIBRARY_PATH. Modern
321         jhbuild should be able to handle these for us without breaking things....
322
323 2015-12-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
324
325         Add support to import w3c tests from a repository with a different root that the main repo dir
326         https://bugs.webkit.org/show_bug.cgi?id=151751
327
328         Reviewed by Ryosuke Niwa and Youenn Fablet.
329
330         We should be able to import tests from repositories that are not pure test repositories and where tests are kept
331         in a different directory than the repository root.
332
333         This patch introduces a new parameter tests_directory that we will use as root directory to search for
334         tests. All paths will be flattened when copying tests to have a less complicated directory structure. This
335         requires having the copy_path lists including tuples of origin and destination directories.
336
337         * Scripts/webkitpy/w3c/test_downloader.py:
338         (TestDownloader._add_test_suite_paths): Adds the paths as a tuple of origin and destination directory.
339         (TestDownloader.copy_tests): Uses the origin and destination tuple for the paths to copy when copying files.
340         * Scripts/webkitpy/w3c/test_importer_unittest.py:
341         (TestImporterTest.test_tests_directory): Test.
342
343 2015-12-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
344
345         Mock TestRepositories in W3C importer tests
346         https://bugs.webkit.org/show_bug.cgi?id=151938
347
348         Reviewed by Youenn Fablet.
349
350         The test importer tests should use a fake repository instead of using the real one. The reason why this happened
351         is because the test repository method reading the file was using the filesystem directly instead of taking the
352         host one. This patch changes that.
353
354         * Scripts/webkitpy/w3c/test_downloader.py:
355         (TestDownloader.load_test_repositories): Take a filesystem and use it. If we get no filesystem, we use the
356         default one.
357         (TestDownloader.__init__): When loading the repositories, pass the host filesystem.
358         * Scripts/webkitpy/w3c/test_importer_unittest.py:
359         (TestImporterTest.test_harnesslinks_conversion):
360         (TestImporterTest.test_submodules_generation): Use a fake test repository file.
361
362 2015-12-07  David Kilzer  <ddkilzer@apple.com>
363
364         TestNetscapePlugIn: Address review comment on 193607
365         <http://webkit.org/b/151881>
366
367         * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
368         (testSetStatus): Initializing std::unique_ptr<char[]> with
369         nullptr is redundant.
370
371 2015-12-07  Carlos Garcia Campos  <cgarcia@igalia.com>
372
373         [GTK] Add webkit_uri_request_get_http_method
374         https://bugs.webkit.org/show_bug.cgi?id=151601
375
376         Reviewed by Martin Robinson.
377
378         Add test case to check HTTP method of WebKitURIRequest.
379
380         * TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
381         (testURIRequestHTTPMethod):
382         (serverCallback):
383         (beforeAll):
384         * TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
385         (sendRequestCallback):
386
387 2015-12-07  Carlos Garcia Campos  <cgarcia@igalia.com>
388
389         [GTK] Add WebKitWebPage::console-message-sent signal to Web Extensions API
390         https://bugs.webkit.org/show_bug.cgi?id=79918
391
392         Reviewed by Gustavo Noronha Silva.
393
394         Add unit tests to check the different console messages.
395
396         * TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
397         * TestWebKitAPI/Tests/WebKit2Gtk/TestConsoleMessage.cpp: Added.
398         (ConsoleMessageTest::ConsoleMessage::operator==):
399         (ConsoleMessageTest::consoleMessageReceivedCallback):
400         (ConsoleMessageTest::ConsoleMessageTest):
401         (ConsoleMessageTest::~ConsoleMessageTest):
402         (ConsoleMessageTest::waitUntilConsoleMessageReceived):
403         (testWebKitConsoleMessageConsoleAPI):
404         (testWebKitConsoleMessageJavaScriptException):
405         (testWebKitConsoleMessageNetworkError):
406         (testWebKitConsoleMessageSecurityError):
407         (beforeAll):
408         (afterAll):
409         * TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
410         (consoleMessageSentCallback):
411         (pageCreatedCallback):
412
413 2015-12-07  Ryuan Choi  <ryuan.choi@navercorp.com>
414
415         [EFL] MiniBrowser doesn't exit when called ewk_view_try_close()
416         https://bugs.webkit.org/show_bug.cgi?id=151934
417
418         Reviewed by Csaba Osztrogonác.
419
420         * MiniBrowser/efl/main.c:
421         (on_window_deletion): Revert the changes of r192767.
422
423 2015-12-07  Michael Catanzaro  <mcatanzaro@igalia.com>
424
425         [GTK] update-webkitgtk-libs cannot build mesa
426         https://bugs.webkit.org/show_bug.cgi?id=151535
427
428         Reviewed by Martin Robinson.
429
430         Upgrade to newer mesa in order to build successfully against LLVM 3.7. Add missing
431         dependency of mesa on LLVM, to ensure LLVM is built first. Build LLVM unconditionally, even
432         on architectures where FTL is not supported, to ensure mesa is always buildable, since LLVM
433         does not have a stable API and we cannot expect mesa to be buildable unless we control the
434         LLVM version. Build mesa with --disable-egl since --enable-egl conflicts with
435         --enable-xlib-glx. This fixes update-webkitgtk-libs on distros with LLVM 3.7.
436
437         * gtk/jhbuild.modules:
438
439 2015-12-07  Philippe Normand  <pnormand@igalia.com>
440
441         [GTK][Mac] libWebExtensionTest link error
442         https://bugs.webkit.org/show_bug.cgi?id=150802
443
444         Reviewed by Carlos Garcia Campos.
445
446         * TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: add dependencies to the webextension library.
447
448 2015-12-06  David Kilzer  <ddkilzer@apple.com>
449
450         TestNetscapePlugIn: Fix leaks found by static analyzer
451         <http://webkit.org/b/151881>
452
453         Reviewed by Darin Adler.
454
455         Fixes the following leaks found by the static analyzer:
456             DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:808:16: warning: Potential leak of memory pointed to by 'path'
457                     return false;
458                            ^~~~~
459             DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:808:16: warning: Potential leak of memory pointed to by 'target'
460                     return false;
461                            ^~~~~
462             DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:808:16: warning: Potential leak of memory pointed to by 'url'
463                     return false;
464                            ^~~~~
465
466         * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
467         (toCString): Switch to returning std::unique_ptr<char[]>.  Add
468         early return if allocation fails.
469         (testPostURLFile): Switch to using std::unique_ptr<char[]>.
470         Make sure to call fclose() on filehandle, even for an early
471         return.
472         (testSetStatus): Switch to using std::unique_ptr<char[]>.
473
474 2015-12-05  David Kilzer  <ddkilzer@apple.com>
475
476         prepare-ChangeLog: Fix some warning messages when using svn
477         <http://webkit.org/b/151914>
478
479         Reviewed by Daniel Bates.
480
481         * Scripts/prepare-ChangeLog:
482         (generateFunctionLists): Simplify logic so that we never call
483         normalizePath() with an undefined value.
484         (attributeCommand): Quote $subPath for the shell so that we
485         don't try to run "svn propget" on invalid paths.
486
487 2015-12-04  David Kilzer  <ddkilzer@apple.com>
488
489         TestNetscapePlugIn: Fix remaining static analyzer warnings
490         <http://webkit.org/b/151888>
491
492         Reviewed by Alexey Proskuryakov.
493
494         Fixes the following static analyzer warnings:
495             Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:101:9: warning: Called function pointer is null (null dereference)
496                     CRASH();
497                     ^~~~~~~
498             Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:46:5: note: expanded from macro 'CRASH'
499                 ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \
500                 ^~~~~~~~~~~~~~~~
501             Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:375:12: warning: Access to field 'pluginTest' results in a dereference of a null pointer (loaded from variable 'obj')
502                 return obj->pluginTest->NPP_SetWindow(window);
503                        ^~~~~~~~~~~~~~~
504             2 warnings generated.
505
506         * DumpRenderTree/TestNetscapePlugIn/main.cpp:
507         (CRASH): Use __builtin_trap() for gcc/clang.
508         (NPP_SetWindow): Add early return if obj is nullptr.
509
510 2015-12-03  Carlos Garcia Campos  <cgarcia@igalia.com>
511
512         [GTK] Test /webkit2/WebKitWebResource/get-data is flaky
513         https://bugs.webkit.org/show_bug.cgi?id=151797
514
515         Reviewed by Martin Robinson.
516
517         Since we switched to use the network process to run the unit tests
518         the test /webkit2/WebKitWebResource/get-data sometimes fails and
519         sometimes passes. We are now also getting the notification for the
520         css image. Since we wait for 3 resources, sometimes the css image
521         is loaded before and then checkResourceData is called for it, but
522         not handled. When the css image is the last one loaded the test
523         passes. So, we just need to wait for the 4 resources.
524
525         * TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
526         (testWebResourceGetData):
527
528 2015-12-03  David Kilzer  <ddkilzer@apple.com>
529
530         DumpRenderTree: Use-after-free in createBitmapContext() in PixelDumpSupportMac.mm
531         <http://webkit.org/b/151845>
532
533         Reviewed by Simon Fraser.
534
535         Fixes the following static analyzer warning:
536             DumpRenderTree/mac/PixelDumpSupportMac.mm:67:9: warning: Use of memory after it is freed
537                     WTFLogAlways("DumpRenderTree: CGBitmapContextCreate(%p, %llu, %llu, 8, %llu, %p, 0x%x) failed\n", buffer, pixelsHigh, pixelsWide, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
538                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
539
540         * DumpRenderTree/mac/PixelDumpSupportMac.mm:
541         (createBitmapContext): Free 'buffer' after using it in logging
542         to fix the use-after-free.  Assign a value of nullptr to buffer
543         so we don't return with it set to a freed address.
544
545 2015-12-03  Jer Noble  <jer.noble@apple.com>
546
547         Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit & WebKit2
548         https://bugs.webkit.org/show_bug.cgi?id=151830
549
550         Reviewed by Anders Carlsson.
551
552         Set invisibleAutoplayNotPermitted to NO by default both in WKTR and DRT.
553
554         * DumpRenderTree/mac/DumpRenderTree.mm:
555         (resetWebPreferencesToConsistentValues):
556         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
557         (WTR::initializeWebViewConfiguration):
558
559 2015-12-03  Anders Carlsson  <andersca@apple.com>
560
561         Remove Objective-C GC support
562         https://bugs.webkit.org/show_bug.cgi?id=151819
563         rdar://problem/23746991
564
565         Reviewed by Dan Bernstein.
566
567         * asan/asan.xcconfig:
568
569 2015-12-02  Yusuke Suzuki  <utatane.tea@gmail.com>
570
571         Allow nil for unspecified benchmark pathes
572         https://bugs.webkit.org/show_bug.cgi?id=151784
573
574         Reviewed by Filip Pizlo.
575
576         `Pathname.new(nil)` will raise an error.
577         Only generate Pathname if the benchmark path is specified.
578
579         * Scripts/run-jsc-benchmarks:
580
581 2015-12-02  Brent Fulgham  <bfulgham@apple.com>
582
583         [Win] Run non-http tests without Cygwin
584         https://bugs.webkit.org/show_bug.cgi?id=151721
585
586         Reviewed by Andy Estes.
587
588         Support native 32-bit and 64-bit Python (and Perl) builds
589         for running tests:
590
591         1. Use "startswith('win')", rather than "== 'win32'" to support
592         various Windows build types.
593         2. Supply full path for some native Windows utilities, since the
594         path environment does not always have the specified, and they are
595         guaranteed to exist in those specific locations.
596         3. Make sure native Windows Python test runs pass proper environment
597         variables to run programs.
598         4. Append 'exe' suffix when running Windows executables.
599         5. Use the _winreg Python module on Windows, since the Cygwin 'regtool'
600         command doesn't exist.
601         
602         * Scripts/update-webkit: Use Perl $^X command to refer to the path of
603         the current Perl executable, rather than requiring a new path search.
604         * Scripts/webkitpy/common/find_files_unittest.py:
605         (TestWinNormalize.test_win): Use startswith('win').
606         * Scripts/webkitpy/common/prettypatch_unittest.py:
607         (test_pretty_diff_encodings): Ditto.
608         * Scripts/webkitpy/common/system/executive.py:
609         (Executive._should_close_fds): Ditto.
610         (Executive.shell_command_for_script): Use startswith('win').
611         (Executive.kill_process): Use full path to killall executable.
612         (Executive.check_running_pid): Use startswith('win').
613         (Executive.running_pids): Ditto.
614         (Executive.kill_all): Ditto. Also use path to 'killall' executable when
615         running under native Windows Python.
616         (Executive._child_process_encoding): Use startswith('win').
617         (Executive._should_encode_child_process_arguments): Ditto.
618         (Executive.popen): Recognize proper script engine on Windows, since it
619         does not support the shebang syntax.
620         (Executive.run_in_parallel): Use startswith('win').
621         * Scripts/webkitpy/common/system/executive_unittest.py:
622         (never_ending_command): Ditto.
623         (ExecutiveTest.test_run_command_with_unicode): Ditto.
624         (ExecutiveTest.serial_test_kill_process): Ditto.
625         (ExecutiveTest.serial_test_kill_all): Ditto.
626         (ExecutiveTest.serial_test_check_running_pid): Ditto.
627         (ExecutiveTest.serial_test_run_in_parallel): Ditto.
628         (main): Ditto.
629         * Scripts/webkitpy/common/system/file_lock.py:
630         (FileLock._create_lock): Ditto.
631         (FileLock._remove_lock): Ditto.
632         * Scripts/webkitpy/common/system/filesystem_unittest.py:
633         (RealFileSystemTest.test_chdir): Ditto.
634         (RealFileSystemTest.test_chdir__notexists): Ditto.
635         (RealFileSystemTest.test_maybe_make_directory__failure): Ditto.
636         * Scripts/webkitpy/common/system/path_unittest.py:
637         (AbspathTest.test_abspath_to_uri_win): Ditto.
638         * Scripts/webkitpy/common/system/platforminfo.py:
639         (PlatformInfo._determine_os_name): Ditto.
640         * Scripts/webkitpy/common/system/user.py: Ditto.
641         * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
642         (ManagerTest.integration_test_needs_servers): Ditto.
643         * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
644         (LayoutTestApacheHttpd.__init__): Handle upper and lower-case
645         driver letters.
646         (LayoutTestApacheHttpd._get_apache_config_file_path): Ditto.
647         * Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py:
648         (TestLayoutTestApacheHttpd.test_start_cmd): Ditto.
649         * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
650         (HttpServerBase._check_that_all_ports_are_available): Ditto.
651         * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
652         (TestHttpServer.test_start_cmd): Ditto.
653         * Scripts/webkitpy/port/base.py:
654         (Port.to.setup_environ_for_server): Include 'COMSPEC', 'SYSTEMDRIVE',
655         and 'SYSTEMROOT' in environment passed to test runners.
656         (Port._apache_config_file_name_for_platform): Use startswith('win').
657         (Port._build_path): Ditto.
658         (Port._path_to_driver): Include 'exe' suffix when running under native
659         Windows.
660         * Scripts/webkitpy/port/driver.py:
661         (Driver._setup_environ_for_driver): Explicitly make some environment
662         variables strings.
663         * Scripts/webkitpy/port/server_process.py:
664         (ServerProcess.__init__): Use startswith('win').
665         * Scripts/webkitpy/port/win.py:
666         (WinPort): Use the win32 registry utilities on Windows, and appropriate
667         registry key formats.
668         (WinPort._ntsd_location): Revise tool search paths for Windows 10.
669         (WinPort.read_registry_value): Revise to use _winreg library on Windows,
670         and regtool on Cygwin.
671         (WinPort.write_registry_value): Ditto.
672         (WinPort.setup_crash_log_saving): Ditto.
673         (WinPort.restore_crash_log_saving): Ditto.
674         (WinPort.prevent_error_dialogs): Ditto.
675         (WinPort.allow_error_dialogs): Ditto.
676         (WinPort.find_system_pid): Revise to use Windows management
677         infrastructure on native Windows, continue using 'ps' on Cygwin.
678         (WinPort.read_registry_string): Deleted.
679         (WinPort.write_registry_string): Deleted.
680         * Scripts/webkitpy/test/main.py:
681         (main): Use startswith('win').
682         (Tester._parse_args): Ditto.
683
684 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
685
686         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
687         https://bugs.webkit.org/show_bug.cgi?id=150792
688
689         Reviewed by Saam Barati.
690
691         * Scripts/webkitperl/FeatureList.pm:
692
693 2015-12-01  Commit Queue  <commit-queue@webkit.org>
694
695         Unreviewed, rolling out r192914.
696         https://bugs.webkit.org/show_bug.cgi?id=151734
697
698         JSC tests for this change are failing on 32 and 64-bit bots
699         (Requested by ryanhaddad on #webkit).
700
701         Reverted changeset:
702
703         "[ES6] Implement LLInt/Baseline Support for ES6 Generators and
704         enable this feature"
705         https://bugs.webkit.org/show_bug.cgi?id=150792
706         http://trac.webkit.org/changeset/192914
707
708 2015-12-01  David Kilzer  <ddkilzer@apple.com>
709
710         EventSenderProxy::swipeGestureWithWheelAndMomentumPhases() leaks an EventSenderSyntheticEvent
711         <http://webkit.org/b/151726>
712
713         Reviewed by Simon Fraser.
714
715         * WebKitTestRunner/mac/EventSenderProxy.mm:
716         (WTR::EventSenderProxy::swipeGestureWithWheelAndMomentumPhases):
717         Deploy RetainPtr<EventSenderSyntheticEvent> to fix leak.
718
719 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
720
721         Give String and AtomicString an existingHash() function
722         https://bugs.webkit.org/show_bug.cgi?id=151717
723
724         Reviewed by Andreas Kling.
725
726         * TestWebKitAPI/Tests/WTF/AtomicString.cpp:
727         (TestWebKitAPI::TEST):
728         * TestWebKitAPI/Tests/WTF/WTFString.cpp:
729         (TestWebKitAPI::TEST):
730
731 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
732
733         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
734         https://bugs.webkit.org/show_bug.cgi?id=150792
735
736         Reviewed by Saam Barati.
737
738         * Scripts/webkitperl/FeatureList.pm:
739
740 2015-12-01  Sam Weinig  <sam@webkit.org>
741
742         Need completionHandler-based WebKit C SPI for alert, confirm, and prompt
743         <rdar://problem/23320863>
744         https://bugs.webkit.org/show_bug.cgi?id=151708
745
746         Reviewed by Anders Carlsson.
747
748         * WebKitTestRunner/TestController.cpp:
749         (WTR::TestController::createOtherPage):
750         (WTR::TestController::createWebViewWithOptions):
751         Update for new WKPageUIClient.
752
753 2015-12-01  Anders Carlsson  <andersca@apple.com>
754
755         Remove WebKit2.framework
756         https://bugs.webkit.org/show_bug.cgi?id=151715
757
758         Reviewed by Dan Bernstein.
759
760         * TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:
761         * TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad_bundle.cpp:
762         * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm:
763         * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:
764         * TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm:
765         * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
766         * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h:
767
768 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
769
770         Unreviewed common typo fix "occurance" => "occurrence".
771
772         * Scripts/webkitpy/tool/commands/queries.py:
773         (FindFlakyTests._print_statistics):
774
775 2015-11-30  Alex Christensen  <achristensen@webkit.org>
776
777         Make ProcessModel always MultipleSecondaryProcesses
778         https://bugs.webkit.org/show_bug.cgi?id=151662
779
780         Reviewed by Antti Koivisto.
781
782         * TestWebKitAPI/Tests/WebKit2/Geolocation.cpp:
783         (TestWebKitAPI::TEST):
784         * WebKitTestRunner/TestController.cpp:
785         (WTR::TestController::generatePageConfiguration):
786
787 2015-11-30  Alex Christensen  <achristensen@webkit.org>
788
789         Make usesNetworkProcess always true
790         https://bugs.webkit.org/show_bug.cgi?id=151580
791
792         Reviewed by Darin Adler.
793
794         * TestWebKitAPI/Tests/WebKit2/Geolocation.cpp:
795         (TestWebKitAPI::TEST):
796         * TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp:
797         (TestWebKitAPI::TEST):
798         * WebKitTestRunner/TestController.cpp:
799         (WTR::TestController::generatePageConfiguration):
800
801 2015-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
802
803         Unreviewed. Skip GTK+ test /webkit2/WebKitWebView/editable/editable in Debug.
804
805         Add a way to skip unit tests only for Debug or Release builds and
806         skipt the test /webkit2/WebKitWebView/editable/editable only for Debug.
807
808         * Scripts/run-gtk-tests:
809         (SkippedTest):
810         (SkippedTest.__init__):
811         (SkippedTest.__str__):
812         (SkippedTest.skip_entire_suite):
813         (SkippedTest.skip_for_build_type):
814         (TestRunner):
815         (TestRunner.__init__):
816
817 2015-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
818
819         Unreviewed. Fix a crash in GTK+ test /webkit2/WebKitWebView/custom-charset.
820
821         It's an assert hit because we are reloading a view loaded with
822         HTML data which is not supported. Use loadURI instead.
823
824         * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
825         (testWebViewCustomCharset):
826
827 2015-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
828
829         [GLIB] Remove GMainLoopSource and GThreadSafeMainLoopSource
830         https://bugs.webkit.org/show_bug.cgi?id=151633
831
832         Reviewed by Csaba Osztrogonác.
833
834         * TestWebKitAPI/PlatformGTK.cmake:
835         * TestWebKitAPI/Tests/WTF/glib/GMainLoopSource.cpp: Removed.
836
837 2015-11-27  Carlos Garcia Campos  <cgarcia@igalia.com>
838
839         [GTK] Remove the remaining uses of GMainLoopSource
840         https://bugs.webkit.org/show_bug.cgi?id=151632
841
842         Reviewed by Žan Doberšek.
843
844         * TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
845         (testWebViewSyncRequestOnMaxConns):
846         * TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
847         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
848         (WTR::TestRunner::TestRunner):
849         * WebKitTestRunner/InjectedBundle/TestRunner.h:
850         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
851         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
852         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
853         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
854         (WTR::timeoutSource):
855         (WTR::TestController::notifyDone):
856         (WTR::TestController::platformRunUntil):
857
858 2015-11-27  Csaba Osztrogonác  <ossy@webkit.org>
859
860         [cmake] Add testb3 to the build system
861         https://bugs.webkit.org/show_bug.cgi?id=151619
862
863         Reviewed by Gyuyoung Kim.
864
865         * Scripts/build-jsc:
866
867 2015-11-27  Csaba Osztrogonác  <ossy@webkit.org>
868
869         [jhbuild] Fix pixman build with clang
870         https://bugs.webkit.org/show_bug.cgi?id=151441
871
872         Reviewed by Carlos Garcia Campos.
873
874         * efl/jhbuild.modules:
875         * gtk/jhbuild.modules:
876
877 2015-11-26  David Kilzer  <ddkilzer@apple.com>
878
879         Extract prependToEnvironmentVariableList
880         <http://webkit.org/b/151536>
881
882         Reviewed by Daniel Bates.
883
884         Tests: webkitdirs_unittest/appendToEnvironmentVariableList.pl
885                webkitdirs_unittest/prependToEnvironmentVariableList.pl
886
887         * Scripts/webkitdirs.pm: Export appendToEnvironmentVariableList
888         and prependToEnvironmentVariableList.
889         (appendToEnvironmentVariableList): Simplify variable name.
890         Switch to use $Config{path_sep}.
891         (prependToEnvironmentVariableList): Add new method.
892         (setupMacWebKitEnvironment): Switch to use
893         prependToEnvironmentVariableList().
894         (setupIOSWebKitEnvironment): Ditto.
895
896         * Scripts/webkitperl/webkitdirs_unittest/appendToEnvironmentVariableList.pl: Added.
897         * Scripts/webkitperl/webkitdirs_unittest/prependToEnvironmentVariableList.pl: Added.
898
899 2015-11-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
900
901         REGRESSION(r192053): MiniBrowser doesn't exit when clicking on the close-window button
902         https://bugs.webkit.org/show_bug.cgi?id=151567
903
904         Reviewed by Darin Adler.
905
906         * MiniBrowser/efl/main.c: Call window_close() instead of ewk_view_try_close().
907         (on_window_deletion):
908
909 2015-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
910
911         [GTK] Use the network process unconditionally
912         https://bugs.webkit.org/show_bug.cgi?id=151541
913
914         Reviewed by Alex Christensen.
915
916         Fix TestInspectorServer test. Do not assume we already have the
917         title we want when the page has been loaded, since the title is
918         changed afterwards. So, check if the title has already been set,
919         and if not wait for it.
920
921         * TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
922         (openRemoteDebuggingSession):
923
924 2015-11-23  Alex Christensen  <achristensen@webkit.org>
925
926         Fix crash in ~WebProcessPool when using Geolocation with useNetworkProcess=true
927         https://bugs.webkit.org/show_bug.cgi?id=151532
928
929         Reviewed by Benjamin Poulain.
930
931         * TestWebKitAPI/Tests/WebKit2/Geolocation.cpp:
932         (TestWebKitAPI::GeolocationTransitionToHighAccuracyStateTracker::eventsChanged):
933         (TestWebKitAPI::TEST):
934         (TestWebKitAPI::GeolocationTransitionToLowAccuracyStateTracker::eventsChanged):
935         (TestWebKitAPI::GeolocationTransitionToHighAccuracyStateTracker::GeolocationTransitionToHighAccuracyStateTracker): Deleted.
936         (TestWebKitAPI::GeolocationTransitionToLowAccuracyStateTracker::GeolocationTransitionToLowAccuracyStateTracker): Deleted.
937         Properly load about:blank in all WebViews to clean up.  Without this change, we had a 
938         Geolocation provider stopping after its state tracker was destroyed with its stack frame,
939         so it was calling a function on a test object that had gone out of scope.
940         Also, call WKContextSetUsesNetworkProcess(context, true) to show what crash this fixed,
941         but that will become the default soon and that call will be removed.
942
943 2015-11-22  David Kilzer  <ddkilzer@apple.com>
944
945         run-webkit-tests: http server for imported W3C tests doesn't work with --layout-tests-directory switch
946         <http://webkit.org/b/151542>
947
948         Reviewed by Daniel Bates.
949
950         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
951         (base_url): Use the Port object (already passed in) to give us
952         the path to the LayoutTests directory, which already checks for a
953         --layout-tests-directory command-line switch.
954         (WebPlatformTestServer.__init__): Remove layout_test_results_dir
955         argument since we can get this from the Port object already
956         passed in via Port.results_directory().  Also switch to use
957         Port.layout_tests_dir() to get the LayoutTests directory.
958
959         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py:
960         (TestWebPlatformTestServer.test_custom_layout_tests_directory):
961         Add test case for custom LayoutTests directory.
962         (TestWebPlatformTestServer.test_previously_spawned_instance):
963         Update Port object to set mock results directory as if it was
964         set on the command-line.  Remove unneeded argument from
965         WebPlatformTestServer constructor.
966         (TestWebPlatformTestServer.test_corrupted_subserver_files): Ditto.
967
968         * Scripts/webkitpy/port/base.py:
969         (Port.to.start_web_platform_test_server): Remove unneeded
970         argument from WebPlatformTestServer constuctor.
971
972 2015-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>
973
974         [GTK] Some unit tests fail when using the network process
975         https://bugs.webkit.org/show_bug.cgi?id=151490
976
977         Reviewed by Martin Robinson.
978
979         Run the soup server in a separate thread in TestResources test to
980         avoid deadlocks.
981
982         This fixes /webkit2/WebKitWebView/sync-request-on-max-conns and
983         /webkit2/WebKitWebResource/get-data when using the network process.
984
985         * TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
986         (beforeAll): Create the WebKitTestServer with ServerRunInThread flag.
987         * TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp:
988         (WebKitTestServer::WebKitTestServer): When ServerRunInThread is
989         present, create a WorkQueue to run the server.
990         (WebKitTestServer::run): Run the server in the work queue if it
991         has been created.
992         * TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h: Convert server
993         type into server options as flags.
994
995 2015-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>
996
997         [GTK] ImageDiff should normalize the diff image
998         https://bugs.webkit.org/show_bug.cgi?id=151261
999
1000         Reviewed by Sergio Villar Senin.
1001
1002         * ImageDiff/gtk/ImageDiff.cpp:
1003         (readPixbufFromStdin): Fix memory leak.
1004         (differenceImageFromDifferenceBuffer): Normalize diff buffer.
1005         (calculateDifference): Pass max distance to differenceImageFromDifferenceBuffer.
1006
1007 == Rolled over to ChangeLog-2015-11-21 ==