Diff
Modified: trunk/LayoutTests/ChangeLog (96575 => 96576)
--- trunk/LayoutTests/ChangeLog 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/ChangeLog 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,3 +1,33 @@
+2011-10-04 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r96491.
+ http://trac.webkit.org/changeset/96491
+ https://bugs.webkit.org/show_bug.cgi?id=69326
+
+ Breaks Slow Leopard inspector tests (Requested by pfeldman on
+ #webkit).
+
+ * http/tests/inspector/resource-tree/resource-tree-test.js:
+ (initialize_ResourceTreeTest.InspectorTest.runAfterResourcesAreFinished):
+ (initialize_ResourceTreeTest.InspectorTest._runAfterResourcesAreFinished):
+ (initialize_ResourceTreeTest):
+ * http/tests/inspector/resources-test.js:
+ (initialize_ResourceTest):
+ * http/tests/inspector/search/resources/search-concatenated.html: Removed.
+ * http/tests/inspector/search/search-in-concatenated-script-expected.txt: Removed.
+ * http/tests/inspector/search/search-in-concatenated-script.html: Removed.
+ * http/tests/inspector/search/search-in-resource.html:
+ * http/tests/inspector/search/search-in-script-expected.txt: Removed.
+ * http/tests/inspector/search/search-in-script.html: Removed.
+ * http/tests/inspector/search/search-test.js:
+ (initialize_SearchTest.InspectorTest.runAfterResourcesAreCreated):
+ (initialize_SearchTest.InspectorTest._runAfterResourcesAreCreated):
+ (initialize_SearchTest.InspectorTest._runAfterResourcesAreCreated.maybeCallback):
+ (initialize_SearchTest.InspectorTest._runAfterResourcesAreCreated.addSniffer):
+ (initialize_SearchTest.InspectorTest._runAfterResourcesAreCreated.onResourceBind):
+ (initialize_SearchTest.InspectorTest._runAfterResourcesAreCreated.visit):
+ (initialize_SearchTest):
+
2011-10-04 Ryosuke Niwa <[email protected]>
Mac rebaseline after r96510.
Modified: trunk/LayoutTests/http/tests/inspector/resource-tree/resource-tree-test.js (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/resource-tree/resource-tree-test.js 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/resource-tree/resource-tree-test.js 2011-10-04 09:03:51 UTC (rev 96576)
@@ -86,4 +86,32 @@
InspectorTest.dumpResourcesTree();
}
+InspectorTest.runAfterResourcesAreFinished = function(resourceURLs, callback)
+{
+ InspectorTest._runAfterResourcesAreFinished(resourceURLs.keySet(), callback);
+}
+
+InspectorTest._runAfterResourcesAreFinished = function(resourceURLs, callback)
+{
+ function visit(resource)
+ {
+ if (!resource.finished)
+ return true;
+
+ for (var url in resourceURLs) {
+ if (resource.url.indexOf(url) !== -1)
+ delete resourceURLs[url];
+ }
+
+ if (!Object.keys(resourceURLs).length) {
+ callback();
+ return true;
+ }
+ }
+
+ var succeeded = WebInspector.resourceTreeModel.forAllResources(visit);
+ if (!succeeded)
+ setTimeout(InspectorTest._runAfterResourcesAreFinished.bind(InspectorTest, resourceURLs, callback), 0);
+}
+
};
Modified: trunk/LayoutTests/http/tests/inspector/resources-test.js (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/resources-test.js 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/resources-test.js 2011-10-04 09:03:51 UTC (rev 96576)
@@ -27,50 +27,4 @@
return r1.request.url.localeCompare(r2.request.url);
}
-InspectorTest.runAfterResourcesAreFinished = function(resourceURLs, callback)
-{
- InspectorTest._runAfterResourcesAreFinished(resourceURLs.keySet(), callback);
}
-
-InspectorTest._runAfterResourcesAreFinished = function(resourceURLs, callback)
-{
- function checkResource(resource)
- {
- for (var url in resourceURLs) {
- if (resource.url.indexOf(url) !== -1)
- delete resourceURLs[url];
- }
- }
-
- function maybeCallback()
- {
- if (!Object.keys(resourceURLs).length) {
- callback();
- return true;
- }
- }
-
- function addSniffer(resource)
- {
- InspectorTest.addSniffer(WebInspector.ResourceTreeModel.prototype, "_addResourceToFrame", resourceAddedToFrame.bind(this));
- }
-
- function resourceAddedToFrame(resource)
- {
- checkResource(resource);
- if (!maybeCallback())
- addSniffer();
- }
-
- function visit(resource)
- {
- checkResource(resource);
- return maybeCallback();
- }
-
- var succeeded = WebInspector.resourceTreeModel.forAllResources(visit);
- if (!succeeded)
- addSniffer();
-}
-
-}
Deleted: trunk/LayoutTests/http/tests/inspector/search/resources/search-concatenated.html (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/search/resources/search-concatenated.html 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/search/resources/search-concatenated.html 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,30 +0,0 @@
-<html>
-<head>
-<script>
-function searchTestUniqueString()
-{
- var variable = 0;
- // searchTestUniqueString two occurences on the same line searchTestUniqueString
- var variable2 = 0;
-}
-</script><script>
-function doSomething()
-{
- searchTestUniqueString();
- // SEARCHTestUniqueString();
-}
-</script>
-<link href="" rel="stylesheet" type="text/css">
-<script>
-function searchTestUniqueString2()
-{
- var variable = 0;
- /* searchTestUniqueString two occurences on the same line searchTestUniqueString */ } </script><script> function doSomething2() { searchTestUniqueString();
- // SEARCHTestUniqueString();
-}
-</script>
-</script>
-<body>
-</body>
-</html>
-
Deleted: trunk/LayoutTests/http/tests/inspector/search/search-in-concatenated-script-expected.txt (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/search/search-in-concatenated-script-expected.txt 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/search/search-in-concatenated-script-expected.txt 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,15 +0,0 @@
-Tests concatenated script search in inspector debugger agent.
-
-Bug 69015
-http://127.0.0.1:8000/inspector/search/resources/search-concatenated.html
-Search matches:
-lineNumber: 3, line: 'function searchTestUniqueString()'
-lineNumber: 6, line: ' // searchTestUniqueString two occurences on the same line searchTestUniqueString'
-lineNumber: 12, line: ' searchTestUniqueString();'
-lineNumber: 13, line: ' // SEARCHTestUniqueString();'
-lineNumber: 18, line: 'function searchTestUniqueString2()'
-lineNumber: 21, line: ' /* searchTestUniqueString two occurences on the same line searchTestUniqueString */ } '
-lineNumber: 21, line: ' function doSomething2() { searchTestUniqueString();'
-lineNumber: 22, line: ' // SEARCHTestUniqueString();'
-
-
Deleted: trunk/LayoutTests/http/tests/inspector/search/search-in-concatenated-script.html (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/search/search-in-concatenated-script.html 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/search/search-in-concatenated-script.html 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,36 +0,0 @@
-<html>
-<head>
-<script src=""
-<script src=""
-<script src=""
-<script>
-function test()
-{
- // This file should not match search query.
- var text = "searchTest" + "UniqueString";
- InspectorTest.runAfterResourcesAreFinished(["search-concatenated.html"], step2);
-
- function step2()
- {
- var url = ""
- var scripts = WebInspector.debuggerModel.scriptsForURL(url);
- var contentProvider = new WebInspector.ConcatenatedScriptsContentProvider(scripts);
- InspectorTest.addResult(url);
- contentProvider.searchInContent(text, step3);
- }
-
- function step3(searchMatches)
- {
- InspectorTest.dumpSearchMatches(searchMatches);
- InspectorTest.completeTest();
- }
-}
-</script>
-</head>
-<body>
-<p>Tests concatenated script search in inspector debugger agent.</p>
-<a href="" 69015</a>
-
-<iframe src="" _onload_="runTest()">
-</body>
-</html>
Modified: trunk/LayoutTests/http/tests/inspector/search/search-in-resource.html (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/search/search-in-resource.html 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/search/search-in-resource.html 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,14 +1,13 @@
<html>
<head>
<script src=""
-<script src=""
<script src=""
<script>
function test()
{
// This file should not match search query.
var text = "searchTest" + "UniqueString";
- InspectorTest.runAfterResourcesAreFinished(["search.js"], step2);
+ InspectorTest.runAfterResourcesAreCreated(["search.js"], step2);
function step2()
{
Deleted: trunk/LayoutTests/http/tests/inspector/search/search-in-script-expected.txt (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/search/search-in-script-expected.txt 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/search/search-in-script-expected.txt 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,11 +0,0 @@
-Tests script search in inspector debugger agent.
-
-Bug 69015
-http://127.0.0.1:8000/inspector/search/resources/search.js
-Search matches:
-lineNumber: 0, line: 'function searchTestUniqueString()'
-lineNumber: 3, line: ' // searchTestUniqueString two occurences on the same line searchTestUniqueString'
-lineNumber: 9, line: ' searchTestUniqueString();'
-lineNumber: 10, line: ' // SEARCHTestUniqueString();'
-
-
Deleted: trunk/LayoutTests/http/tests/inspector/search/search-in-script.html (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/search/search-in-script.html 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/search/search-in-script.html 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,35 +0,0 @@
-<html>
-<head>
-<script src=""
-<script src=""
-<script src=""
-<script>
-function test()
-{
- // This file should not match search query.
- var text = "searchTest" + "UniqueString";
- InspectorTest.runAfterResourcesAreFinished(["search.js"], step2);
-
- function step2()
- {
- var scripts = WebInspector.debuggerModel.scriptsForURL("http://127.0.0.1:8000/inspector/search/resources/search.js");
- var script = scripts[0];
- InspectorTest.addResult(script.sourceURL);
- script.searchInContent(text, step3);
- }
-
- function step3(searchMatches)
- {
- InspectorTest.dumpSearchMatches(searchMatches);
- InspectorTest.completeTest();
- }
-}
-</script>
-</head>
-<body>
-<p>Tests script search in inspector debugger agent.</p>
-<a href="" 69015</a>
-
-<iframe src="" _onload_="runTest()">
-</body>
-</html>
Modified: trunk/LayoutTests/http/tests/inspector/search/search-test.js (96575 => 96576)
--- trunk/LayoutTests/http/tests/inspector/search/search-test.js 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/LayoutTests/http/tests/inspector/search/search-test.js 2011-10-04 09:03:51 UTC (rev 96576)
@@ -16,4 +16,50 @@
InspectorTest.addResult("");
};
+InspectorTest.runAfterResourcesAreCreated = function(resourceURLs, callback)
+{
+ InspectorTest._runAfterResourcesAreCreated(resourceURLs.keySet(), callback);
+}
+
+InspectorTest._runAfterResourcesAreCreated = function(resourceURLs, callback)
+{
+ function checkResource(resource)
+ {
+ for (var url in resourceURLs) {
+ if (resource.url.indexOf(url) !== -1)
+ delete resourceURLs[url];
+ }
+ }
+
+ function maybeCallback()
+ {
+ if (!Object.keys(resourceURLs).length) {
+ callback();
+ return true;
+ }
+ }
+
+ function addSniffer(resource)
+ {
+ InspectorTest.addSniffer(WebInspector.ResourceTreeModel.prototype, "_bindResourceURL", onResourceBind.bind(this));
+ }
+
+ function onResourceBind(resource)
+ {
+ checkResource(resource);
+ if (!maybeCallback())
+ addSniffer();
+ }
+
+ function visit(resource)
+ {
+ checkResource(resource);
+ return maybeCallback();
+ }
+
+ var succeeded = WebInspector.resourceTreeModel.forAllResources(visit);
+ if (!succeeded)
+ addSniffer();
+}
+
};
Modified: trunk/Source/WebCore/ChangeLog (96575 => 96576)
--- trunk/Source/WebCore/ChangeLog 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/Source/WebCore/ChangeLog 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1,3 +1,22 @@
+2011-10-04 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r96491.
+ http://trac.webkit.org/changeset/96491
+ https://bugs.webkit.org/show_bug.cgi?id=69326
+
+ Breaks Slow Leopard inspector tests (Requested by pfeldman on
+ #webkit).
+
+ * inspector/Inspector.json:
+ * inspector/InspectorDebuggerAgent.cpp:
+ (WebCore::InspectorDebuggerAgent::getScriptSource):
+ * inspector/InspectorDebuggerAgent.h:
+ * inspector/front-end/ContentProviders.js:
+ (WebInspector.ScriptContentProvider.prototype.requestContent):
+ * inspector/front-end/Script.js:
+ (WebInspector.Script.prototype.requestSource.didGetScriptSource):
+ (WebInspector.Script.prototype.requestSource):
+
2011-10-03 Pavel Feldman <[email protected]>
Web Inspector: add DebuggerPresentationModel and ConsoleView to compilation.
Modified: trunk/Source/WebCore/inspector/Inspector.json (96575 => 96576)
--- trunk/Source/WebCore/inspector/Inspector.json 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/Source/WebCore/inspector/Inspector.json 2011-10-04 09:03:51 UTC (rev 96576)
@@ -1765,17 +1765,6 @@
"description": "Resumes _javascript_ execution."
},
{
- "name": "searchInContent",
- "parameters": [
- { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to search in." },
- { "name": "query", "type": "string", "description": "String to search for." }
- ],
- "returns": [
- { "name": "result", "type": "array", "items": { "$ref": "Page.SearchMatch" }, "description": "List of search matches." }
- ],
- "description": "Searches for given string in script content."
- },
- {
"name": "setScriptSource",
"parameters": [
{ "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp (96575 => 96576)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2011-10-04 09:03:51 UTC (rev 96576)
@@ -31,7 +31,6 @@
#include "InspectorDebuggerAgent.h"
#if ENABLE(_javascript__DEBUGGER) && ENABLE(INSPECTOR)
-#include "ContentSearchUtils.h"
#include "InjectedScript.h"
#include "InjectedScriptManager.h"
#include "InspectorFrontend.h"
@@ -321,15 +320,6 @@
return value->asObject();
}
-void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptId, const String& query, RefPtr<InspectorArray>* results)
-{
- ScriptsMap::iterator it = m_scripts.find(scriptId);
- if (it != m_scripts.end())
- *results = ContentSearchUtils::searchInTextByLines(query, it->second.source);
- else
- *error = "No script for id: " + scriptId;
-}
-
void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>* newCallFrames, RefPtr<InspectorObject>* result)
{
bool previewOnly = preview && *preview;
@@ -342,13 +332,9 @@
*result = object;
}
-void InspectorDebuggerAgent::getScriptSource(ErrorString* error, const String& scriptId, String* scriptSource)
+void InspectorDebuggerAgent::getScriptSource(ErrorString*, const String& scriptId, String* scriptSource)
{
- ScriptsMap::iterator it = m_scripts.find(scriptId);
- if (it != m_scripts.end())
- *scriptSource = it->second.source;
- else
- *error = "No script for id: " + scriptId;
+ *scriptSource = m_scripts.get(scriptId).source;
}
void InspectorDebuggerAgent::schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<InspectorObject> data)
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (96575 => 96576)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2011-10-04 09:03:51 UTC (rev 96576)
@@ -81,7 +81,6 @@
void removeBreakpoint(ErrorString*, const String& breakpointId);
void continueToLocation(ErrorString*, PassRefPtr<InspectorObject> location);
- void searchInContent(ErrorString*, const String& scriptId, const String& query, RefPtr<InspectorArray>*);
void setScriptSource(ErrorString*, const String& scriptId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>* newCallFrames, RefPtr<InspectorObject>* result);
void getScriptSource(ErrorString*, const String& scriptId, String* scriptSource);
void schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<InspectorObject> data);
Modified: trunk/Source/WebCore/inspector/front-end/ContentProviders.js (96575 => 96576)
--- trunk/Source/WebCore/inspector/front-end/ContentProviders.js 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/Source/WebCore/inspector/front-end/ContentProviders.js 2011-10-04 09:03:51 UTC (rev 96576)
@@ -46,11 +46,6 @@
callback(this._mimeType, source);
}
this._script.requestSource(didRequestSource.bind(this));
- },
-
- searchInContent: function(query, callback)
- {
- this._script.searchInContent(query, callback);
}
}
@@ -82,39 +77,6 @@
scripts[i].requestSource(didRequestSource.bind(this));
},
- searchInContent: function(query, callback)
- {
- var results = {};
- var scriptsLeft = this._scripts.length;
-
- function maybeCallback()
- {
- if (!scriptsLeft) {
- var result = [];
- for (var i = 0; i < this._scripts.length; ++i)
- result = result.concat(results[this._scripts[i].scriptId]);
- callback(result);
- }
- }
-
- function searchCallback(script, searchMatches)
- {
- results[script.scriptId] = [];
- for (var i = 0; i < searchMatches.length; ++i) {
- var searchMatch = {};
- searchMatch.lineNumber = searchMatches[i].lineNumber + script.lineOffset;
- searchMatch.lineContent = searchMatches[i].lineContent;
- results[script.scriptId].push(searchMatch);
- }
- scriptsLeft--;
- maybeCallback.call(this);
- }
-
- maybeCallback();
- for (var i = 0; i < this._scripts.length; ++i)
- this._scripts[i].searchInContent(query, searchCallback.bind(this, this._scripts[i]));
- },
-
_concatenateScriptsContent: function(scripts, sources)
{
var content = "";
Modified: trunk/Source/WebCore/inspector/front-end/Script.js (96575 => 96576)
--- trunk/Source/WebCore/inspector/front-end/Script.js 2011-10-04 08:37:04 UTC (rev 96575)
+++ trunk/Source/WebCore/inspector/front-end/Script.js 2011-10-04 09:03:51 UTC (rev 96576)
@@ -49,26 +49,12 @@
function didGetScriptSource(error, source)
{
- if (error)
- console.error(error);
this._source = source;
callback(this._source);
}
DebuggerAgent.getScriptSource(this.scriptId, didGetScriptSource.bind(this));
},
- searchInContent: function(query, callback)
- {
- function innerCallback(error, searchMatches)
- {
- if (error)
- console.error(error);
- callback(searchMatches);
- }
-
- DebuggerAgent.searchInContent(this.scriptId, query, innerCallback.bind(this));
- },
-
editSource: function(newSource, callback)
{
function didEditScriptSource(error, callFrames)