{
var callback = pendingEvalRequests[callId];
if (!callback) {
- InspectorTest.addResult("Missing callback for ascyn eval " + callId + ", perhaps callback invoked twice?");
+ InspectorTest.addResult("Missing callback for async eval " + callId + ", perhaps callback invoked twice?");
return;
}
delete pendingEvalRequests[callId];
InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + a + " < " + b);
}
+InspectorTest.registerModule = function(moduleName, loadImmediately)
+{
+ runtime._registerModule(moduleName);
+ if (loadImmediately)
+ runtime.loadModule(moduleName);
+}
+
InspectorTest.navigate = function(url, callback)
{
InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);
InspectorTest.dumpLoadedModules = function(next)
{
InspectorTest.addResult("Loaded modules:");
- var modules = WebInspector.moduleManager._modules;
+ var modules = self.runtime._modules;
for (var i = 0; i < modules.length; ++i) {
if (modules[i]._loaded) {
InspectorTest.addResult(" " + modules[i]._descriptor.name);
WebInspector.TempFile = InspectorTest.TempFileMock;
-};
+WebInspector.targetManager.observeTargets({
+ targetAdded: function(target)
+ {
+ if (!WebInspector.domModel)
+ WebInspector.domModel = target.domModel;
+ if (!WebInspector.consoleModel)
+ WebInspector.consoleModel = target.consoleModel;
+ if (!WebInspector.networkManager)
+ WebInspector.networkManager = target.networkManager;
+ if (!WebInspector.timelineManager)
+ WebInspector.timelineManager = target.timelineManager;
+ },
+
+ targetRemoved: function(target) { }
+});
+
+}; // initialize_InspectorTest
var initializeCallId = 0;
var runTestCallId = 1;
var outputElement;
var outputElementParent;
+var savedOutput;
-function output(text)
+function createOutputElement()
{
- if (!outputElement) {
- var intermediate = document.createElement("div");
- document.body.appendChild(intermediate);
+ var intermediate = document.createElement("div");
+ document.body.appendChild(intermediate);
- outputElementParent = document.createElement("div");
- intermediate.appendChild(outputElementParent);
+ outputElementParent = document.createElement("div");
+ intermediate.appendChild(outputElementParent);
- outputElement = document.createElement("div");
- outputElement.className = "output";
- outputElement.id = "output";
- outputElement.style.whiteSpace = "pre";
- if (!window.quietUntilDone)
- outputElementParent.appendChild(outputElement);
- }
+ outputElement = document.createElement("div");
+ outputElement.className = "output";
+ outputElement.id = "output";
+ outputElement.style.whiteSpace = "pre";
+ if (!window.quietUntilDone)
+ outputElementParent.appendChild(outputElement);
+}
+
+function output(text)
+{
+ if (!outputElement)
+ createOutputElement();
outputElement.appendChild(document.createTextNode(text));
outputElement.appendChild(document.createElement("br"));
}
}
}
+function saveOutput()
+{
+ savedOutput = outputElement ? outputElement.innerHTML : "";
+}
+
+function restoreOutput()
+{
+ if (!savedOutput)
+ return;
+ createOutputElement();
+ outputElement.innerHTML = savedOutput;
+}
+
function StandaloneTestRunnerStub()
{
}