Title: [200590] trunk
Revision
200590
Author
simon.fra...@apple.com
Date
2016-05-09 13:22:58 -0700 (Mon, 09 May 2016)

Log Message

Remove testRunner.setTextAutosizingEnabled and migrate the one test that uses it
https://bugs.webkit.org/show_bug.cgi?id=157480

Reviewed by Zalan Bujtas.

Migrate the one test that used testRunner.setTextAutosizingEnabled() to window.internals.settings.setTextAutosizingEnabled()
and move it next to the other iOS text autosizing tests.
Tools:

Remove testRunner.setTextAutosizingEnabled(), which was only implemented in DumpRenderTree.

* DumpRenderTree/TestRunner.cpp:
(setTextAutosizingEnabledCallback): Deleted.
(TestRunner::staticFunctions): Deleted.
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setTextAutosizingEnabled): Deleted.

LayoutTests:

* fast/text-autosizing/ios/textarea-auto-sizing-disable-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt.
* fast/text-autosizing/ios/textarea-auto-sizing-disable.html: Renamed from LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html.
* platform/ios-simulator/TestExpectations:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (200589 => 200590)


--- trunk/LayoutTests/ChangeLog	2016-05-09 20:22:54 UTC (rev 200589)
+++ trunk/LayoutTests/ChangeLog	2016-05-09 20:22:58 UTC (rev 200590)
@@ -1,5 +1,19 @@
 2016-05-09  Simon Fraser  <simon.fra...@apple.com>
 
+        Remove testRunner.setTextAutosizingEnabled and migrate the one test that uses it
+        https://bugs.webkit.org/show_bug.cgi?id=157480
+
+        Reviewed by Zalan Bujtas.
+
+        Migrate the one test that used testRunner.setTextAutosizingEnabled() to window.internals.settings.setTextAutosizingEnabled()
+        and move it next to the other iOS text autosizing tests.
+
+        * fast/text-autosizing/ios/textarea-auto-sizing-disable-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt.
+        * fast/text-autosizing/ios/textarea-auto-sizing-disable.html: Renamed from LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html.
+        * platform/ios-simulator/TestExpectations:
+
+2016-05-09  Simon Fraser  <simon.fra...@apple.com>
+
         Upstream some iOS text autosizing tests.
 
         * fast/text-autosizing/ios/anonymous-block.html: Added.

Copied: trunk/LayoutTests/fast/text-autosizing/ios/textarea-auto-sizing-disable-expected.txt (from rev 200589, trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt) (0 => 200590)


--- trunk/LayoutTests/fast/text-autosizing/ios/textarea-auto-sizing-disable-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/textarea-auto-sizing-disable-expected.txt	2016-05-09 20:22:58 UTC (rev 200590)
@@ -0,0 +1,2 @@
+
+SUCCESS

Copied: trunk/LayoutTests/fast/text-autosizing/ios/textarea-auto-sizing-disable.html (from rev 200589, trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html) (0 => 200590)


--- trunk/LayoutTests/fast/text-autosizing/ios/textarea-auto-sizing-disable.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text-autosizing/ios/textarea-auto-sizing-disable.html	2016-05-09 20:22:58 UTC (rev 200590)
@@ -0,0 +1,55 @@
+<html>
+<head>
+    <title>TextArea auto-sizing test</title>
+    <script type="text/_javascript_">
+        
+        if (window.testRunner)
+            window.testRunner.waitUntilDone();
+                
+        function doTest() 
+        {
+            if (!window.testRunner)
+                return;
+
+            if (!window.eventSender)
+                return;
+
+            window.internals.settings.setTextAutosizingEnabled(true);
+            window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
+            
+            var obj = document.getElementById('test');
+            var oldHeight = obj.offsetHeight;
+            
+            eventSender.mouseMoveTo(obj.offsetLeft+10, obj.offsetTop+20);
+            eventSender.mouseDown();
+            eventSender.mouseUp();
+        
+            eventSender.keyDown("\n")
+            eventSender.keyDown('A');
+            eventSender.keyDown('B');
+            eventSender.keyDown('\n');
+            
+            // Textarea height shouldn't change after we add new lines.
+            document.getElementById("result").innerHTML= obj.offsetHeight == oldHeight ? 'SUCCESS' : 'FAIL';
+            
+            testRunner.dumpAsText();
+            testRunner.notifyDone();
+        }
+    </script>
+</head>
+
+<body _onload_="doTest()">
+<textarea id="test" rows="12" style="width:100%">
+    a
+    b
+    c
+    d
+    e
+    f
+    g
+    h
+    i
+</textarea>
+<div id="result"></div>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (200589 => 200590)


--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-05-09 20:22:54 UTC (rev 200589)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-05-09 20:22:58 UTC (rev 200590)
@@ -119,7 +119,6 @@
 platform/ios-simulator/ios/fast/forms/range-input-container-touches.html [ Skip ]
 platform/ios-simulator/ios/fast/forms/range-input-readonly-and-disabled.html [ Skip ]
 platform/ios-simulator/ios/fast/forms/range-input-touches.html [ Skip ]
-platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html [ Skip ]
 platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled.html [ Skip ]
 platform/ios-simulator/ios/fast/text/data-detectors/phone.html [ Skip ]
 

Deleted: trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt (200589 => 200590)


--- trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt	2016-05-09 20:22:54 UTC (rev 200589)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt	2016-05-09 20:22:58 UTC (rev 200590)
@@ -1,2 +0,0 @@
-
-SUCCESS

Deleted: trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html (200589 => 200590)


--- trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html	2016-05-09 20:22:54 UTC (rev 200589)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html	2016-05-09 20:22:58 UTC (rev 200590)
@@ -1,55 +0,0 @@
-<html>
-<head>
-    <title>TextArea auto-sizing test</title>
-    <script type="text/_javascript_">
-        
-        if (window.testRunner)
-            window.testRunner.waitUntilDone();
-                
-        function doTest() 
-        {
-            if (!window.testRunner)
-                return;
-
-            if (!window.eventSender)
-                return;
-
-            // Enable autosizing
-            testRunner.setTextAutosizingEnabled(true);
-            
-            var obj = document.getElementById('test');
-            var oldHeight = obj.offsetHeight;
-            
-            eventSender.mouseMoveTo(obj.offsetLeft+10, obj.offsetTop+20);
-            eventSender.mouseDown();
-            eventSender.mouseUp();
-        
-            eventSender.keyDown("\n")
-            eventSender.keyDown('A');
-            eventSender.keyDown('B');
-            eventSender.keyDown('\n');
-            
-            // Textarea heigth shouldn't change after we add new lines.
-            document.getElementById("result").innerHTML= obj.offsetHeight == oldHeight ? 'SUCCESS' : 'FAIL';
-            
-            testRunner.dumpAsText();
-            testRunner.notifyDone();
-        }
-    </script>
-</head>
-
-<body _onload_="doTest()">
-<textarea id="test" rows="12" style="width:100%">
-    a
-    b
-    c
-    d
-    e
-    f
-    g
-    h
-    i
-</textarea>
-<div id="result"></div>
-</body>
-</html>

Modified: trunk/Tools/ChangeLog (200589 => 200590)


--- trunk/Tools/ChangeLog	2016-05-09 20:22:54 UTC (rev 200589)
+++ trunk/Tools/ChangeLog	2016-05-09 20:22:58 UTC (rev 200590)
@@ -1,3 +1,21 @@
+2016-05-09  Simon Fraser  <simon.fra...@apple.com>
+
+        Remove testRunner.setTextAutosizingEnabled and migrate the one test that uses it
+        https://bugs.webkit.org/show_bug.cgi?id=157480
+
+        Reviewed by Zalan Bujtas.
+
+        Migrate the one test that used testRunner.setTextAutosizingEnabled() to window.internals.settings.setTextAutosizingEnabled()
+        and move it next to the other iOS text autosizing tests.
+        
+        Remove testRunner.setTextAutosizingEnabled(), which was only implemented in DumpRenderTree.
+
+        * DumpRenderTree/TestRunner.cpp:
+        (setTextAutosizingEnabledCallback): Deleted.
+        (TestRunner::staticFunctions): Deleted.
+        * DumpRenderTree/mac/TestRunnerMac.mm:
+        (TestRunner::setTextAutosizingEnabled): Deleted.
+
 2016-05-07  Darin Adler  <da...@apple.com>
 
         Next step on dictionary bindings, along with other bindings refinements

Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (200589 => 200590)


--- trunk/Tools/DumpRenderTree/TestRunner.cpp	2016-05-09 20:22:54 UTC (rev 200589)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp	2016-05-09 20:22:58 UTC (rev 200590)
@@ -1244,19 +1244,6 @@
 }
 #endif
 
-#if ENABLE(IOS_TEXT_AUTOSIZING)
-static JSValueRef setTextAutosizingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount < 1)
-        return JSValueMakeUndefined(context);
-    
-    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-    controller->setTextAutosizingEnabled(JSValueToBoolean(context, arguments[0]));
-    
-    return JSValueMakeUndefined(context);
-}
-#endif
-
 static JSValueRef setUseDashboardCompatibilityModeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac implementation
@@ -2146,9 +2133,6 @@
         { "setTelephoneNumberParsingEnabled", setTelephoneNumberParsingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setPagePaused", setPagePausedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
 #endif
-#if ENABLE(IOS_TEXT_AUTOSIZING)
-        { "setTextAutosizingEnabled", setTextAutosizingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-#endif
         { "setUseDashboardCompatibilityMode", setUseDashboardCompatibilityModeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setUserStyleSheetEnabled", setUserStyleSheetEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setUserStyleSheetLocation", setUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },

Modified: trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm (200589 => 200590)


--- trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm	2016-05-09 20:22:54 UTC (rev 200589)
+++ trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm	2016-05-09 20:22:58 UTC (rev 200590)
@@ -536,13 +536,6 @@
 }
 #endif
 
-#if ENABLE(IOS_TEXT_AUTOSIZING)
-void TestRunner::setTextAutosizingEnabled(bool enabled)
-{
-    [[[mainFrame webView] preferences] _setTextAutosizingEnabled:enabled];
-}
-#endif
-
 void TestRunner::setUseDashboardCompatibilityMode(bool flag)
 {
 #if !PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to