Title: [150090] trunk
Revision
150090
Author
a...@apple.com
Date
2013-05-14 15:20:51 -0700 (Tue, 14 May 2013)

Log Message

        [Mac] Add tests for secure event input
        https://bugs.webkit.org/show_bug.cgi?id=116121

        Reviewed by Mark Rowe.

        * editing/secure-input: Added.
        * editing/secure-input/password-input-changed-type-expected.txt: Added.
        * editing/secure-input/password-input-changed-type.html: Added.
        * editing/secure-input/password-input-focusing-expected.txt: Added.
        * editing/secure-input/password-input-focusing-to-different-frame-expected.txt: Added.
        * editing/secure-input/password-input-focusing-to-different-frame.html: Added.
        * editing/secure-input/password-input-focusing.html: Added.
        * editing/secure-input/removed-password-input-expected.txt: Added.
        * editing/secure-input/removed-password-input.html: Added.
        * editing/secure-input/reset-state-on-navigation-expected.txt: Added.
        * editing/secure-input/reset-state-on-navigation.html: Added.
        * editing/secure-input/resources: Added.
        * editing/secure-input/resources/reset-state-on-navigation-target.html: Added.
        * platform/efl/TestExpectations:
        * platform/gtk/TestExpectations:
        * platform/mac-wk2/TestExpectations:
        * platform/mac/TestExpectations:
        * platform/qt/TestExpectations:
        * platform/win/TestExpectations:
        * platform/wincairo/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (150089 => 150090)


--- trunk/LayoutTests/ChangeLog	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/ChangeLog	2013-05-14 22:20:51 UTC (rev 150090)
@@ -1,3 +1,31 @@
+2013-05-14  Alexey Proskuryakov  <a...@apple.com>
+
+        [Mac] Add tests for secure event input
+        https://bugs.webkit.org/show_bug.cgi?id=116121
+
+        Reviewed by Mark Rowe.
+
+        * editing/secure-input: Added.
+        * editing/secure-input/password-input-changed-type-expected.txt: Added.
+        * editing/secure-input/password-input-changed-type.html: Added.
+        * editing/secure-input/password-input-focusing-expected.txt: Added.
+        * editing/secure-input/password-input-focusing-to-different-frame-expected.txt: Added.
+        * editing/secure-input/password-input-focusing-to-different-frame.html: Added.
+        * editing/secure-input/password-input-focusing.html: Added.
+        * editing/secure-input/removed-password-input-expected.txt: Added.
+        * editing/secure-input/removed-password-input.html: Added.
+        * editing/secure-input/reset-state-on-navigation-expected.txt: Added.
+        * editing/secure-input/reset-state-on-navigation.html: Added.
+        * editing/secure-input/resources: Added.
+        * editing/secure-input/resources/reset-state-on-navigation-target.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/win/TestExpectations:
+        * platform/wincairo/TestExpectations:
+
 2013-05-14  David Hyatt  <hy...@apple.com>
 
         REGRESSION (r147261): Many overlaid elements on united.com's account page

Added: trunk/LayoutTests/editing/secure-input/password-input-changed-type-expected.txt (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/password-input-changed-type-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/password-input-changed-type-expected.txt	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,17 @@
+Verify that changing a password input's type updates secure input state.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+A password input is focused:
+PASS testRunner.secureEventInputIsEnabled is true
+
+After changing the type to text:
+PASS testRunner.secureEventInputIsEnabled is false
+
+After changing the type back to password:
+PASS testRunner.secureEventInputIsEnabled is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/editing/secure-input/password-input-changed-type-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:eol-style

Added: trunk/LayoutTests/editing/secure-input/password-input-changed-type.html (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/password-input-changed-type.html	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/password-input-changed-type.html	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<input type=password>
+<script>
+
+description("Verify that changing a password input's type updates secure input state.");
+
+var passwordInput = document.getElementsByTagName("input")[0];
+
+debug("A password input is focused:");
+passwordInput.focus();
+shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+debug("\nAfter changing the type to text:");
+passwordInput.type = "text";
+shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+debug("\nAfter changing the type back to password:");
+passwordInput.type = "password";
+shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/editing/secure-input/password-input-changed-type.html
___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/editing/secure-input/password-input-focusing-expected.txt (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/password-input-focusing-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/password-input-focusing-expected.txt	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,20 @@
+Verify that basic focusing/unfocusing updates secure input state.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial state, no selection:
+PASS testRunner.secureEventInputIsEnabled is false
+
+A password input is focused:
+PASS testRunner.secureEventInputIsEnabled is true
+
+A regular text input is focused:
+PASS testRunner.secureEventInputIsEnabled is false
+
+A password input is focused again:
+PASS testRunner.secureEventInputIsEnabled is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 
Property changes on: trunk/LayoutTests/editing/secure-input/password-input-focusing-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:eol-style

Added: trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame-expected.txt (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame-expected.txt	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,35 @@
+Verify that changing focus to a different frame updates secure input state.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial state, no selection:
+PASS testRunner.secureEventInputIsEnabled is false
+
+A password input is focused:
+PASS document.activeElement is passwordInput
+PASS testRunner.secureEventInputIsEnabled is true
+
+A regular text input is focused with a mouse click:
+PASS frames[0].document.activeElement is textInput
+PASS testRunner.secureEventInputIsEnabled is false
+
+A password input is focused again with a mouse click:
+PASS document.activeElement is passwordInput
+PASS testRunner.secureEventInputIsEnabled is true
+
+A regular text input is focused with a tab:
+PASS frames[0].document.activeElement is textInput
+PASS testRunner.secureEventInputIsEnabled is false
+
+A password input is focused again with a tab:
+PASS document.activeElement is passwordInput
+PASS testRunner.secureEventInputIsEnabled is true
+
+Focus is made empty:
+PASS document.activeElement is document.body
+PASS testRunner.secureEventInputIsEnabled is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 
Property changes on: trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:eol-style

Added: trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame.html (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame.html	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame.html	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<input type=password>
+<iframe srcdoc="<input type=text>"></iframe>
+<script>
+
+description("Verify that changing focus to a different frame updates secure input state.");
+
+jsTestIsAsync = true;
+
+window._onload_ = function() {
+
+    passwordInput = document.getElementsByTagName("input")[0];
+    iframeElement = document.getElementsByTagName("iframe")[0];
+    textInput = frames[0].document.getElementsByTagName("input")[0];
+
+    debug("Initial state, no selection:");
+    shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+    debug("\nA password input is focused:");
+    passwordInput.focus();
+    shouldBe("document.activeElement", "passwordInput");
+    shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+    debug("\nA regular text input is focused with a mouse click:");
+    eventSender.mouseMoveTo(iframeElement.offsetLeft + textInput.offsetLeft + 5, iframeElement.offsetTop + textInput.offsetTop + 5);
+    eventSender.mouseDown(0);
+    eventSender.mouseUp(0);
+    shouldBe("frames[0].document.activeElement", "textInput");
+    shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+    debug("\nA password input is focused again with a mouse click:");
+    eventSender.mouseMoveTo(passwordInput.offsetLeft + 5, passwordInput.offsetTop + 5);
+    eventSender.mouseDown(0);
+    eventSender.mouseUp(0);
+    shouldBe("document.activeElement", "passwordInput");
+    shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+    debug("\nA regular text input is focused with a tab:");
+    eventSender.keyDown("\t");
+    shouldBe("frames[0].document.activeElement", "textInput");
+    shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+    debug("\nA password input is focused again with a tab:");
+    eventSender.keyDown("\t", ["Shift"]);
+    shouldBe("document.activeElement", "passwordInput");
+    shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+    debug("\nFocus is made empty:");
+    eventSender.mouseMoveTo(1, 1);
+    eventSender.mouseDown(0);
+    eventSender.mouseUp(0);
+    shouldBe("document.activeElement", "document.body");
+    shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+    finishJSTest();
+}
+
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/editing/secure-input/password-input-focusing-to-different-frame.html
___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/editing/secure-input/password-input-focusing.html (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/password-input-focusing.html	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/password-input-focusing.html	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<input type=password>
+<input type=text>
+<script>
+
+description("Verify that basic focusing/unfocusing updates secure input state.");
+
+var passwordInput = document.getElementsByTagName("input")[0];
+var textInput = document.getElementsByTagName("input")[1];
+
+debug("Initial state, no selection:");
+shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+debug("\nA password input is focused:");
+passwordInput.focus();
+shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+debug("\nA regular text input is focused:");
+textInput.focus();
+shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+debug("\nA password input is focused again:");
+passwordInput.focus();
+shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/editing/secure-input/password-input-focusing.html
___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/editing/secure-input/removed-password-input-expected.txt (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/removed-password-input-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/removed-password-input-expected.txt	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,14 @@
+Verify that removing a password input from DOM tree disables secure input state.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+A password input is focused:
+PASS testRunner.secureEventInputIsEnabled is true
+
+After deleting the input:
+FAIL testRunner.secureEventInputIsEnabled should be false. Was true.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/editing/secure-input/removed-password-input-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:eol-style

Added: trunk/LayoutTests/editing/secure-input/removed-password-input.html (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/removed-password-input.html	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/removed-password-input.html	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<input type=password>
+<script>
+
+description("Verify that removing a password input from DOM tree disables secure input state.");
+
+var passwordInput = document.getElementsByTagName("input")[0];
+
+debug("A password input is focused:");
+passwordInput.focus();
+shouldBe("testRunner.secureEventInputIsEnabled", "true");
+
+debug("\nAfter deleting the input:");
+document.body.removeChild(passwordInput);
+shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/editing/secure-input/removed-password-input.html
___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/editing/secure-input/reset-state-on-navigation-expected.txt (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/reset-state-on-navigation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/reset-state-on-navigation-expected.txt	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,10 @@
+Verify that secure input state is disabled when navigating away from a page with a focused password field.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS testRunner.secureEventInputIsEnabled is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/editing/secure-input/reset-state-on-navigation-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:eol-style

Added: trunk/LayoutTests/editing/secure-input/reset-state-on-navigation.html (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/reset-state-on-navigation.html	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/reset-state-on-navigation.html	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+<input type=password>
+<script>
+
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+var passwordInput = document.getElementsByTagName("input")[0];
+
+passwordInput.focus();
+if (!testRunner.secureEventInputIsEnabled)
+    alert("FAIL: Secure event input is not enabled after focusing a password input");
+
+location = "resources/reset-state-on-navigation-target.html";
+
+</script>
+</body>
+</html>
Property changes on: trunk/LayoutTests/editing/secure-input/reset-state-on-navigation.html
___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/editing/secure-input/resources/reset-state-on-navigation-target.html (0 => 150090)


--- trunk/LayoutTests/editing/secure-input/resources/reset-state-on-navigation-target.html	                        (rev 0)
+++ trunk/LayoutTests/editing/secure-input/resources/reset-state-on-navigation-target.html	2013-05-14 22:20:51 UTC (rev 150090)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<input type=password>
+<script>
+
+description("Verify that secure input state is disabled when navigating away from a page with a focused password field.");
+
+var passwordInput = document.getElementsByTagName("input")[0];
+
+shouldBe("testRunner.secureEventInputIsEnabled", "false");
+
+if (window.testRunner)
+    testRunner.notifyDone();
+
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/editing/secure-input/resources/reset-state-on-navigation-target.html
___________________________________________________________________

Added: svn:mime-type

Modified: trunk/LayoutTests/platform/efl/TestExpectations (150089 => 150090)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-05-14 22:20:51 UTC (rev 150090)
@@ -608,6 +608,9 @@
 webkit.org/b/105542 fast/canvas/canvas-blend-image.html [ Skip ]
 webkit.org/b/105542 fast/canvas/canvas-blend-solid.html [ Skip ]
 
+# No concept of secure text input
+editing/secure-input [ Failure ]
+
 #////////////////////////////////////////////////////////////////////////////////////////
 # CRASHES
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (150089 => 150090)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-05-14 22:20:51 UTC (rev 150090)
@@ -415,6 +415,9 @@
 webkit.org/b/115374 editing/shadow [ Skip ]
 webkit.org/b/115374 fast/dom/shadow [ Skip ]
 
+# No concept of secure text input
+editing/secure-input [ Failure ]
+
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Expected failures
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/mac/TestExpectations (150089 => 150090)


--- trunk/LayoutTests/platform/mac/TestExpectations	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2013-05-14 22:20:51 UTC (rev 150090)
@@ -1535,3 +1535,34 @@
 webkit.org/b/115292 fast/writing-mode/japanese-ruby-vertical-rl.html
 webkit.org/b/115292 fast/writing-mode/vertical-baseline-alignment.html
 webkit.org/b/115292 fast/writing-mode/vertical-font-fallback.html
+
+# Fails with WebKit1 only.
+editing/secure-input/reset-state-on-navigation.html [ Failure ]
+
+# Needs rebaseline after bug https://bugs.webkit.org/show_bug.cgi?id=52185
+webkit.org/b/52185 fast/table/007.html [ Failure Rebaseline ]
+webkit.org/b/52185 fast/table/colspanMinWidth.html [ Failure Rebaseline ]
+webkit.org/b/52185 fast/table/colspanMinWidth-vertical.html [ Failure Rebaseline ]
+webkit.org/b/52185 fast/table/spanOverlapRepaint.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug13169.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug133756-1.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug133756-2.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug17138.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug17548.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug220536.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug6304.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug73321.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug7714.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug86708.html [ ImageOnlyFailure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/bugs/bug8858.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/core/bloomberg.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/core/cell_heights.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla/other/test6.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla_expected_failures/bugs/bug1010.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla_expected_failures/bugs/bug131020-3.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla_expected_failures/bugs/bug23847.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla_expected_failures/bugs/bug58402-2.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla_expected_failures/bugs/bug65372.html [ Failure Rebaseline ]
+webkit.org/b/52185 tables/mozilla_expected_failures/bugs/bug6933.html [ Failure Rebaseline ]
+webkit.org/b/52185 accessibility/table-cells.html [ Failure Rebaseline ]
+webkit.org/b/52185 accessibility/table-attributes.html [ Failure Rebaseline ]

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (150089 => 150090)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2013-05-14 22:20:51 UTC (rev 150090)
@@ -314,6 +314,9 @@
 sputnik/Unicode/Unicode_218/S7.6_A2.4.html
 sputnik/Unicode/Unicode_218/S7.6_A5.2_T1.html
 
+# Unclear yet why this test fails.
+editing/secure-input/password-input-focusing-to-different-frame.html [ Failure ]
+
 ### END OF (3) Unclassified failures
 ########################################
 
@@ -331,6 +334,9 @@
 # Temporarily disabled while working out compositing failures
 plugins/snapshotting [ Skip ]
 
+# This test fails with WebKit1 only.
+editing/secure-input/reset-state-on-navigation.html [ Pass ]
+
 ### END OF (5) Features that are not supported in WebKit1, so skipped in mac/TestExpectations then re-enabled here
 ########################################
 

Modified: trunk/LayoutTests/platform/qt/TestExpectations (150089 => 150090)


--- trunk/LayoutTests/platform/qt/TestExpectations	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2013-05-14 22:20:51 UTC (rev 150090)
@@ -496,6 +496,9 @@
 # X-Content-Type-Options (ENABLE_NOSNIFF) is not enabled.
 http/tests/security/contentTypeOptions
 
+# No concept of secure text input other than on Mac; support not yet implemented on Mac.
+editing/secure-input [ Failure ]
+
 # =========================================================================== #
 #       Drag and Drop Support in DRT.                                         #
 # =========================================================================== #

Modified: trunk/LayoutTests/platform/win/TestExpectations (150089 => 150090)


--- trunk/LayoutTests/platform/win/TestExpectations	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/platform/win/TestExpectations	2013-05-14 22:20:51 UTC (rev 150090)
@@ -2742,3 +2742,6 @@
 compositing/filters/sw-layer-overlaps-hw-shadow.html
 compositing/filters/sw-shadow-overlaps-hw-layer.html
 compositing/filters/sw-shadow-overlaps-hw-shadow.html
+
+# No concept of secure text input
+editing/secure-input [ Failure ]

Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (150089 => 150090)


--- trunk/LayoutTests/platform/wincairo/TestExpectations	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations	2013-05-14 22:20:51 UTC (rev 150090)
@@ -2989,3 +2989,6 @@
 
 # Need support for ResourceHandle::didChangePriority and DRT support
 webkit.org/b/?????? http/tests/loading/promote-img-preload-priority.html [ Failure ]
+
+# No concept of secure text input
+editing/secure-input [ Failure ]

Modified: trunk/Tools/ChangeLog (150089 => 150090)


--- trunk/Tools/ChangeLog	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/Tools/ChangeLog	2013-05-14 22:20:51 UTC (rev 150090)
@@ -1,5 +1,26 @@
 2013-05-14  Alexey Proskuryakov  <a...@apple.com>
 
+        [Mac] Add tests for secure event input
+        https://bugs.webkit.org/show_bug.cgi?id=116121
+
+        Reviewed by Mark Rowe.
+
+        * DumpRenderTree/TestRunner.cpp:
+        (getSecureEventInputIsEnabledCallback):
+        (TestRunner::staticValues):
+        Expose an accessor for current secure event input state.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::secureEventInputIsEnabled):
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
+        Expose an accessor for current secure event input state. This has to be done in
+        UI process, as this is where it's changed by WebKit.
+
+2013-05-14  Alexey Proskuryakov  <a...@apple.com>
+
         [Mac] Add a testing shim for secure event input functions
         https://bugs.webkit.org/show_bug.cgi?id=116122
 

Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (150089 => 150090)


--- trunk/Tools/DumpRenderTree/TestRunner.cpp	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp	2013-05-14 22:20:51 UTC (rev 150090)
@@ -44,6 +44,10 @@
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/RefPtr.h>
 
+#if PLATFORM(MAC)
+#include <Carbon/Carbon.h>
+#endif
+
 const unsigned TestRunner::viewWidth = 800;
 const unsigned TestRunner::viewHeight = 600;
 
@@ -1834,6 +1838,11 @@
 }
 #endif
 
+static JSValueRef getSecureEventInputIsEnabledCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+    return JSValueMakeBoolean(context, IsSecureEventInputEnabled());
+}
+
 static JSValueRef getTitleTextDirectionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
     TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -2001,6 +2010,7 @@
 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(EFL)
         { "platformName", getPlatformNameCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
 #endif
+        { "secureEventInputIsEnabled", getSecureEventInputIsEnabledCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "titleTextDirection", getTitleTextDirectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0, 0 }
     };

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (150089 => 150090)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2013-05-14 22:20:51 UTC (rev 150090)
@@ -187,5 +187,8 @@
     void setHandlesAuthenticationChallenges(boolean value);
     void setAuthenticationUsername(DOMString username);
     void setAuthenticationPassword(DOMString password);
+
+    // Secure text input mode (Mac only)
+    readonly attribute boolean secureEventInputIsEnabled;
 };
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (150089 => 150090)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2013-05-14 22:20:51 UTC (rev 150090)
@@ -803,4 +803,13 @@
     WKBundlePostMessage(InjectedBundle::shared().bundle(), messageName.get(), messageBody.get());
 }
 
+bool TestRunner::secureEventInputIsEnabled() const
+{
+    WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SecureEventInputIsEnabled"));
+    WKTypeRef returnData = 0;
+
+    WKBundlePostSynchronousMessage(InjectedBundle::shared().bundle(), messageName.get(), 0, &returnData);
+    return WKBooleanGetValue(static_cast<WKBooleanRef>(returnData));
+}
+
 } // namespace WTR

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (150089 => 150090)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2013-05-14 22:20:51 UTC (rev 150090)
@@ -273,6 +273,8 @@
     void queueLoadingScript(JSStringRef script);
     void queueNonLoadingScript(JSStringRef script);
 
+    bool secureEventInputIsEnabled() const;
+
 private:
     static const double waitToDumpWatchdogTimerInterval;
 

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (150089 => 150090)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2013-05-14 22:20:51 UTC (rev 150090)
@@ -43,6 +43,7 @@
 #include <wtf/text/CString.h>
 
 #if PLATFORM(MAC)
+#include <Carbon/Carbon.h>
 #include <WebKit2/WKPagePrivateMac.h>
 #endif
 
@@ -663,6 +664,14 @@
         return result;
     }
 
+    if (WKStringIsEqualToUTF8CString(messageName, "SecureEventInputIsEnabled")) {
+#if PLATFORM(MAC)
+        WKRetainPtr<WKBooleanRef> result(AdoptWK, WKBooleanCreate(IsSecureEventInputEnabled()));
+#else
+        WKRetainPtr<WKBooleanRef> result(AdoptWK, WKBooleanCreate(false);
+#endif
+        return result;
+    }
     ASSERT_NOT_REACHED();
     return 0;
 }

Modified: trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (150089 => 150090)


--- trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2013-05-14 22:08:53 UTC (rev 150089)
+++ trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2013-05-14 22:20:51 UTC (rev 150090)
@@ -85,6 +85,7 @@
 		BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD7D2F711921278006DB7EE /* TestInvocation.cpp */; };
 		BCDA2B9A1191051F00C3BC47 /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCDA2B991191051F00C3BC47 /* _javascript_Core.framework */; };
 		C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0CE720A1247C93300BC0EC4 /* TestRunnerMac.mm */; };
+		E1BA671E1742DA6A00C20251 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1BA671D1742DA5A00C20251 /* Carbon.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -218,6 +219,7 @@
 		BCD7D2F711921278006DB7EE /* TestInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestInvocation.cpp; sourceTree = "<group>"; };
 		BCDA2B991191051F00C3BC47 /* _javascript_Core.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = _javascript_Core.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		C0CE720A1247C93300BC0EC4 /* TestRunnerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestRunnerMac.mm; path = mac/TestRunnerMac.mm; sourceTree = "<group>"; };
+		E1BA671D1742DA5A00C20251 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -228,6 +230,7 @@
 				BC7934A511906584005EA8E2 /* Cocoa.framework in Frameworks */,
 				BCDA2B9A1191051F00C3BC47 /* _javascript_Core.framework in Frameworks */,
 				0F5169CB1445222D00E0A9D7 /* WebKit.framework in Frameworks */,
+				E1BA671E1742DA6A00C20251 /* Carbon.framework in Frameworks */,
 				BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -291,6 +294,7 @@
 		08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = {
 			isa = PBXGroup;
 			children = (
+				E1BA671D1742DA5A00C20251 /* Carbon.framework */,
 				BC7934A411906584005EA8E2 /* Cocoa.framework */,
 				BCDA2B991191051F00C3BC47 /* _javascript_Core.framework */,
 				41230E16138C78BF00BCCFCA /* libWebCoreTestSupport.dylib */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to