[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

pfeldman at chromium.org pfeldman at chromium.org
Thu Oct 29 20:45:38 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit caf6b49e3112d59b6ff3f8e3841d444b500e97c3
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 15 20:34:02 2009 +0000

    2009-10-15  Pavel Feldman  <pfeldman at chromium.org>
    
            Not reviewed - build fix.
    
            Web Inspector: add file missing in r49648
    
            * inspector/front-end/TestController.js: Added.
            (WebInspector.TestController):
            (WebInspector.TestController.prototype.waitUntilDone):
            (WebInspector.TestController.prototype.notifyDone):
            (WebInspector.evaluateForTestInFrontend):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 52dfc05..4974c91 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-15  Pavel Feldman  <pfeldman at chromium.org>
+
+        Not reviewed - build fix.
+
+        Web Inspector: add file missing in r49648
+
+        * inspector/front-end/TestController.js: Added.
+        (WebInspector.TestController):
+        (WebInspector.TestController.prototype.waitUntilDone):
+        (WebInspector.TestController.prototype.notifyDone):
+        (WebInspector.evaluateForTestInFrontend):
+
 2009-10-15  Oliver Hunt  <oliver at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/inspector/front-end/TestController.js b/WebCore/inspector/front-end/TestController.js
new file mode 100644
index 0000000..8da59e7
--- /dev/null
+++ b/WebCore/inspector/front-end/TestController.js
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+WebInspector.TestController = function(callId)
+{
+    this._callId = callId;
+    this._waitUntilDone = false;
+}
+
+WebInspector.TestController.prototype = {
+    waitUntilDone: function()
+    {
+        this._waitUntilDone = true;
+    },
+
+    notifyDone: function(result)
+    {
+        var message = typeof result === "undefined" ? "<undefined>" : JSON.stringify(result);
+        InspectorController.didEvaluateForTestInFrontend(this._callId, message);
+    }
+}
+
+WebInspector.evaluateForTestInFrontend = function(callId, script)
+{
+    var controller = new WebInspector.TestController(callId);
+    try {
+        var result;
+        if (window[script] && typeof window[script] === "function")
+            result = window[script].call(this, controller);
+        else
+            result = window.eval(script);
+
+        if (!controller._waitUntilDone)
+            controller.notifyDone(result);
+    } catch (e) {
+        controller.notifyDone(e.toString());
+    }
+}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list