Changeset 188988 in webkit
- Timestamp:
- Aug 26, 2015 2:15:49 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r188971 r188988 1 2015-08-26 Andy Estes <aestes@apple.com> 2 3 Crash when following a Google search link to Twitter with Limit Adult Content enabled 4 https://bugs.webkit.org/show_bug.cgi?id=147651 5 6 Rubber-stamped by Brady Eidson. 7 8 Added a layout test. 9 10 * http/tests/contentfiltering/load-substitute-data-from-appcache-expected.txt: Added. 11 * http/tests/contentfiltering/load-substitute-data-from-appcache.html: Added. 12 * http/tests/contentfiltering/resources/appcache.html: Added. 13 * http/tests/contentfiltering/resources/appcache.manifest: Added. 14 * platform/mac-wk1/TestExpectations: 15 1 16 2015-08-26 Tim Horton <timothy_horton@apple.com> 2 17 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r188793 r188988 142 142 ### END OF (2) Failures without bug reports 143 143 ######################################## 144 145 # This test is WebKit2-only 146 http/tests/contentfiltering/load-substitute-data-from-appcache.html -
trunk/Tools/ChangeLog
r188982 r188988 1 2015-08-26 Andy Estes <aestes@apple.com> 2 3 Crash when following a Google search link to Twitter with Limit Adult Content enabled 4 https://bugs.webkit.org/show_bug.cgi?id=147651 5 6 Rubber-stamped by Brady Eidson. 7 8 Taught TestRunner how to decide the navigation policy after a delay. 9 10 * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: 11 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 12 (WTR::InjectedBundlePage::decidePolicyForNavigationAction): 13 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 14 (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): 15 * WebKitTestRunner/InjectedBundle/TestRunner.h: 16 (WTR::TestRunner::shouldDecideNavigationPolicyAfterDelay): 17 * WebKitTestRunner/TestController.cpp: 18 (WTR::TestController::initialize): 19 (WTR::TestController::resetStateToConsistentValues): 20 (WTR::TestController::decidePolicyForNavigationAction): 21 * WebKitTestRunner/TestController.h: 22 (WTR::TestController::setShouldDecideNavigationPolicyAfterDelay): 23 * WebKitTestRunner/TestInvocation.cpp: 24 (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): 25 1 26 2015-08-26 Brent Fulgham <bfulgham@apple.com> 2 27 -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
r188598 r188988 76 76 void setAsynchronousSpellCheckingEnabled(boolean value); 77 77 void setPrinting(); 78 void setShouldDecideNavigationPolicyAfterDelay(boolean value); 78 79 79 80 // Special DOM functions. -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r186982 r188988 1287 1287 } 1288 1288 1289 if (injectedBundle.testRunner()->shouldDecideNavigationPolicyAfterDelay()) 1290 return WKBundlePagePolicyActionPassThrough; 1291 1289 1292 if (!injectedBundle.testRunner()->isPolicyDelegateEnabled()) 1290 1293 return WKBundlePagePolicyActionUse; -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r188828 r188988 853 853 } 854 854 855 void TestRunner::setShouldDecideNavigationPolicyAfterDelay(bool value) 856 { 857 m_shouldDecideNavigationPolicyAfterDelay = value; 858 WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetShouldDecideNavigationPolicyAfterDelay")); 859 WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(value)); 860 WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get()); 861 } 862 855 863 } // namespace WTR -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r188598 r188988 284 284 JSValueRef neverInlineFunction(JSValueRef theFunction); 285 285 286 bool shouldDecideNavigationPolicyAfterDelay() const { return m_shouldDecideNavigationPolicyAfterDelay; } 287 void setShouldDecideNavigationPolicyAfterDelay(bool); 288 286 289 private: 287 290 TestRunner(); … … 334 337 double m_databaseMaxQuota; 335 338 339 bool m_shouldDecideNavigationPolicyAfterDelay { false }; 340 336 341 bool m_userStyleSheetEnabled; 337 342 WKRetainPtr<WKStringRef> m_userStyleSheetLocation; -
trunk/Tools/WebKitTestRunner/TestController.cpp
r188958 r188988 57 57 #include <stdlib.h> 58 58 #include <string> 59 #include <wtf/RunLoop.h> 59 60 #include <wtf/text/CString.h> 60 61 … … 313 314 void TestController::initialize(int argc, const char* argv[]) 314 315 { 316 RunLoop::initializeMainRunLoop(); 317 315 318 platformInitialize(); 316 319 … … 725 728 m_doneResetting = false; 726 729 730 m_shouldDecideNavigationPolicyAfterDelay = false; 731 727 732 WKPageLoadURL(m_mainWebView->page(), blankURL()); 728 733 runUntil(m_doneResetting, shortTimeout); … … 1494 1499 void TestController::decidePolicyForNavigationAction(WKFramePolicyListenerRef listener) 1495 1500 { 1496 if (m_policyDelegateEnabled && !m_policyDelegatePermissive) { 1497 WKFramePolicyListenerIgnore(listener); 1498 return; 1499 } 1500 1501 WKFramePolicyListenerUse(listener); 1501 WKRetainPtr<WKFramePolicyListenerRef> retainedListener { listener }; 1502 const bool shouldIgnore { m_policyDelegateEnabled && !m_policyDelegatePermissive }; 1503 std::function<void()> decisionFunction = [shouldIgnore, retainedListener]() { 1504 if (shouldIgnore) 1505 WKFramePolicyListenerIgnore(retainedListener.get()); 1506 else 1507 WKFramePolicyListenerUse(retainedListener.get()); 1508 }; 1509 1510 if (m_shouldDecideNavigationPolicyAfterDelay) 1511 RunLoop::main().dispatch(decisionFunction); 1512 else 1513 decisionFunction(); 1502 1514 } 1503 1515 -
trunk/Tools/WebKitTestRunner/TestController.h
r188828 r188988 125 125 bool isCurrentInvocation(TestInvocation* invocation) const { return invocation == m_currentInvocation.get(); } 126 126 127 void setShouldDecideNavigationPolicyAfterDelay(bool value) { m_shouldDecideNavigationPolicyAfterDelay = value; } 128 127 129 private: 128 130 void initialize(int argc, const char* argv[]); … … 286 288 bool m_shouldShowWebView; 287 289 290 bool m_shouldDecideNavigationPolicyAfterDelay { false }; 291 288 292 std::unique_ptr<EventSenderProxy> m_eventSenderProxy; 289 293 -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r188828 r188988 629 629 } 630 630 631 if (WKStringIsEqualToUTF8CString(messageName, "SetShouldDecideNavigationPolicyAfterDelay")) { 632 ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID()); 633 WKBooleanRef value = static_cast<WKBooleanRef>(messageBody); 634 TestController::singleton().setShouldDecideNavigationPolicyAfterDelay(WKBooleanGetValue(value)); 635 return; 636 } 637 631 638 ASSERT_NOT_REACHED(); 632 639 }
Note: See TracChangeset
for help on using the changeset viewer.