https://bugs.webkit.org/show_bug.cgi?id=149415
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2015 03:06:04 +0000 (03:06 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2015 03:06:04 +0000 (03:06 +0000)
REGRESSION (r182648): UIWebView does not set location.hash synchronously
<rdar://problem/22169467>

Reviewed by Darin Adler.

* fast/loader/location-hash-user-gesture-expected.txt: Added.
* fast/loader/location-hash-user-gesture.html: Added.
* platform/ios-simulator-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190100 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/loader/location-hash-user-gesture-expected.txt [new file with mode: 0644]
LayoutTests/fast/loader/location-hash-user-gesture.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator-wk2/TestExpectations

index 31ce96d..6d1c9f9 100644 (file)
@@ -1,3 +1,15 @@
+2015-09-21  Alexey Proskuryakov  <ap@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=149415
+        REGRESSION (r182648): UIWebView does not set location.hash synchronously
+        <rdar://problem/22169467>
+
+        Reviewed by Darin Adler.
+
+        * fast/loader/location-hash-user-gesture-expected.txt: Added.
+        * fast/loader/location-hash-user-gesture.html: Added.
+        * platform/ios-simulator-wk2/TestExpectations:
+
 2015-09-21  Chris Dumez  <cdumez@apple.com>
 
         Update HTMLTableRowElement.rowIndex to behave according to the specification
diff --git a/LayoutTests/fast/loader/location-hash-user-gesture-expected.txt b/LayoutTests/fast/loader/location-hash-user-gesture-expected.txt
new file mode 100644 (file)
index 0000000..ec14e57
--- /dev/null
@@ -0,0 +1,10 @@
+Test that location.hash is set synchronously even when handling a user gesture (see bug 149415).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS location.hash is '#x'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/loader/location-hash-user-gesture.html b/LayoutTests/fast/loader/location-hash-user-gesture.html
new file mode 100644 (file)
index 0000000..69371ca
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+
+description("Test that location.hash is set synchronously even when handling a user gesture (see bug 149415).");
+
+jsTestIsAsync = true;
+
+function test()
+{
+    location.hash = "x";
+    shouldBe("location.hash", "'#x'");
+    finishJSTest();
+}
+
+function clickOn(element)
+{
+    if (!window.eventSender)
+        return;
+    var rect = element.getBoundingClientRect();
+    var x = rect.left + rect.width / 2;
+    var y = rect.top + rect.height / 2;
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+}
+
+onload = function() {
+    clickOn(document.getElementsByTagName("button")[0]);
+}
+
+</script>
+<button onclick="test()"></button>
+</body>
+</html>
index bc5cc89..34922b2 100644 (file)
@@ -2064,3 +2064,6 @@ webkit.org/b/148709 fast/events/wheelevent-basic.html [ Skip ]
 webkit.org/b/148709 fast/events/wheelevent-mousewheel-interaction.html [ Skip ]
 
 webkit.org/b/123431 http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html [ Pass Failure ]
+
+# eventSender.mouseDown is not implemented
+fast/loader/location-hash-user-gesture.html [ Skip ]