Skip to content
Permalink
Browse files
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  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):

Canonical link: https://commits.webkit.org/73359@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
loislo committed Apr 12, 2011
1 parent 2a571f9 commit e879b4bad1583db37d1b7d1b29023952c333123a
Showing 8 changed files with 33 additions and 23 deletions.
@@ -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.
@@ -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)
@@ -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.
@@ -3,13 +3,6 @@
"domain": "Inspector",
"types": [],
"commands": [
{
"name": "didEvaluateForTestInFrontend",
"parameters": [
{ "name": "testCallId", "type": "integer" },
{ "name": "jsonResult", "type": "string" }
]
}
],
"events": [
{
@@ -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;
@@ -170,8 +170,6 @@ class InspectorAgent {
// 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);
@@ -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)
@@ -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");
}
}

0 comments on commit e879b4b

Please sign in to comment.