Title: [126016] trunk/Source/WebCore
- Revision
- 126016
- Author
- [email protected]
- Date
- 2012-08-20 03:05:56 -0700 (Mon, 20 Aug 2012)
Log Message
Web Inspector: improve standalone test harness to allow attaching to inspector before test.
https://bugs.webkit.org/show_bug.cgi?id=94426
Reviewed by Vsevolod Vlasov.
- User can not "Debug", attach inspector to the front-end and "Continue" test execution.
- You can also assign filter from the query parameter.
* inspector/front-end/test-runner.html:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (126015 => 126016)
--- trunk/Source/WebCore/ChangeLog 2012-08-20 09:38:47 UTC (rev 126015)
+++ trunk/Source/WebCore/ChangeLog 2012-08-20 10:05:56 UTC (rev 126016)
@@ -1,5 +1,17 @@
2012-08-20 Pavel Feldman <[email protected]>
+ Web Inspector: improve standalone test harness to allow attaching to inspector before test.
+ https://bugs.webkit.org/show_bug.cgi?id=94426
+
+ Reviewed by Vsevolod Vlasov.
+
+ - User can not "Debug", attach inspector to the front-end and "Continue" test execution.
+ - You can also assign filter from the query parameter.
+
+ * inspector/front-end/test-runner.html:
+
+2012-08-20 Pavel Feldman <[email protected]>
+
Web Inspector: load scripts panel lazily
https://bugs.webkit.org/show_bug.cgi?id=94416
Modified: trunk/Source/WebCore/inspector/front-end/test-runner.html (126015 => 126016)
--- trunk/Source/WebCore/inspector/front-end/test-runner.html 2012-08-20 09:38:47 UTC (rev 126015)
+++ trunk/Source/WebCore/inspector/front-end/test-runner.html 2012-08-20 10:05:56 UTC (rev 126016)
@@ -69,6 +69,11 @@
function run(debug)
{
+ if (window.runner && debug) {
+ window.runner.continueDebugging();
+ return;
+ }
+
if (window.testScannerIframe)
document.body.removeChild(window.testScannerIframe);
@@ -108,8 +113,10 @@
element = document.getElementById("remaining");
element.textContent = parseInt(element.textContent) - 1;
- if (window.debug)
+ if (window.debug) {
+ document.getElementById("debug").textContent = "Debug";
return;
+ }
}
var test;
@@ -171,12 +178,27 @@
this._inspectorWindowLoading = window.open(StandaloneTestRunner.FrontendLocation + "?" + this._debuggerURL, "inspector", features);
window.addEventListener('unload', this.cleanup.bind(this));
-
- this._watchDog = setTimeout(this._timeout.bind(this), 10000);
+
+ if (!window.debug)
+ this._watchDog = setTimeout(this._timeout.bind(this), 10000);
},
loadCompleted: function()
{
+ if (!window.debug) {
+ this._loadCompleted(this);
+ return;
+ }
+ document.getElementById("debug").textContent = "Continue";
+ },
+
+ continueDebugging: function()
+ {
+ this._loadCompleted();
+ },
+
+ _loadCompleted: function()
+ {
this._inspectorWindow = this._inspectorWindowLoading;
for (var i = 0; i < this._pendingMessages.length; ++i)
this._inspectorWindow.postMessage(this._pendingMessages[i], "*");
@@ -262,9 +284,7 @@
this._treeElement.title = this._testPath + ": TIMEOUT";
this._treeElement.listItemElement.addStyleClass("timeout");
this._done = true;
- if (!window.debug)
- this.cleanup();
-
+ this.cleanup();
this._next("timeout");
},
@@ -302,10 +322,25 @@
window.runner[method].apply(window.runner, signature);
}
+function onload()
+{
+ var queryParamsObject = {};
+ var queryParams = window.location.search;
+ if (!queryParams)
+ return;
+ var params = queryParams.substring(1).split("&");
+ for (var i = 0; i < params.length; ++i) {
+ var pair = params[i].split("=");
+ queryParamsObject[pair[0]] = pair[1];
+ }
+ if ("filter" in queryParamsObject)
+ document.getElementById("filter").value = queryParamsObject["filter"];
+}
+
window.addEventListener("message", onMessageFromTestPage, true);
</script>
-<body>
+<body _onload_="onload()">
This is a standalone test suite for inspector front-end. Here is how you run it:
<ul>
<li>Check out WebKit source tree: git clone http://git.chromium.org/external/Webkit.git</li>
@@ -314,7 +349,7 @@
</ul>
<button _onclick_="run()">Run</button>
-<button _onclick_="run(true)">Debug</button>
+<button id="debug" _onclick_="run(true)">Debug</button>
<button _onclick_="interrupt()">Interrupt</button>
Filter: <input id="filter" type="text" size="40"></input><small><i>Click on results to load filter</i></small><br>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes