Title: [141080] trunk/Source/WebKit/chromium
Revision
141080
Author
commit-qu...@webkit.org
Date
2013-01-29 01:16:00 -0800 (Tue, 29 Jan 2013)

Log Message

Unreviewed, rolling out r141064.
http://trac.webkit.org/changeset/141064
https://bugs.webkit.org/show_bug.cgi?id=108166

[Chromium] WebFrameTest.DivScrollIntoEditableTest is failing
on WinXP. (Requested by keishi on #webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2013-01-29

* tests/WebFrameTest.cpp:
* tests/data/get_scale_for_zoom_into_editable_test.html:

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (141079 => 141080)


--- trunk/Source/WebKit/chromium/ChangeLog	2013-01-29 08:58:58 UTC (rev 141079)
+++ trunk/Source/WebKit/chromium/ChangeLog	2013-01-29 09:16:00 UTC (rev 141080)
@@ -1,3 +1,15 @@
+2013-01-29  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r141064.
+        http://trac.webkit.org/changeset/141064
+        https://bugs.webkit.org/show_bug.cgi?id=108166
+
+        [Chromium] WebFrameTest.DivScrollIntoEditableTest is failing
+        on WinXP. (Requested by keishi on #webkit).
+
+        * tests/WebFrameTest.cpp:
+        * tests/data/get_scale_for_zoom_into_editable_test.html:
+
 2013-01-29  Keishi Hattori  <kei...@webkit.org>
 
         [Chromium] Disabling WebFrameTest.DisambiguationPopup because it is failing.

Modified: trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp (141079 => 141080)


--- trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp	2013-01-29 08:58:58 UTC (rev 141079)
+++ trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp	2013-01-29 09:16:00 UTC (rev 141080)
@@ -927,45 +927,47 @@
 }
 #endif
 
-TEST_F(WebFrameTest, DivScrollIntoEditableTest)
+// This test depends on code that is compiled conditionally. We likely need to
+// add the proper ifdef when re-enabling it. See
+// https://bugs.webkit.org/show_bug.cgi?id=98558
+TEST_F(WebFrameTest, DISABLED_DivScrollIntoEditableTest)
 {
     registerMockedHttpURLLoad("get_scale_for_zoom_into_editable_test.html");
 
     int viewportWidth = 640;
     int viewportHeight = 480;
+    float leftBoxRatio = 0.3f;
     int caretPadding = 10;
     int minReadableCaretHeight = 18;
     WebKit::WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "get_scale_for_zoom_into_editable_test.html");
     webView->enableFixedLayoutMode(true);
     webView->resize(WebSize(viewportWidth, viewportHeight));
-    webView->setPageScaleFactorLimits(1, 4);
+    webView->setPageScaleFactorLimits(1, 10);
     webView->layout();
     webView->setDeviceScaleFactor(1.5f);
     webView->settings()->setAutoZoomFocusedNodeToLegibleScale(true);
+
     WebViewImpl* webViewImpl = static_cast<WebViewImpl*>(webView);
     webViewImpl->shouldUseAnimateDoubleTapTimeZeroForTesting(true);
 
-    WebRect editBoxWithText(200, 200, 500, 20);
-    WebRect editBoxWithNoText(200, 250, 500, 20);
+    WebRect editBoxWithText(200, 200, 250, 20);
+    WebRect editBoxWithNoText(200, 250, 250, 20);
 
     // Test scrolling the focused node
     // The edit box is shorter and narrower than the viewport when legible.
-    webView->advanceFocus(false);
-    // Set the caret to the end of the input box.
-    webView->mainFrame()->document().getElementById("EditBoxWithText").to<WebInputElement>().setSelectionRange(1000, 1000);
     setScaleAndScrollAndLayout(webView, WebPoint(0, 0), 1);
     WebRect rect, caret;
     webViewImpl->selectionBounds(caret, rect);
     webView->scrollFocusedNodeIntoRect(rect);
     // The edit box should be left aligned with a margin for possible label.
-    int hScroll = editBoxWithText.x * webView->pageScaleFactor();
+    int hScroll = editBoxWithText.x * webView->pageScaleFactor() - leftBoxRatio * viewportWidth;
     EXPECT_EQ(hScroll, webView->mainFrame()->scrollOffset().width);
     int vScroll = editBoxWithText.y * webView->pageScaleFactor() - (viewportHeight - editBoxWithText.height * webView->pageScaleFactor()) / 2;
     EXPECT_EQ(vScroll, webView->mainFrame()->scrollOffset().height);
     EXPECT_FLOAT_EQ(webView->deviceScaleFactor() * minReadableCaretHeight / caret.height, webView->pageScaleFactor());
 
     // The edit box is wider than the viewport when legible.
-    webView->setDeviceScaleFactor(2);
+    webView->setDeviceScaleFactor(4);
     setScaleAndScrollAndLayout(webView, WebPoint(0, 0), 1);
     webViewImpl->selectionBounds(caret, rect);
     webView->scrollFocusedNodeIntoRect(rect);

Modified: trunk/Source/WebKit/chromium/tests/data/get_scale_for_zoom_into_editable_test.html (141079 => 141080)


--- trunk/Source/WebKit/chromium/tests/data/get_scale_for_zoom_into_editable_test.html	2013-01-29 08:58:58 UTC (rev 141079)
+++ trunk/Source/WebKit/chromium/tests/data/get_scale_for_zoom_into_editable_test.html	2013-01-29 09:16:00 UTC (rev 141080)
@@ -1,8 +1,16 @@
 <html>
 <head>
+<script>
+function getfocus()
+{
+var textfield = document.getElementById('EditBoxWithText');
+textfield.focus();
+textfield.setSelectionRange(textfield.value.length,textfield.value.length);
+}
+</script>
 </head>
-  <body>
-      <input id="EditBoxWithText" style=" position: absolute; left: 200px; top: 200px; width: 500px; height:20" value = "Long long long long long long text to fill the edit box" type="text">
-      <input id="EditBoxWithNoText" style=" position: absolute; left: 200px; top: 250px; width: 500px; height:20" type="text">
+  <body _onload_="getfocus()">
+      <input id="EditBoxWithText" style=" position: absolute; left: 200px; top: 200px; width: 250; height:20" value = "Long text to fill the edit box" type="text">
+      <input id="EditBoxWithNoText" style=" position: absolute; left: 200px; top: 250px; width: 250; height:20" type="text">
   </body>
 </html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to