Title: [132597] trunk/Tools
Revision
132597
Author
[email protected]
Date
2012-10-26 03:00:27 -0700 (Fri, 26 Oct 2012)

Log Message

Unreviewed, rolling out r132552.
http://trac.webkit.org/changeset/132552
https://bugs.webkit.org/show_bug.cgi?id=100486

Makes typeahead tests crash in debug. (Requested by pfeldman
on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-10-26

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/DRTTestRunner.h:
* DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
(WebTestDelegate):
* DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
* DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
(WebTestRunner):
(WebTestRunner::EventSender::doDragDrop):
(WebTestRunner::EventSender::updateClickCountForButton):
(WebTestRunner::EventSender::mouseDown):
(WebTestRunner::EventSender::mouseUp):
(WebTestRunner::EventSender::mouseMoveTo):
(WebTestRunner::EventSender::keyDown):
(WebTestRunner::EventSender::replaySavedEvents):
(WebTestRunner::EventSender::contextClick):
(WebTestRunner::EventSender::beginDragWithFiles):
(WebTestRunner::EventSender::sendCurrentTouchEvent):
(WebTestRunner::EventSender::handleMouseWheel):
(WebTestRunner::EventSender::gestureEvent):
(WebTestRunner::EventSender::gestureFlingCancel):
(WebTestRunner::EventSender::gestureFlingStart):
* DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Removed.
* DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Removed.
* DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
(TestDelegate):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(WebKit):
(webkit_support):
* DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
(WebTestInterfaces::Internal):
* DumpRenderTree/chromium/WebViewHost.cpp:
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

Modified Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (132596 => 132597)


--- trunk/Tools/ChangeLog	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/ChangeLog	2012-10-26 10:00:27 UTC (rev 132597)
@@ -1,3 +1,47 @@
+2012-10-26  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r132552.
+        http://trac.webkit.org/changeset/132552
+        https://bugs.webkit.org/show_bug.cgi?id=100486
+
+        Makes typeahead tests crash in debug. (Requested by pfeldman
+        on #webkit).
+
+        * DumpRenderTree/DumpRenderTree.gypi:
+        * DumpRenderTree/chromium/DRTTestRunner.h:
+        * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+        (WebTestDelegate):
+        * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+        * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+        (WebTestRunner):
+        (WebTestRunner::EventSender::doDragDrop):
+        (WebTestRunner::EventSender::updateClickCountForButton):
+        (WebTestRunner::EventSender::mouseDown):
+        (WebTestRunner::EventSender::mouseUp):
+        (WebTestRunner::EventSender::mouseMoveTo):
+        (WebTestRunner::EventSender::keyDown):
+        (WebTestRunner::EventSender::replaySavedEvents):
+        (WebTestRunner::EventSender::contextClick):
+        (WebTestRunner::EventSender::beginDragWithFiles):
+        (WebTestRunner::EventSender::sendCurrentTouchEvent):
+        (WebTestRunner::EventSender::handleMouseWheel):
+        (WebTestRunner::EventSender::gestureEvent):
+        (WebTestRunner::EventSender::gestureFlingCancel):
+        (WebTestRunner::EventSender::gestureFlingStart):
+        * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Removed.
+        * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Removed.
+        * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+        (TestDelegate):
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+        (WebKit):
+        (webkit_support):
+        * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+        (WebTestInterfaces::Internal):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        * DumpRenderTree/chromium/WebViewHost.h:
+        (WebViewHost):
+
 2012-10-26  Xiaobo Wang  <[email protected]>
 
         [BlackBerry] Support pixel tests for BlackBerry DRT

Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.gypi (132596 => 132597)


--- trunk/Tools/DumpRenderTree/DumpRenderTree.gypi	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.gypi	2012-10-26 10:00:27 UTC (rev 132597)
@@ -83,8 +83,6 @@
             'chromium/TestRunner/src/EventSender.h',
             'chromium/TestRunner/src/GamepadController.cpp',
             'chromium/TestRunner/src/GamepadController.h',
-            'chromium/TestRunner/src/KeyCodeMapping.cpp',
-            'chromium/TestRunner/src/KeyCodeMapping.h',
             'chromium/TestRunner/src/TestInterfaces.cpp',
             'chromium/TestRunner/src/TestInterfaces.h',
             'chromium/TestRunner/src/TextInputController.cpp',

Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h	2012-10-26 10:00:27 UTC (rev 132597)
@@ -43,24 +43,8 @@
 #define DRTTestRunner_h
 
 #include "TestRunner/src/TestRunner.h"
-#include "WebDeliveredIntentClient.h"
 #include "WebTask.h"
-#include "WebTextDirection.h"
-#include "platform/WebArrayBufferView.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include <wtf/Deque.h>
-#include <wtf/OwnPtr.h>
 
-namespace WebKit {
-class WebGeolocationClientMock;
-}
-
-namespace webkit_support {
-class ScopedTempDirectory;
-}
-
-
 class TestShell;
 
 class DRTTestRunner : public TestRunner {

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h	2012-10-26 10:00:27 UTC (rev 132597)
@@ -59,8 +59,6 @@
     virtual void postDelayedTask(WebTask*, long long ms) = 0;
 
     virtual WebKit::WebString registerIsolatedFileSystem(const WebKit::WebVector<WebKit::WebString>& absoluteFilenames) = 0;
-    virtual long long getCurrentTimeInMillisecond() = 0;
-    virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) = 0;
 };
 
 }

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h	2012-10-26 10:00:27 UTC (rev 132597)
@@ -43,6 +43,7 @@
 #define CppVariant_h
 
 #include "WebBindings.h"
+#include "webkit/support/webkit_support.h"
 #include <string>
 #include <wtf/Vector.h>
 

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp	2012-10-26 10:00:27 UTC (rev 132597)
@@ -43,17 +43,16 @@
 #include "config.h"
 #include "EventSender.h"
 
-#include "KeyCodeMapping.h"
 #include "TestDelegate.h"
 #include "WebContextMenuData.h"
 #include "WebDragOperation.h"
-#include "WebEventSender.h"
 #include "WebTouchPoint.h"
 #include "WebView.h"
 #include "platform/WebDragData.h"
 #include "platform/WebPoint.h"
 #include "platform/WebString.h"
 #include "platform/WebVector.h"
+#include "webkit/support/webkit_support.h"
 #include <wtf/Deque.h>
 #include <wtf/StringExtras.h>
 
@@ -126,9 +125,9 @@
 // dependent (e.g., dragging has a timeout vs selection).
 uint32 timeOffsetMs = 0;
 
-double getCurrentEventTimeSec(TestDelegate* delegate)
+double getCurrentEventTimeSec()
 {
-    return (delegate->getCurrentTimeInMillisecond() + timeOffsetMs) / 1000.0;
+    return (webkit_support::GetCurrentTimeInMillisecond() + timeOffsetMs) / 1000.0;
 }
 
 void advanceEventTime(int32_t deltaMs)
@@ -136,7 +135,7 @@
     timeOffsetMs += deltaMs;
 }
 
-void initMouseEvent(WebInputEvent::Type t, WebMouseEvent::Button b, const WebPoint& pos, WebMouseEvent* e, double ts)
+void initMouseEvent(WebInputEvent::Type t, WebMouseEvent::Button b, const WebPoint& pos, WebMouseEvent* e)
 {
     e->type = t;
     e->button = b;
@@ -145,7 +144,7 @@
     e->y = pos.y;
     e->globalX = pos.x;
     e->globalY = pos.y;
-    e->timeStampSeconds = ts;
+    e->timeStampSeconds = getCurrentEventTimeSec();
     e->clickCount = clickCount;
 }
 
@@ -215,16 +214,16 @@
         return false;
 
     switch (event.windowsKeyCode) {
-    case VKEY_LEFT:
+    case webkit_support::VKEY_LEFT:
         *name = "MoveToBeginningOfLine";
         break;
-    case VKEY_RIGHT:
+    case webkit_support::VKEY_RIGHT:
         *name = "MoveToEndOfLine";
         break;
-    case VKEY_UP:
+    case webkit_support::VKEY_UP:
         *name = "MoveToBeginningOfDocument";
         break;
-    case VKEY_DOWN:
+    case webkit_support::VKEY_DOWN:
         *name = "MoveToEndOfDocument";
         break;
     default:
@@ -350,7 +349,7 @@
 void EventSender::doDragDrop(const WebDragData& dragData, WebDragOperationsMask mask)
 {
     WebMouseEvent event;
-    initMouseEvent(WebInputEvent::MouseDown, pressedButton, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
+    initMouseEvent(WebInputEvent::MouseDown, pressedButton, lastMousePos, &event);
     WebPoint clientPoint(event.x, event.y);
     WebPoint screenPoint(event.globalX, event.globalY);
     currentDragData = dragData;
@@ -393,7 +392,7 @@
 
 void EventSender::updateClickCountForButton(WebMouseEvent::Button buttonType)
 {
-    if ((getCurrentEventTimeSec(m_delegate) - lastClickTimeSec < multipleClickTimeSec)
+    if ((getCurrentEventTimeSec() - lastClickTimeSec < multipleClickTimeSec)
         && (!outsideMultiClickRadius(lastMousePos, lastClickPos))
         && (buttonType == lastButtonType))
         ++clickCount;
@@ -423,7 +422,7 @@
 
     WebMouseEvent event;
     pressedButton = buttonType;
-    initMouseEvent(WebInputEvent::MouseDown, buttonType, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
+    initMouseEvent(WebInputEvent::MouseDown, buttonType, lastMousePos, &event);
     if (arguments.size() >= 2 && (arguments[1].isObject() || arguments[1].isString()))
         applyKeyModifiers(&(arguments[1]), &event);
     webview()->handleInputEvent(event);
@@ -449,7 +448,7 @@
         replaySavedEvents();
     } else {
         WebMouseEvent event;
-        initMouseEvent(WebInputEvent::MouseUp, buttonType, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
+        initMouseEvent(WebInputEvent::MouseUp, buttonType, lastMousePos, &event);
         if (arguments.size() >= 2 && (arguments[1].isObject() || arguments[1].isString()))
             applyKeyModifiers(&(arguments[1]), &event);
         doMouseUp(event);
@@ -498,7 +497,7 @@
         mouseEventQueue.append(savedEvent);
     } else {
         WebMouseEvent event;
-        initMouseEvent(WebInputEvent::MouseMove, pressedButton, mousePos, &event, getCurrentEventTimeSec(m_delegate));
+        initMouseEvent(WebInputEvent::MouseMove, pressedButton, mousePos, &event);
         doMouseMove(event);
     }
 }
@@ -536,43 +535,50 @@
     bool needsShiftKeyModifier = false;
     if ("\n" == codeStr) {
         generateChar = true;
-        text = code = VKEY_RETURN;
+        text = code = webkit_support::VKEY_RETURN;
     } else if ("rightArrow" == codeStr)
-        code = VKEY_RIGHT;
+        code = webkit_support::VKEY_RIGHT;
     else if ("downArrow" == codeStr)
-        code = VKEY_DOWN;
+        code = webkit_support::VKEY_DOWN;
     else if ("leftArrow" == codeStr)
-        code = VKEY_LEFT;
+        code = webkit_support::VKEY_LEFT;
     else if ("upArrow" == codeStr)
-        code = VKEY_UP;
+        code = webkit_support::VKEY_UP;
     else if ("insert" == codeStr)
-        code = VKEY_INSERT;
+        code = webkit_support::VKEY_INSERT;
     else if ("delete" == codeStr)
-        code = VKEY_DELETE;
+        code = webkit_support::VKEY_DELETE;
     else if ("pageUp" == codeStr)
-        code = VKEY_PRIOR;
+        code = webkit_support::VKEY_PRIOR;
     else if ("pageDown" == codeStr)
-        code = VKEY_NEXT;
+        code = webkit_support::VKEY_NEXT;
     else if ("home" == codeStr)
-        code = VKEY_HOME;
+        code = webkit_support::VKEY_HOME;
     else if ("end" == codeStr)
-        code = VKEY_END;
+        code = webkit_support::VKEY_END;
     else if ("printScreen" == codeStr)
-        code = VKEY_SNAPSHOT;
+        code = webkit_support::VKEY_SNAPSHOT;
     else if ("menu" == codeStr)
-        code = VKEY_APPS;
+        // FIXME: Change this to webkit_support::VKEY_APPS.
+        code = 0x5D;
     else if ("leftControl" == codeStr)
-        code = VKEY_LCONTROL;
+        // FIXME: Change this to webkit_support::VKEY_LCONTROL.
+        code = 0xA2;
     else if ("rightControl" == codeStr)
-        code = VKEY_RCONTROL;
+        // FIXME: Change this to webkit_support::VKEY_RCONTROL.
+        code = 0xA3;
     else if ("leftShift" == codeStr)
-        code = VKEY_LSHIFT;
+        // FIXME: Change this to webkit_support::VKEY_LSHIFT.
+        code = 0xA0;
     else if ("rightShift" == codeStr)
-        code = VKEY_RSHIFT;
+        // FIXME: Change this to webkit_support::VKEY_RSHIFT.
+        code = 0xA1;
     else if ("leftAlt" == codeStr)
-        code = VKEY_LMENU;
+        // FIXME: Change this to webkit_support::VKEY_LMENU.
+        code = 0xA4;
     else if ("rightAlt" == codeStr)
-        code = VKEY_RMENU;
+        // FIXME: Change this to webkit_support::VKEY_RMENU.
+        code = 0xA5;
     else {
         // Compare the input string with the function-key names defined by the
         // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key
@@ -582,7 +588,7 @@
             snprintf(functionChars, 10, "F%d", i);
             string functionKeyName(functionChars);
             if (functionKeyName == codeStr) {
-                code = VKEY_F1 + (i - 1);
+                code = webkit_support::VKEY_F1 + (i - 1);
                 break;
             }
         }
@@ -607,7 +613,7 @@
     eventDown.modifiers = 0;
     eventDown.windowsKeyCode = code;
 #if OS(LINUX) && USE(GTK)
-    eventDown.nativeKeyCode = NativeKeyCodeForWindowsKeyCode(code);
+    eventDown.nativeKeyCode = webkit_support::NativeKeyCodeForWindowsKeyCode(code, needsShiftKeyModifier);
 #endif
 
     if (generateChar) {
@@ -769,7 +775,7 @@
         switch (e.type) {
         case SavedEvent::MouseMove: {
             WebMouseEvent event;
-            initMouseEvent(WebInputEvent::MouseMove, pressedButton, e.pos, &event, getCurrentEventTimeSec(m_delegate));
+            initMouseEvent(WebInputEvent::MouseMove, pressedButton, e.pos, &event);
             doMouseMove(event);
             break;
         }
@@ -778,7 +784,7 @@
             break;
         case SavedEvent::MouseUp: {
             WebMouseEvent event;
-            initMouseEvent(WebInputEvent::MouseUp, e.buttonType, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
+            initMouseEvent(WebInputEvent::MouseUp, e.buttonType, lastMousePos, &event);
             doMouseUp(event);
             break;
         }
@@ -837,10 +843,10 @@
     // Generate right mouse down and up.
     WebMouseEvent event;
     pressedButton = WebMouseEvent::ButtonRight;
-    initMouseEvent(WebInputEvent::MouseDown, WebMouseEvent::ButtonRight, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
+    initMouseEvent(WebInputEvent::MouseDown, WebMouseEvent::ButtonRight, lastMousePos, &event);
     webview()->handleInputEvent(event);
 
-    initMouseEvent(WebInputEvent::MouseUp, WebMouseEvent::ButtonRight, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
+    initMouseEvent(WebInputEvent::MouseUp, WebMouseEvent::ButtonRight, lastMousePos, &event);
     webview()->handleInputEvent(event);
 
     pressedButton = WebMouseEvent::ButtonNone;
@@ -900,7 +906,7 @@
     for (size_t i = 0; i < files.size(); ++i) {
         WebDragData::Item item;
         item.storageType = WebDragData::Item::StorageTypeFilename;
-        item.filenameData = m_delegate->getAbsoluteWebStringFromUTF8Path(files[i]);
+        item.filenameData = webkit_support::GetAbsoluteWebStringFromUTF8Path(files[i]);
         currentDragData.addItem(item);
         absoluteFilenames[i] = item.filenameData;
     }
@@ -1008,7 +1014,7 @@
     WebTouchEvent touchEvent;
     touchEvent.type = type;
     touchEvent.modifiers = touchModifiers;
-    touchEvent.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
+    touchEvent.timeStampSeconds = getCurrentEventTimeSec();
     touchEvent.touchesLength = touchPoints.size();
     for (unsigned i = 0; i < touchPoints.size(); ++i)
         touchEvent.touches[i] = touchPoints[i];
@@ -1048,7 +1054,7 @@
         hasPreciseScrollingDeltas = arguments[3].toBoolean();
 
     WebMouseWheelEvent event;
-    initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
+    initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event);
     event.wheelTicksX = static_cast<float>(horizontal);
     event.wheelTicksY = static_cast<float>(vertical);
     event.deltaX = event.wheelTicksX;
@@ -1211,7 +1217,7 @@
 
     event.globalX = event.x;
     event.globalY = event.y;
-    event.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
+    event.timeStampSeconds = getCurrentEventTimeSec();
     webview()->handleInputEvent(event);
 }
 
@@ -1223,7 +1229,7 @@
 
     WebGestureEvent event;
     event.type = WebInputEvent::GestureFlingCancel;
-    event.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
+    event.timeStampSeconds = getCurrentEventTimeSec();
     webview()->handleInputEvent(event);
 }
 
@@ -1247,7 +1253,7 @@
 
     event.data.flingStart.velocityX = static_cast<float>(arguments[2].toDouble());
     event.data.flingStart.velocityY = static_cast<float>(arguments[3].toDouble());
-    event.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
+    event.timeStampSeconds = getCurrentEventTimeSec();
     webview()->handleInputEvent(event);
 }
 

Deleted: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp	2012-10-26 10:00:27 UTC (rev 132597)
@@ -1,249 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "KeyCodeMapping.h"
-
-#include <wtf/UnusedParam.h>
-
-namespace WebTestRunner {
-
-int NativeKeyCodeForWindowsKeyCode(int keysym)
-{
-#if OS(LINUX) && USE(GTK)
-    // See /usr/share/X11/xkb/keycodes/*
-    static const int asciiToKeyCode[] = {
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        22,
-        23,
-        0,
-        0,
-        0,
-        36,
-        0,
-        0,
-        50,
-        37,
-        64,
-        127,
-        66,
-        0,
-        0,
-        0,
-        0,
-        131,
-        0,
-        9,
-        100,
-        102,
-        0,
-        0,
-        65, // ' '
-        112, // '!'
-        117, // '"'
-        115, // '#'
-        110, // '$'
-        113, // '%'
-        111, // '&'
-        114, // '''
-        116, // '('
-        0, // ')'
-        107, // '*'
-        0, // '+'
-        0, // ','
-        118, // '-'
-        119, // '.'
-        146, // '/'
-        19, // '0'
-        10, // '1'
-        11, // '2'
-        12, // '3'
-        13, // '4'
-        14, // '5'
-        15, // '6'
-        16, // '7'
-        17, // '8'
-        18, // '9'
-        0, // ':'
-        0, // ';'
-        0, // '<'
-        0, // '='
-        0, // '>'
-        0, // '?'
-        0, // '@'
-        38, // 'A'
-        56, // 'B'
-        54, // 'C'
-        40, // 'D'
-        26, // 'E'
-        41, // 'F'
-        42, // 'G'
-        43, // 'H'
-        31, // 'I'
-        44, // 'J'
-        45, // 'K'
-        46, // 'L'
-        58, // 'M'
-        57, // 'N'
-        32, // 'O'
-        33, // 'P'
-        24, // 'Q'
-        27, // 'R'
-        39, // 'S'
-        28, // 'T'
-        30, // 'U'
-        55, // 'V'
-        25, // 'W'
-        53, // 'X'
-        29, // 'Y'
-        52, // 'Z'
-        133, // '['
-        134, // '\'
-        135, // ']'
-        0, // '^'
-        0, // '_'
-        90, // '`'
-        38, // 'a'
-        56, // 'b'
-        54, // 'c'
-        40, // 'd'
-        26, // 'e'
-        41, // 'f'
-        42, // 'g'
-        43, // 'h'
-        31, // 'i'
-        44, // 'j'
-        45, // 'k'
-        46, // 'l'
-        58, // 'm'
-        57, // 'n'
-        32, // 'o'
-        33, // 'p'
-        24, // 'q'
-        27, // 'r'
-        39, // 's'
-        28, // 't'
-        30, // 'u'
-        55, // 'v'
-        25, // 'w'
-        53, // 'x'
-        29, // 'y'
-        52, // 'z'
-        96, // '{'
-        0, // '|'
-        0, // '}'
-        0, // '~'
-        0, // DEL
-    };
-
-    if (keysym <= 127)
-        return asciiToKeyCode[keysym];
-
-    switch (keysym) {
-    case VKEY_PRIOR:
-        return 112;
-    case VKEY_NEXT:
-        return 117;
-    case VKEY_END:
-        return 115;
-    case VKEY_HOME:
-        return 110;
-    case VKEY_LEFT:
-        return 113;
-    case VKEY_UP:
-        return 111;
-    case VKEY_RIGHT:
-        return 114;
-    case VKEY_DOWN:
-        return 116;
-    case VKEY_SNAPSHOT:
-        return 107;
-    case VKEY_INSERT:
-        return 118;
-    case VKEY_DELETE:
-        return 119;
-    case VKEY_APPS:
-        return 135;
-    case VKEY_F1:
-    case VKEY_F1 + 1:
-    case VKEY_F1 + 2:
-    case VKEY_F1 + 3:
-    case VKEY_F1 + 4:
-    case VKEY_F1 + 5:
-    case VKEY_F1 + 6:
-    case VKEY_F1 + 7:
-    case VKEY_F1 + 8:
-    case VKEY_F1 + 9:
-    case VKEY_F1 + 10:
-    case VKEY_F1 + 11:
-    case VKEY_F1 + 12:
-    case VKEY_F1 + 13:
-    case VKEY_F1 + 14:
-    case VKEY_F1 + 15:
-    case VKEY_F1 + 16:
-    case VKEY_F1 + 17:
-    case VKEY_F1 + 18:
-    case VKEY_F1 + 19:
-    case VKEY_F1 + 20:
-    case VKEY_F1 + 21:
-    case VKEY_F1 + 22:
-    case VKEY_F1 + 23:
-        return 67 + (keysym - VKEY_F1);
-    case VKEY_LSHIFT:
-        return 50;
-    case VKEY_RSHIFT:
-        return 62;
-    case VKEY_LCONTROL:
-        return 37;
-    case VKEY_RCONTROL:
-        return 105;
-    case VKEY_LMENU:
-        return 64;
-    case VKEY_RMENU:
-        return 108;
-
-    default:
-        ASSERT_NOT_REACHED();
-        return 0;
-    }
-#else
-    UNUSED_PARAM(keysym);
-    return 0;
-#endif
-}
-
-}

Deleted: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h	2012-10-26 10:00:27 UTC (rev 132597)
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef KeyCodeMapping_h
-#define KeyCodeMapping_h
-
-namespace WebTestRunner {
-
-// The keycodes match the values of the virtual keycodes found here http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
-enum {
-    VKEY_RETURN   = 0x0D,
-    VKEY_PRIOR    = 0x21,
-    VKEY_NEXT     = 0x22,
-    VKEY_END      = 0x23,
-    VKEY_HOME     = 0x24,
-    VKEY_LEFT     = 0x25,
-    VKEY_UP       = 0x26,
-    VKEY_RIGHT    = 0x27,
-    VKEY_DOWN     = 0x28,
-    VKEY_SNAPSHOT = 0x2C,
-    VKEY_INSERT   = 0x2D,
-    VKEY_DELETE   = 0x2E,
-    VKEY_APPS     = 0x5D,
-    VKEY_F1       = 0x70,
-    VKEY_LSHIFT   = 0xA0,
-    VKEY_RSHIFT   = 0xA1,
-    VKEY_LCONTROL = 0xA2,
-    VKEY_RCONTROL = 0xA3,
-    VKEY_LMENU    = 0xA4,
-    VKEY_RMENU    = 0xA5,
-};
-
-// Map a windows keycode to a native keycode on OS(LINUX) && USE(GTK).
-int NativeKeyCodeForWindowsKeyCode(int keysym);
-
-}
-
-#endif // KeyCodeMapping_h

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h	2012-10-26 10:00:27 UTC (rev 132597)
@@ -55,8 +55,6 @@
     virtual void postTask(WebTestRunner::WebTask*) = 0;
     virtual void postDelayedTask(WebTestRunner::WebTask*, long long ms) = 0;
     virtual WebKit::WebString registerIsolatedFileSystem(const WebKit::WebVector<WebKit::WebString>& absoluteFilenames) = 0;
-    virtual long long getCurrentTimeInMillisecond() = 0;
-    virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) = 0;
 };
 
 #endif // TestDelegate_h

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp	2012-10-26 10:00:27 UTC (rev 132597)
@@ -32,6 +32,51 @@
 #include "config.h"
 #include "TestRunner.h"
 
+#include "WebAnimationController.h"
+#include "WebBindings.h"
+#include "WebConsoleMessage.h"
+#include "WebDeviceOrientation.h"
+#include "WebDeviceOrientationClientMock.h"
+#include "WebDocument.h"
+#include "WebElement.h"
+#include "WebFindOptions.h"
+#include "WebFrame.h"
+#include "WebGeolocationClientMock.h"
+#include "WebIDBFactory.h"
+#include "WebInputElement.h"
+#include "WebIntent.h"
+#include "WebIntentRequest.h"
+#include "WebKit.h"
+#include "WebNotificationPresenter.h"
+#include "WebPrintParams.h"
+#include "WebScriptSource.h"
+#include "WebSecurityPolicy.h"
+#include "WebSettings.h"
+#include "WebSurroundingText.h"
+#include "WebView.h"
+#include "WebWorkerInfo.h"
+#include "platform/WebData.h"
+#include "platform/WebSerializedScriptValue.h"
+#include "platform/WebSize.h"
+#include "platform/WebURL.h"
+#include "v8/include/v8.h"
+#include "webkit/support/webkit_support.h"
+#include <algorithm>
+#include <clocale>
+#include <cstdlib>
+#include <limits>
+#include <sstream>
+#include <wtf/OwnArrayPtr.h>
+#include <wtf/text/WTFString.h>
+
+#if OS(LINUX) || OS(ANDROID)
+#include "linux/WebFontRendering.h"
+#endif
+
+using namespace WebCore;
+using namespace WebKit;
+using namespace std;
+
 TestRunner::TestRunner()
 {
 }

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h	2012-10-26 10:00:27 UTC (rev 132597)
@@ -33,7 +33,22 @@
 #define TestRunner_h
 
 #include "CppBoundClass.h"
+#include "WebDeliveredIntentClient.h"
+#include "WebTextDirection.h"
+#include "platform/WebArrayBufferView.h"
+#include "platform/WebString.h"
+#include "platform/WebURL.h"
+#include <wtf/Deque.h>
+#include <wtf/OwnPtr.h>
 
+namespace WebKit {
+class WebGeolocationClientMock;
+}
+
+namespace webkit_support {
+class ScopedTempDirectory;
+}
+
 class TestRunner : public CppBoundClass {
 public:
     TestRunner();

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp	2012-10-26 10:00:27 UTC (rev 132597)
@@ -67,8 +67,6 @@
     virtual void postTask(WebTask*);
     virtual void postDelayedTask(WebTask*, long long ms);
     virtual WebString registerIsolatedFileSystem(const WebVector<WebString>& absoluteFilenames);
-    virtual long long getCurrentTimeInMillisecond();
-    virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path);
 
 private:
     TestInterfaces m_interfaces;
@@ -149,16 +147,6 @@
     return m_delegate->registerIsolatedFileSystem(absoluteFilenames);
 }
 
-long long WebTestInterfaces::Internal::getCurrentTimeInMillisecond()
-{
-    return m_delegate->getCurrentTimeInMillisecond();
-}
-
-WebKit::WebString WebTestInterfaces::Internal::getAbsoluteWebStringFromUTF8Path(const std::string& path)
-{
-    return m_delegate->getAbsoluteWebStringFromUTF8Path(path);
-}
-
 WebTestInterfaces::WebTestInterfaces()
 {
     m_internal = new Internal;

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-10-26 10:00:27 UTC (rev 132597)
@@ -1500,16 +1500,6 @@
     return webkit_support::RegisterIsolatedFileSystem(absoluteFilenames);
 }
 
-long long WebViewHost::getCurrentTimeInMillisecond()
-{
-    return webkit_support::GetCurrentTimeInMillisecond();
-}
-
-WebKit::WebString WebViewHost::getAbsoluteWebStringFromUTF8Path(const std::string& path)
-{
-    return webkit_support::GetAbsoluteWebStringFromUTF8Path(path);
-}
-
 // Public functions -----------------------------------------------------------
 
 WebViewHost::WebViewHost(TestShell* shell)

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.h (132596 => 132597)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2012-10-26 09:56:23 UTC (rev 132596)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2012-10-26 10:00:27 UTC (rev 132597)
@@ -139,8 +139,6 @@
     virtual void postTask(WebTestRunner::WebTask*) OVERRIDE;
     virtual void postDelayedTask(WebTestRunner::WebTask*, long long ms) OVERRIDE;
     virtual WebKit::WebString registerIsolatedFileSystem(const WebKit::WebVector<WebKit::WebString>& absoluteFilenames) OVERRIDE;
-    virtual long long getCurrentTimeInMillisecond() OVERRIDE;
-    virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) OVERRIDE;
 
     // NavigationHost
     virtual bool navigate(const TestNavigationEntry&, bool reload);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to