2011-04-12 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Apr 2011 16:36:22 +0000 (16:36 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Apr 2011 16:36:22 +0000 (16:36 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: remove unnecessary method InspectorAgent.didEvaluateForTestInFrontend.
        https://bugs.webkit.org/show_bug.cgi?id=58335

        It was the method for Inspector layout tests.
        We can use RuntimeAgent.evaluate instead.

        * http/tests/inspector/inspector-test.js:
        (initialize_InspectorTest.InspectorTest.completeTest):
2011-04-12  Ilya Tikhonovsky  <loislo@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: remove unnecessary method InspectorAgent.didEvaluateForTestInFrontend.
        https://bugs.webkit.org/show_bug.cgi?id=58335

        It was the method for Inspector layout tests.
        We can use RuntimeAgent.evaluate instead.

        * inspector/Inspector.json:
        * inspector/InspectorAgent.cpp:
        * inspector/InspectorAgent.h:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::connectFrontend):
        * inspector/front-end/TestController.js:
        (WebInspector.TestController.prototype.notifyDone):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83599 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/inspector-test.js
Source/WebCore/ChangeLog
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorAgent.cpp
Source/WebCore/inspector/InspectorAgent.h
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/front-end/TestController.js

index d5aadc05433bf5df596c4300b733e63602002820..baee1dcbf732a1bdb98cabe73b828a530532a319 100644 (file)
@@ -1,3 +1,16 @@
+2011-04-12  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove unnecessary method InspectorAgent.didEvaluateForTestInFrontend.
+        https://bugs.webkit.org/show_bug.cgi?id=58335
+
+        It was the method for Inspector layout tests.
+        We can use RuntimeAgent.evaluate instead.
+
+        * http/tests/inspector/inspector-test.js:
+        (initialize_InspectorTest.InspectorTest.completeTest):
+
 2011-04-12  Brady Eidson  <beidson@apple.com>
 
         Rubberstamped by Adam Roben.
index 66d0bfd849ac7a9ea06ff8da388fac07c0db5778..2795ef6e77ec4f7f8e9b35c6a16d2fe3bcca54d3 100644 (file)
@@ -14,7 +14,7 @@ console.info = consoleOutputHook.bind(InspectorTest, "info");
 
 InspectorTest.completeTest = function()
 {
-    InspectorAgent.didEvaluateForTestInFrontend(InspectorTest.completeTestCallId, "");
+    RuntimeAgent.evaluate("didEvaluateForTestInFrontend(" + InspectorTest.completeTestCallId + ", \"\")", "test");
 }
 
 InspectorTest.evaluateInConsole = function(code, callback)
index 378667d4291153c5a37527bcd9add7814d462fbe..54687d75c0ff10b3ceefc523456600d353acbb3f 100644 (file)
@@ -1,3 +1,21 @@
+2011-04-12  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove unnecessary method InspectorAgent.didEvaluateForTestInFrontend.
+        https://bugs.webkit.org/show_bug.cgi?id=58335
+
+        It was the method for Inspector layout tests.
+        We can use RuntimeAgent.evaluate instead.
+
+        * inspector/Inspector.json:
+        * inspector/InspectorAgent.cpp:
+        * inspector/InspectorAgent.h:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::connectFrontend):
+        * inspector/front-end/TestController.js:
+        (WebInspector.TestController.prototype.notifyDone):
+
 2011-04-12  Philippe Normand  <pnormand@igalia.com>
 
         Reviewed by Martin Robinson.
index 1ae66ccc0c175720d6b332447022293e7f2a0d3f..35a7548379bcdcb1d7198c75073ae7e6d68d72d3 100644 (file)
@@ -3,13 +3,6 @@
         "domain": "Inspector",
         "types": [],
         "commands": [
-            {
-                "name": "didEvaluateForTestInFrontend",
-                "parameters": [
-                    { "name": "testCallId", "type": "integer" },
-                    { "name": "jsonResult", "type": "string" }
-                ]
-            }
         ],
         "events": [
             {
index 8a9d1d58ad2359d345ea748657209691fdefe79a..7838363736a2e96d2f0342b4ee17514e64bb98f9 100644 (file)
@@ -393,17 +393,6 @@ void InspectorAgent::evaluateForTestInFrontend(long callId, const String& script
         issueEvaluateForTestCommands();
 }
 
-void InspectorAgent::didEvaluateForTestInFrontend(ErrorString*, long callId, const String& jsonResult)
-{
-    ScriptState* scriptState = scriptStateFromPage(debuggerWorld(), m_inspectedPage);
-    ScriptObject window;
-    ScriptGlobalObject::get(scriptState, "window", window);
-    ScriptFunctionCall function(window, "didEvaluateForTestInFrontend");
-    function.appendArgument(callId);
-    function.appendArgument(jsonResult);
-    function.call();
-}
-
 void InspectorAgent::setInspectorExtensionAPI(const String& source)
 {
     m_inspectorExtensionAPI = source;
index 85cedb6ad82220e809c46e5db9c78295f992cd3c..6802ad59887367a7d1fbddb545b83279a4432bf3 100644 (file)
@@ -170,8 +170,6 @@ public:
     // InspectorAgent API
     void getInspectorState(RefPtr<InspectorObject>* state);
     void setMonitoringXHREnabled(bool enabled, bool* newState);
-    // Following are used from InspectorBackend and internally.
-    void didEvaluateForTestInFrontend(ErrorString*, long callId, const String& jsonResult);
 
 private:
     void showPanel(const String& panel);
index d26e746b40b515ded91cf1e68d66c110ff8448de..524120130c01ee3adfcd9564699389cf3e5c4104 100644 (file)
@@ -132,7 +132,6 @@ void InspectorController::connectFrontend()
 #if ENABLE(JAVASCRIPT_DEBUGGER)
         m_inspectorAgent->debuggerAgent(),
 #endif
-        m_inspectorAgent.get(),
         m_inspectorAgent->resourceAgent(),
         m_inspectorAgent->pageAgent(),
 #if ENABLE(JAVASCRIPT_DEBUGGER)
index e6783f9b2eb8ff210b321a64217d439fb8132cb1..301994c39fc5b62bf427e0c4cc2214d2d4c46491 100644 (file)
@@ -36,7 +36,7 @@ WebInspector.TestController.prototype = {
     notifyDone: function(callId, result)
     {
         var message = typeof result === "undefined" ? "\"<undefined>\"" : JSON.stringify(result);
-        InspectorAgent.didEvaluateForTestInFrontend(callId, message);
+        RuntimeAgent.evaluate("didEvaluateForTestInFrontend(" + callId + ", " + message + ")", "test");
     }
 }