- Revision
- 215189
- Author
- [email protected]
- Date
- 2017-04-10 10:58:58 -0700 (Mon, 10 Apr 2017)
Log Message
REGRESSION (r214403): fast/events/drag-to-navigate.html and fast/events/only-valid-drop-targets-receive-file-drop.html failing
https://bugs.webkit.org/show_bug.cgi?id=170677
<rdar://problem/31512633>
Reviewed by Tim Horton.
Tools:
Fixes two drag and drop LayoutTests by introducing and enabling a TestOptions switch (enableDragDestinationActionLoad)
to allow dropping URLs to trigger page navigation.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/mac/UIDelegate.h:
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate resetToConsistentStateBeforeTesting:]):
(-[UIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
LayoutTests:
Turn enableDragDestinationActionLoad on in these two LayoutTests via WKTR options.
* fast/events/drag-to-navigate.html:
* fast/events/only-valid-drop-targets-receive-file-drop.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (215188 => 215189)
--- trunk/LayoutTests/ChangeLog 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/LayoutTests/ChangeLog 2017-04-10 17:58:58 UTC (rev 215189)
@@ -1,3 +1,16 @@
+2017-04-10 Wenson Hsieh <[email protected]>
+
+ REGRESSION (r214403): fast/events/drag-to-navigate.html and fast/events/only-valid-drop-targets-receive-file-drop.html failing
+ https://bugs.webkit.org/show_bug.cgi?id=170677
+ <rdar://problem/31512633>
+
+ Reviewed by Tim Horton.
+
+ Turn enableDragDestinationActionLoad on in these two LayoutTests via WKTR options.
+
+ * fast/events/drag-to-navigate.html:
+ * fast/events/only-valid-drop-targets-receive-file-drop.html:
+
2017-04-10 Ryan Haddad <[email protected]>
Mark media/modern-media-controls/volume-up-support/volume-up-support.html as flaky.
Modified: trunk/LayoutTests/fast/events/drag-to-navigate.html (215188 => 215189)
--- trunk/LayoutTests/fast/events/drag-to-navigate.html 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/LayoutTests/fast/events/drag-to-navigate.html 2017-04-10 17:58:58 UTC (rev 215189)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableDragDestinationActionLoad=true ] -->
<div>FAIL</div>
<script>
function doTest() {
Modified: trunk/LayoutTests/fast/events/only-valid-drop-targets-receive-file-drop.html (215188 => 215189)
--- trunk/LayoutTests/fast/events/only-valid-drop-targets-receive-file-drop.html 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/LayoutTests/fast/events/only-valid-drop-targets-receive-file-drop.html 2017-04-10 17:58:58 UTC (rev 215189)
@@ -1,3 +1,4 @@
+<!-- webkit-test-runner [ enableDragDestinationActionLoad=true ] -->
<!DOCTYPE html>
<html>
<head>
Modified: trunk/Tools/ChangeLog (215188 => 215189)
--- trunk/Tools/ChangeLog 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/Tools/ChangeLog 2017-04-10 17:58:58 UTC (rev 215189)
@@ -1,3 +1,24 @@
+2017-04-10 Wenson Hsieh <[email protected]>
+
+ REGRESSION (r214403): fast/events/drag-to-navigate.html and fast/events/only-valid-drop-targets-receive-file-drop.html failing
+ https://bugs.webkit.org/show_bug.cgi?id=170677
+ <rdar://problem/31512633>
+
+ Reviewed by Tim Horton.
+
+ Fixes two drag and drop LayoutTests by introducing and enabling a TestOptions switch (enableDragDestinationActionLoad)
+ to allow dropping URLs to trigger page navigation.
+
+ * DumpRenderTree/TestOptions.h:
+ * DumpRenderTree/TestOptions.mm:
+ (TestOptions::TestOptions):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/mac/UIDelegate.h:
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate resetToConsistentStateBeforeTesting:]):
+ (-[UIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
+
2017-04-10 Fujii Hironori <[email protected]>
update-webkit-dependency should report $response->message for diagnose
Modified: trunk/Tools/DumpRenderTree/TestOptions.h (215188 => 215189)
--- trunk/Tools/DumpRenderTree/TestOptions.h 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/Tools/DumpRenderTree/TestOptions.h 2017-04-10 17:58:58 UTC (rev 215189)
@@ -33,6 +33,7 @@
bool enableModernMediaControls { true };
bool enablePointerLock { false };
bool enableCredentialManagement { false };
+ bool enableDragDestinationActionLoad { false };
TestOptions(NSURL*, const TestCommand&);
};
Modified: trunk/Tools/DumpRenderTree/TestOptions.mm (215188 => 215189)
--- trunk/Tools/DumpRenderTree/TestOptions.mm 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/Tools/DumpRenderTree/TestOptions.mm 2017-04-10 17:58:58 UTC (rev 215189)
@@ -88,6 +88,8 @@
this->enablePointerLock = parseBooleanTestHeaderValue(value);
else if (key == "enableCredentialManagement")
this->enableCredentialManagement = parseBooleanTestHeaderValue(value);
+ else if (key == "enableDragDestinationActionLoad")
+ this->enableDragDestinationActionLoad = parseBooleanTestHeaderValue(value);
pairStart = pairEnd + 1;
}
}
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (215188 => 215189)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-04-10 17:58:58 UTC (rev 215189)
@@ -1795,6 +1795,7 @@
[webView setPolicyDelegate:defaultPolicyDelegate];
[policyDelegate setPermissive:NO];
[policyDelegate setControllerToNotifyDone:0];
+ [uiDelegate resetToConsistentStateBeforeTesting:options];
[frameLoadDelegate resetToConsistentState];
#if !PLATFORM(IOS)
[webView _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:NO];
Modified: trunk/Tools/DumpRenderTree/mac/UIDelegate.h (215188 => 215189)
--- trunk/Tools/DumpRenderTree/mac/UIDelegate.h 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/Tools/DumpRenderTree/mac/UIDelegate.h 2017-04-10 17:58:58 UTC (rev 215189)
@@ -25,6 +25,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+#import "TestOptions.h"
#if !PLATFORM(IOS)
#import <Cocoa/Cocoa.h>
@@ -39,10 +41,12 @@
NSPoint windowOrigin;
NSMutableSet *m_pendingGeolocationPermissionListeners;
NSTimer *m_timer;
+ BOOL m_enableDragDestinationActionLoad;
}
- (void)resetWindowOrigin;
- (void)didSetMockGeolocationPermission;
- (int)numberOfPendingGeolocationPermissionRequests;
+- (void)resetToConsistentStateBeforeTesting:(const TestOptions&)options;
@end
Modified: trunk/Tools/DumpRenderTree/mac/UIDelegate.mm (215188 => 215189)
--- trunk/Tools/DumpRenderTree/mac/UIDelegate.mm 2017-04-10 17:55:50 UTC (rev 215188)
+++ trunk/Tools/DumpRenderTree/mac/UIDelegate.mm 2017-04-10 17:58:58 UTC (rev 215189)
@@ -57,6 +57,11 @@
windowOrigin = NSZeroPoint;
}
+- (void)resetToConsistentStateBeforeTesting:(const TestOptions&)options
+{
+ m_enableDragDestinationActionLoad = options.enableDragDestinationActionLoad;
+}
+
- (void)webView:(WebView *)sender setFrame:(NSRect)frame
{
// FIXME: Do we need to resize an NSWindow too?
@@ -388,6 +393,18 @@
[resultListener chooseFilename:[filePaths firstObject]];
}
+#if !PLATFORM(IOS)
+
+- (NSUInteger)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
+{
+ WebDragDestinationAction actions = WebDragDestinationActionAny;
+ if (!m_enableDragDestinationActionLoad)
+ actions &= ~WebDragDestinationActionLoad;
+ return actions;
+}
+
+#endif
+
- (void)dealloc
{
#if !PLATFORM(IOS)