2011-01-17 Pavel Feldman <pfeldman@chromium.org>
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jan 2011 14:25:50 +0000 (14:25 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jan 2011 14:25:50 +0000 (14:25 +0000)
        Reviewed by Yury Semikhatsky.

        Chromium: updated DevTools tests.

        * src/js/Tests.js:
        (.TestSuite.prototype._waitForScriptPause):
        (.TestSuite.prototype._waitUntilScriptsAreParsed.waitForAllScripts):
        (.TestSuite.prototype._waitUntilScriptsAreParsed):

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

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/js/Tests.js

index 08b5b68fa831df7e4f1f2426a962972ca558b2a9..52d5b464bb4f501b3e41bc65b19765693254cee8 100644 (file)
@@ -1,3 +1,14 @@
+2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Chromium: updated DevTools tests.
+
+        * src/js/Tests.js:
+        (.TestSuite.prototype._waitForScriptPause):
+        (.TestSuite.prototype._waitUntilScriptsAreParsed.waitForAllScripts):
+        (.TestSuite.prototype._waitUntilScriptsAreParsed):
+
 2011-01-17  Adam Barth  <abarth@webkit.org>
 
         Update path to reflect new WebKit directory location.
index 55b24ea8d51290533812d1d3785326d32d20ba91..f2e8dcba2b0adf1540a36d2e6258210aec4df9ac 100644 (file)
@@ -215,33 +215,17 @@ TestSuite.prototype.addSniffer = function(receiver, methodName, override, opt_st
 };
 
 
-// UI Tests
-
-
-/**
- * Tests that resources tab is enabled when corresponding item is selected.
- */
 TestSuite.prototype.testEnableResourcesTab = function()
 {
-    this.showPanel("resources");
-
-    var test = this;
-    this.addSniffer(WebInspector, "updateResource",
-        function(payload) {
-            test.assertEquals("simple_page.html", payload.lastPathComponent);
-            WebInspector.panels.resources.refresh();
-            WebInspector.panels.resources.revealAndSelectItem(WebInspector.resources[payload.id]);
-
-            test.releaseControl();
-        });
+    // FIXME once reference is removed downstream.
+}
 
-    // Following call should lead to reload that we capture in the
-    // addResource override.
-    WebInspector.panels.resources._enableResourceTracking();
+TestSuite.prototype.testCompletionOnPause = function()
+{
+    // FIXME once reference is removed downstream.
+}
 
-    // We now have some time to report results to controller.
-    this.takeControl();
-};
+// UI Tests
 
 
 /**
@@ -624,62 +608,6 @@ TestSuite.prototype.evaluateInConsole_ = function(code, callback)
 };
 
 
-/**
- * Tests that console auto completion works when script execution is paused.
- */
-TestSuite.prototype.testCompletionOnPause = function()
-{
-    this.showPanel("scripts");
-    var test = this;
-    this._executeCodeWhenScriptsAreParsed("handleClick()", ["completion_on_pause.html"]);
-
-    this._waitForScriptPause(
-        {
-            functionsOnStack: ["innerFunction", "handleClick", ""],
-            lineNumber: 9,
-            lineText: "    debugger;"
-        },
-        showConsole);
-
-    function showConsole() {
-        if (WebInspector.currentFocusElement === WebInspector.console.promptElement)
-            testLocalsCompletion();
-        else {
-            test.addSniffer(WebInspector.console, "afterShow", testLocalsCompletion);
-            WebInspector.showConsole();
-        }
-    }
-
-    function testLocalsCompletion() {
-        checkCompletions("th", ["parameter1", "closureLocal", "p", "createClosureLocal"], testThisCompletion);
-    }
-
-    function testThisCompletion() {
-        checkCompletions("this.", ["field1", "field2", "m"], testFieldCompletion);
-    }
-
-    function testFieldCompletion() {
-        checkCompletions("this.field1.", ["id", "name"], function() { test.releaseControl(); });
-    }
-
-    function checkCompletions(expression, expectedProperties, callback) {
-        test.addSniffer(WebInspector.console, "_reportCompletions",
-            function(bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix, result, isException) {
-                test.assertTrue(!isException, "Exception while collecting completions");
-                for (var i = 0; i < expectedProperties.length; i++) {
-                    var name = expectedProperties[i];
-                    test.assertTrue(result[name], "Name " + name + " not found among the completions: " + JSON.stringify(result));
-                }
-                setTimeout(callback, 0);
-            });
-      WebInspector.console.prompt.text = expression;
-      WebInspector.console.prompt.autoCompleteSoon();
-    }
-
-    this.takeControl();
-};
-
-
 /**
  * Checks current execution line against expectations.
  * @param {WebInspector.SourceFrame} sourceFrame
@@ -731,7 +659,7 @@ TestSuite.prototype._waitForScriptPause = function(expectations, callback)
     // Wait until script is paused.
     test.addSniffer(
         WebInspector.debuggerModel,
-        "pausedScript",
+        "_pausedScript",
         function(details) {
             var callFrames = details.callFrames;
             var functionsOnStack = [];
@@ -805,7 +733,7 @@ TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callb
         if (test._scriptsAreParsed(expectedScripts))
             callback();
         else
-            test.addSniffer(WebInspector.debuggerModel, "parsedScriptSource", waitForAllScripts);
+            test.addSniffer(WebInspector.debuggerModel, "_parsedScriptSource", waitForAllScripts);
     }
 
     waitForAllScripts();
@@ -838,29 +766,6 @@ TestSuite.prototype._hookGetPropertiesCallback = function(hook, code)
 };
 
 
-/**
- * Tests "Pause" button will pause debugger when a snippet is evaluated.
- */
-TestSuite.prototype.testPauseInEval = function()
-{
-    this.showPanel("scripts");
-
-    var test = this;
-
-    var pauseButton = document.getElementById("scripts-pause");
-    pauseButton.click();
-
-    devtools.tools.evaluateJavaScript("fib(10)");
-
-    this.addSniffer(WebInspector.debuggerModel, "pausedScript",
-        function() {
-            test.releaseControl();
-        });
-
-    test.takeControl();
-};
-
-
 /**
  * Key event with given key identifier.
  */