2017-05-03 Michael Catanzaro YouTube user agent quirk breaks new YouTube https://bugs.webkit.org/show_bug.cgi?id=171603 Reviewed by Carlos Garcia Campos. Remove the YouTube quirk test. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2017-01-26 Chris Dumez Crash when navigating back to a page in PacheCache when one of its frames has been removed https://bugs.webkit.org/show_bug.cgi?id=167421 Reviewed by Darin Adler. Add a new setting allowing layout tests to enable PageCache in a window that has an opener, for convenience. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * DumpRenderTree/win/DumpRenderTree.cpp: (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2017-01-03 Carlos Garcia Campos REGRESSION(r173753): [GTK] Source/WebKit is distributed in tarballs https://bugs.webkit.org/show_bug.cgi?id=165797 Reviewed by Michael Catanzaro. Move directory ruleset after all exclude rules of Source rulset. * gtk/manifest.txt.in: 2017-01-03 Yusuke Suzuki WorkQueueGeneric's platformInvalidate() can deadlock when called on the RunLoop's thread https://bugs.webkit.org/show_bug.cgi?id=166645 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: (TestWebKitAPI::TEST): 2016-12-30 Michael Catanzaro [GTK] Improve user agent construction https://bugs.webkit.org/show_bug.cgi?id=142074 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk): (TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk): (TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk): (TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk): (TestWebKitAPI::TEST): 2016-12-27 Michael Catanzaro [GTK] Improve user agent construction https://bugs.webkit.org/show_bug.cgi?id=142074 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2016-10-16 Carlos Garcia Campos [GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame https://bugs.webkit.org/show_bug.cgi?id=163389 Reviewed by Michael Catanzaro. Update /webkit2/WebKitWebPage/get-uri test to check that web view and page uri always match even when request is modified by WebKitWebPage::send-request signal. * TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp: (testWebPageURI): 2016-10-16 Carlos Garcia Campos Document request not updated after willSendRequest is called for a redirect https://bugs.webkit.org/show_bug.cgi?id=163436 Reviewed by Michael Catanzaro. Update /webkit2/WebKitWebView/active-uri test to check the active URI also when modified by WebKitPage::send-request signal in a web extension. * TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp: (testWebViewActiveURI): (serverCallback): * TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp: (sendRequestCallback): * TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp: (loadChangedCallback): 2016-10-13 Carlos Garcia Campos WebView and WebPage URLs not updated after URL is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame https://bugs.webkit.org/show_bug.cgi?id=146306 Reviewed by Darin Adler. Add unit test to check that the committed URL is updated when changed in willSendRequest callback. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformEfl.cmake: * TestWebKitAPI/PlatformGTK.cmake: * TestWebKitAPI/Tests/WebKit2/ProvisionalURLAfterWillSendRequestCallback.cpp: Added. (TestWebKitAPI::didCommitLoadForFrame): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/ProvisionalURLAfterWillSendRequestCallback_Bundle.cpp: Added. (TestWebKitAPI::ProvisionalURLAfterWillSendRequestCallbackTest::ProvisionalURLAfterWillSendRequestCallbackTest): (TestWebKitAPI::ProvisionalURLAfterWillSendRequestCallbackTest::willSendRequestForFrame): (TestWebKitAPI::ProvisionalURLAfterWillSendRequestCallbackTest::didCommitLoadForFrame): 2016-10-07 Andreas Kling [WK2] didRemoveFrameFromHierarchy callback doesn't fire for subframes when evicting from PageCache. Reviewed by Antti Koivisto. Add an API test that puts a 10-subframe page into the page cache, then loads other pages until the first page gets kicked out. The test succeeds if we receive didRemoveFrameFromHierarchy callbacks for all the subframes. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit2/DidRemoveFrameFromHiearchyInPageCache.cpp: Added. (TestWebKitAPI::didFinishLoadForFrame): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didReceivePageMessageFromInjectedBundle): (TestWebKitAPI::setInjectedBundleClient): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp: Added. (TestWebKitAPI::didRemoveFrameFromHierarchyCallback): (TestWebKitAPI::DidRemoveFrameFromHiearchyInPageCacheTest::DidRemoveFrameFromHiearchyInPageCacheTest): (TestWebKitAPI::DidRemoveFrameFromHiearchyInPageCacheTest::didCreatePage): * TestWebKitAPI/Tests/WebKit2/many-iframes.html: Added. 2016-09-28 Michael Catanzaro [GTK] Add Chrome UA quirk https://bugs.webkit.org/show_bug.cgi?id=162617 Reviewed by Carlos Garcia Campos. Update test. This portion of the commit was actually unreviewed. * TestWebKitAPI/Tests/WebCore/gtk/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2016-09-27 Michael Catanzaro [GTK] Install binaries to pkglibexecdir rather than bindir https://bugs.webkit.org/show_bug.cgi?id=162602 Reviewed by Carlos Garcia Campos. Install MiniBrowser to LIBEXEC_INSTALL_DIR rather than EXEC_INSTALL_DIR. * MiniBrowser/gtk/CMakeLists.txt: 2016-09-27 Michael Catanzaro [GTK] Disable ACCELERATED_2D_CANVAS when using build-webkit https://bugs.webkit.org/show_bug.cgi?id=162600 Reviewed by Carlos Garcia Campos. * Scripts/webkitperl/FeatureList.pm: 2016-09-26 Tomas Popela [GTK] TestContextMenu is failing https://bugs.webkit.org/show_bug.cgi?id=162569 We cannot use the MP3 file in the TestContextMenu, as it will not work by default on most distributions (that don't have an MP3 codecs installed). Change the test to use OGG file instead. Reviewed by Michael Catanzaro. * TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp: (testContextMenuDefaultMenu): 2016-09-23 Carlos Garcia Campos REGRESSION(r204163): [GTK] API test /webkit2/WebKitSecurityManager/file-xhr is failing https://bugs.webkit.org/show_bug.cgi?id=161607 Reviewed by Michael Catanzaro. Since r204163, in case of cross origin error when loading the XHR, the load fails and an error message is shown in the console, but there isn't any js expcetion, which is what we were checking. Now, we check that there aren't exceptions, and that the error message is sent to the console. * Scripts/run-gtk-tests: (TestRunner): * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp: (consoleMessageReceivedCallback): (testWebContextSecurityFileXHR): 2016-09-23 Carlos Garcia Campos [GTK] Make all WebView tests have a WebKitUserContentManager https://bugs.webkit.org/show_bug.cgi?id=162487 Reviewed by Michael Catanzaro. It simplifies tests using the user content manager, and allows to use it without having to subclass WebViewTest. * TestWebKitAPI/Tests/WebKit2Gtk/TestConsoleMessage.cpp: (ConsoleMessageTest::ConsoleMessageTest): (ConsoleMessageTest::~ConsoleMessageTest): * TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp: * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp: (testUserContentManagerInjectedStyleSheet): (testUserContentManagerInjectedScript): (UserScriptMessageTest::UserScriptMessageTest): (beforeAll): * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp: (testWebViewIsPlayingAudio): * TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp: (WebViewTest::WebViewTest): * TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h: 2016-09-23 Carlos Garcia Campos REGRESSION(r194387): Crash on github.com in IntlDateTimeFormat::resolvedOptions in C locale https://bugs.webkit.org/show_bug.cgi?id=162139 Reviewed by Michael Catanzaro. Add test cases to check the behavior when using the C locale and an invalid locale. * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp: (testWebContextLanguages): 2016-09-08 Yusuke Suzuki [WTF] HashTable's rehash is not compatible to Ref and ASan https://bugs.webkit.org/show_bug.cgi?id=161763 Reviewed by Mark Lam. Add tests that inserts many Ref<>s. It incurs HashTable::rehash, and we can ensure that ASan crash does not occur with this patch. * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::TEST): 2016-08-31 Filip Pizlo Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression https://bugs.webkit.org/show_bug.cgi?id=160125 Reviewed by Geoffrey Garen and Keith Miller. * DumpRenderTree/TestRunner.cpp: * DumpRenderTree/mac/DumpRenderTree.mm: (DumpRenderTreeMain): * Scripts/run-jsc-stress-tests: * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): 2016-09-03 Youenn Fablet run-webkit-tests should detect w3c test resource files https://bugs.webkit.org/show_bug.cgi?id=161307 Reviewed by Ryosuke Niwa. * Scripts/webkitpy/port/base.py: (Port.__init__): Adding self._w3c_resource_files to store the list of resource files. (Port.potential_test_names_from_expected_file): (Port._real_tests): (Port.is_w3c_resource_file): Computing whether a file is a resource file based on imported/w3c/resources/resource-files.json. (Port._is_test_file): Updated to call Port.is_w3c_resource_file. _is_test_file is no longer static. (Port): Deleted. * Scripts/webkitpy/port/base_unittest.py: (PortTest.test_additional_platform_directory): (PortTest.test_find_no_paths_specified): (PortTest.test_is_test_file): Updated to use non-static version of _is_test_file. (PortTest.test_is_w3c_resource_file): Adding tests. 2016-09-02 Tomas Popela [GTK] Fix compiler warning in MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=161529 We were missing a return statement in decidePermissionRequest() and also there was unused variable in browserWindowConstructed(). Reviewed by Carlos Garcia Campos. * MiniBrowser/gtk/BrowserTab.c: (decidePermissionRequest): * MiniBrowser/gtk/BrowserWindow.c: (browserWindowConstructed): 2016-08-30 Brent Fulgham Use of uninitialised memory in TransformationMatrx::blend4() https://bugs.webkit.org/show_bug.cgi?id=134621 Reviewed by Dean Jackson. Change is based on the Blink change (patch by ): * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp: Added. (TestWebKitAPI::TEST): 2016-08-30 Alex Christensen URLParser should handle relative URLs that start with // https://bugs.webkit.org/show_bug.cgi?id=161364 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkRelativeURL): (TestWebKitAPI::TEST_F): 2016-08-29 Aakash Jain EWS patch status page should indicate bot corresponding to each status message https://bugs.webkit.org/show_bug.cgi?id=161280 Reviewed by Alexey Proskuryakov. * QueueStatusServer/templates/patch.html: Formatting changes. 2016-08-29 Aakash Jain EWS should indicate which bot processed the patch https://bugs.webkit.org/show_bug.cgi?id=161222 Reviewed by Alexey Proskuryakov. * QueueStatusServer/handlers/statusbubble.py: (StatusBubble._build_bubble): Remove the bot id from bubbles as it is confusing. bot ids are now displayed in patch status page. 2016-08-29 Alex Christensen URLParser should parse about:blank https://bugs.webkit.org/show_bug.cgi?id=161324 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): 2016-08-29 JF Bastien Bug 161165 - check-webkit-style doesn't understand macros containing `else` or labels https://bugs.webkit.org/show_bug.cgi?id=161165 Reviewed by Geoffrey Garen. Fix handling of `else` in a macro. Don't handle labels in a macro: the checker is already pretty messy in that area and it should be a rare thing. * Scripts/webkitpy/style/checkers/cpp.py: (check_braces): * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTest.test_else_clause_not_on_same_line_as_else): 2016-08-29 Alex Christensen API test URLParserTest.ParserFailures failing ASSERT_NOT_REACHED https://bugs.webkit.org/show_bug.cgi?id=161317 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): 2016-08-29 Jer Noble Unreviewed gardening; only build MiniBrowser against iOS SDK targets. * Makefile: 2016-08-29 Jonathan Bedard Sample Process on notifyDone timed out https://bugs.webkit.org/show_bug.cgi?id=161063 Reviewed by Darin Adler. * Scripts/webkitpy/port/driver.py: (Driver._check_for_driver_timeout): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Call sample_process during notifyDone timeouts. (WTR::TestRunner::waitToDumpWatchdogTimerFired): * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: Log pid and name for testing harness. 2016-08-29 Jonathan Bedard Check-webkit-style does not work with Objective-C blocks https://bugs.webkit.org/show_bug.cgi?id=161247 Reviewed by Darin Adler. * Scripts/webkitpy/style/checkers/cpp.py: (regex_for_lambda_functions): Changed to regex_for_lambdas_and_blocks. (regex_for_lambdas_and_blocks): Added check for Objective-C blocks. (check_spacing_for_function_call): Pass file state for lambda check. (check_spacing): Pass file state for lambda check. (check_braces): Pass file state for lambda check. (check_style): Pass file state for lambda check. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTest.test_cpp_lambda_functions): Changed from ‘test_lambda_functions’. (CppStyleTest.test_objective_c_block): Tests Objective-C blocks. (CppStyleTest.test_lambda_functions): Changed to ‘test_cpp_lambda_functions’. 2016-08-29 Aakash Jain EWS patch status page should indicate bot corresponding to each status message https://bugs.webkit.org/show_bug.cgi?id=161280 Reviewed by Alexey Proskuryakov. * QueueStatusServer/templates/patch.html: Added bot_id in the template so that bot id is displayed for each status message. * QueueStatusServer/stylesheets/common.css: (.status-bot): Added corresponding stylesheet class. 2016-08-29 Per Arne Vollan Attempt to fix Windows build after r205090. Unreviewed build fix. * DumpRenderTree/win/DRTDataObject.cpp: (cfFileNameWFormat): (cfUrlWFormat): 2016-08-27 Alex Christensen URLParser should parse relative URLs https://bugs.webkit.org/show_bug.cgi?id=161282 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/StringView.cpp: (TestWebKitAPI::TEST): Added some tests for the new operator=. Test saving iterators, restoring iterators, and even assigning iterators to new CodePoints objects. Using the same iterator to iterate multiple objects is bad practice, but it's possible and now tested. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkRelativeURL): (TestWebKitAPI::checkURLDifferences): (TestWebKitAPI::shouldFail): Add some relative URL tests. 2016-08-27 Jonathan Bedard WTR needs an implementation of setAutomaticLinkDetectionEnabled https://bugs.webkit.org/show_bug.cgi?id=87162 Reviewed by Darin Adler. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Added setAutomaticLinkDetectionEnabled binding. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): Set automatic link detection to false by default. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition. * WebKitTestRunner/InjectedBundle/TestRunner.h: Added setAutomaticLinkDetectionEnabled declaration. 2016-08-27 Joseph Pecoraro Web Inspector: Make localizedString.js diff and commit friendly (UTF16 -> UTF8) https://bugs.webkit.org/show_bug.cgi?id=28685 Reviewed by Darin Adler. * Scripts/extract-localizable-js-strings: * Scripts/update-webkit-localizable-strings: WebInspectorUI localizedStrings.js is now UTF-8. Other clients of this script still use UTF-16, so keep that the default. 2016-08-27 Alexey Proskuryakov REGRESSION (r204052): Popovers on bot watcher's dashboard are broken https://bugs.webkit.org/show_bug.cgi?id=161254 Reviewed by Darin Adler. Simplify the CSS. My understanding that the CSS was correct, and the root cause is tracked in bug 160478. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Popover.css: 2016-08-27 Simon Fraser Add run-webkit-tests --print-expectations to show expectations for all or a subset of tests https://bugs.webkit.org/show_bug.cgi?id=161217 Reviewed by Ryosuke Niwa. "run-webkit-tests --print-expectations" runs the same logic as running the tests, but dumps out the lists of tests that would be run and skipped, and, for each, the entry in TestExpectations that determines the expected outcome of the test. This is an improved version of webkit-patch print-expectations. See bug for sample output. * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._print_expectations_for_subset): Print out the list of tests and expected outcome for some subset of tests. (Manager.print_expectations): Do the same splitting by device class that running tests does, and for each subset of tests, call _print_expectations_for_subset. * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser.expectation_for_skipped_test): Set the flag expectation_line.not_applicable_to_current_platform (TestExpectationLine.__init__): Init not_applicable_to_current_platform to False (TestExpectationLine.expected_behavior): line.expectation is ['PASS'] by default, even for skipped tests. This function returns a list relevant for display, taking the skipped modifier into account. (TestExpectationLine.create_passing_expectation): expectations is normally a list, not a set. (TestExpectations.readable_filename_and_line_number): Return something printable for lines with and without filenames * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (main): Handle options.print_expectations (parse_args): Add support for --print-expectations (_print_expectations): * Scripts/webkitpy/port/ios.py: (IOSSimulatorPort.default_child_processes): Make this a debug log. 2016-08-26 Dan Bernstein Keep trying to fix the build after r205057. * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj: 2016-08-26 Dan Bernstein Keep trying to fix the build after r205057. * MobileMiniBrowser/MobileMiniBrowser/AppDelegate.m: Don’t try to import nonexistent config.h. This file is only meant to be built with Xcode anyway. * MobileMiniBrowser/MobileMiniBrowser/Base.lproj/LaunchScreen.storyboard: Make this compile with Xcode 7.3 and deploy to iOS 9.0. * MobileMiniBrowser/MobileMiniBrowser/Base.lproj/Main.storyboard: Ditto. * MobileMiniBrowser/MobileMiniBrowser/TabViewController.m: Don’t try to import config.h. * MobileMiniBrowser/MobileMiniBrowser/WebViewController.m: Ditto. 2016-08-26 Dan Bernstein Start trying to fix the build after r205057. * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj: 2016-08-26 Alexey Proskuryakov Remove Yosemite Leaks from the flakiness dashboard https://bugs.webkit.org/show_bug.cgi?id=161253 Reviewed by Anders Carlsson. * TestResultServer/static-dashboards/builders.jsonp: 2016-08-26 Sam Weinig Remove support for ENABLE_LEGACY_WEB_AUDIO https://bugs.webkit.org/show_bug.cgi?id=161262 Reviewed by Anders Carlsson. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2016-08-26 Jer Noble Add a test harness for running UI tests on the iOS Simulator https://bugs.webkit.org/show_bug.cgi?id=161265 Reviewed by Simon Fraser. Add a new iOS Simulator application which uses WKWebView to implement a basic browser, and which can serve as a test harness for WebKit UI tests. Also add a basic media playback test which verifies that a