[Pkg-mozext-commits] [firebug] 30/68: More test fixes for issue 6130

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag fbtest-1.11.4
in repository firebug.

commit a20d50d4a7a9d3026b0d38936458c289ec513f45
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date:   Fri Apr 5 00:06:25 2013 +0200

    More test fixes for issue 6130
---
 tests/content/console/3663/issue3663.js       |  2 +-
 tests/content/console/5382/issue5382.js       |  4 ++--
 tests/content/console/5786/issue5786.js       |  8 ++++----
 tests/content/console/6104/issue6104.js       |  2 +-
 tests/content/console/882/issue882.html       | 16 ++++++----------
 tests/content/console/882/issue882.js         | 27 ++++++++++++++++++---------
 tests/content/examples/exampleCommandLine1.js |  2 +-
 tests/content/script/2279/errorBreakpoints.js |  2 +-
 8 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/tests/content/console/3663/issue3663.js b/tests/content/console/3663/issue3663.js
index fc4bec2..808f658 100644
--- a/tests/content/console/3663/issue3663.js
+++ b/tests/content/console/3663/issue3663.js
@@ -7,7 +7,7 @@ function runTest()
         FBTest.openFirebug();
         FBTest.enableConsolePanel(function()
         {
-            var config = {tagName: "pre", classes: "objectBox-array"};
+            var config = {tagName: "span", classes: "objectBox-array"};
             FBTest.waitForDisplayedElement("console", config, function(row)
             {
                 var expected = /\s*\[\"a1\"\,\s*\[\.\.\.\]\,\s*\"b1\"\]\s*/;
diff --git a/tests/content/console/5382/issue5382.js b/tests/content/console/5382/issue5382.js
index 96d79a3..3f90219 100644
--- a/tests/content/console/5382/issue5382.js
+++ b/tests/content/console/5382/issue5382.js
@@ -22,7 +22,7 @@ function runTest()
 
 function test1(callback)
 {
-    var config = {tagName: "pre", classes: "objectBox-array"};
+    var config = {tagName: "span", classes: "objectBox-array"};
     FBTest.waitForDisplayedElement("console", config, function(row)
     {
         var expected = /\[\[\"123\"\]\,\s*\[\"1\"\]\]/;
@@ -44,7 +44,7 @@ function test1(callback)
 
 function test2(callback)
 {
-    var config = {tagName: "pre", classes: "objectBox-array"};
+    var config = {tagName: "span", classes: "objectBox-array"};
     FBTest.waitForDisplayedElement("console", config, function(row)
     {
         var expected = /\[1\,\s*Window\s*issue5382\.html\]/;
diff --git a/tests/content/console/5786/issue5786.js b/tests/content/console/5786/issue5786.js
index f0cca74..f0c7076 100644
--- a/tests/content/console/5786/issue5786.js
+++ b/tests/content/console/5786/issue5786.js
@@ -13,25 +13,25 @@ function runTest()
             // jQuery like array
             tasks.push(FBTest.executeCommandAndVerify, "$('a')",
                 "Object[a detail?id=5786, a.a1, a.a2, a.a3]",
-                "pre", "objectBox-array");
+                "span", "objectBox-array");
 
             // HTMLCollection
             tasks.push(FBTest.executeCommandAndVerify,
                 "document.getElementsByTagName('a')",
                 "HTMLCollection[a detail?id=5786, a.a1, a.a2, a.a3]",
-                "pre", "objectBox-array");
+                "span", "objectBox-array");
 
             // NodeList
             tasks.push(FBTest.executeCommandAndVerify,
                 "document.querySelectorAll('a')",
                 "NodeList[a detail?id=5786, a.a1, a.a2, a.a3]",
-                "pre", "objectBox-array");
+                "span", "objectBox-array");
 
             // Array
             tasks.push(FBTest.executeCommandAndVerify,
                 "[].slice.call(document.querySelectorAll('a'))",
                 "[a detail?id=5786, a.a1, a.a2, a.a3]",
-                "pre", "objectBox-array");
+                "span", "objectBox-array");
 
             tasks.run(function()
             {
diff --git a/tests/content/console/6104/issue6104.js b/tests/content/console/6104/issue6104.js
index b865800..7f3164a 100644
--- a/tests/content/console/6104/issue6104.js
+++ b/tests/content/console/6104/issue6104.js
@@ -8,7 +8,7 @@ function runTest()
 
         FBTest.enableConsolePanel(function(win)
         {
-            var config = {tagName: "pre", classes: "objectBox-array"};
+            var config = {tagName: "span", classes: "objectBox-array"};
             FBTest.waitForDisplayedElement("console", config, function(row)
             {
                 var expected = /DOMTokenList\[\"test1\"\, \"test2\"\]/;
diff --git a/tests/content/console/882/issue882.html b/tests/content/console/882/issue882.html
index b1de2cc..b0cf0f7 100644
--- a/tests/content/console/882/issue882.html
+++ b/tests/content/console/882/issue882.html
@@ -7,15 +7,11 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <script language="javascript" type="text/javascript">
 
-   function init() {
-     console.info("init");
+   function log() {
+     console.info("log");
      external();
    };
 
-   window.onload = function() {
-     init();
-   };
-
     </script>
     <script language="javascript" type="text/javascript" 
             src="external.js"></script>
@@ -23,10 +19,10 @@
   <body>
     <h1>Console Source File and Line Number Reporting Bug</h1>
     <ol>
-      <li>Load this page.</li>
-      <li>Observe that console reports that "init" is written from
-      line 10 of this file.  <br/>
-      <b>Issue a:</b> Line 10 is not in the script section.</li>
+      <li>Click this button: <input type="button" onclick="log()" id="button" value="Click me!"> </li>
+      <li>Observe that console reports that "log" is written from
+      line 11 of this file.  <br/>
+      <b>Issue a:</b> Line 11 is not in the script section.</li>
       <li>Observe that console reports that "external" is written from
       line 2 of this file.<br/>
       <b>Issue b:</b> It should report the file name as "external.js",
diff --git a/tests/content/console/882/issue882.js b/tests/content/console/882/issue882.js
index 39ecfa3..a7b55be 100644
--- a/tests/content/console/882/issue882.js
+++ b/tests/content/console/882/issue882.js
@@ -1,6 +1,6 @@
 function runTest() // special function name used by FBTest
 {
-    FBTest.sysout("882.START");  // These messages are shown in the trace console if DBG_TESTCASE is true
+    FBTest.sysout("issue882.START");  // These messages are shown in the trace console if DBG_TESTCASE is true
 
     // basePath is set by FBTestFirebug
     FBTest.openNewTab(basePath + "console/882/issue882.html", function(win)
@@ -8,12 +8,17 @@ function runTest() // special function name used by FBTest
         var panelWindow = FBTest.getPanelDocument().defaultView;
 
         // Use Chromebug to inspect the Firebug UI for elements you want to verify
-        var lookForLogRow = new MutationRecognizer(panelWindow, 'span', {"class": "objectBox-text"}, "external");
+        var lookForLogRow = new MutationRecognizer(panelWindow, "span", {"class": "objectBox-text"}, "external");
+
+        var done = function()
+        {
+            FBTest.testDone("issue882.DONE");
+        };
 
         lookForLogRow.onRecognize(function sawLogRow(elt)
         {
             FBTest.progress("matched objectBox-text", elt);  // shown in the Test Console
-            checkConsoleSourceLinks(elt);
+            checkConsoleSourceLinks(elt, done);
         });
 
         // During the reload the MutationRecognizer executes and logs
@@ -22,14 +27,17 @@ function runTest() // special function name used by FBTest
         FBTest.selectPanel("console");
         FBTest.enableConsolePanel(function(win) // causes reload
         {
-            FBTest.selectPanel("console");
-            FBTest.progress("Loaded "+win.location);
-            FBTest.testDone("882 DONE");
+            FBTest.enableScriptPanel(function(win) // causes reload
+            {
+                FBTest.selectPanel("console");
+                var button = win.document.getElementById("button");
+                FBTest.click(button);
+            });
         });
     });
 }
 
-function checkConsoleSourceLinks(elt)
+function checkConsoleSourceLinks(elt, callback)
 {
     FBTest.progress("checking source links");
     var panelNode = elt.parentNode.parentNode;
@@ -37,8 +45,8 @@ function checkConsoleSourceLinks(elt)
     var links = panelNode.getElementsByClassName("objectLink-sourceLink");
     FBTest.compare("2 sourcelinks", links.length+" sourcelinks", "The test case shows two source links");
 
-    var initLink = links[0].firstChild; // after R4847 there is a div around the text of the link
-    FBTest.compare(FW.FBL.$STRF("Line", ["issue882.html", 10]), initLink.innerHTML, "Line 10 should be linked");
+    var logLink = links[0].firstChild; // after R4847 there is a div around the text of the link
+    FBTest.compare(FW.FBL.$STRF("Line", ["issue882.html", 11]), logLink.innerHTML, "Line 11 should be linked");
 
     var externalLink = links[1].firstChild;
     FBTest.compare(FW.FBL.$STRF("Line", ["external.js", 2]), externalLink.innerHTML, "Line 2 of external.js should be linked");
@@ -51,6 +59,7 @@ function checkConsoleSourceLinks(elt)
     {
         FBTest.compare("sourceRow jumpHighlight", elt.getAttribute("class"),
             "Line is highlighted");  // shown in the Test Console
+        callback();
     });
 
     FBTest.progress("Click the 'external' source link");
diff --git a/tests/content/examples/exampleCommandLine1.js b/tests/content/examples/exampleCommandLine1.js
index f61a500..4f12c21 100644
--- a/tests/content/examples/exampleCommandLine1.js
+++ b/tests/content/examples/exampleCommandLine1.js
@@ -6,7 +6,7 @@ function runTest()
         FBTest.openFirebug();
         FBTest.enableConsolePanel(function(win)
         {
-            var config = {tagName: "pre", classes: "objectBox objectBox-number"};
+            var config = {tagName: "span", classes: "objectBox objectBox-number"};
             FBTest.waitForDisplayedElement("console", config, function(row)
             {
                 FBTest.compare("3", row.textContent, "Number 3 must be displayed");
diff --git a/tests/content/script/2279/errorBreakpoints.js b/tests/content/script/2279/errorBreakpoints.js
index 912aa8b..9888ddc 100644
--- a/tests/content/script/2279/errorBreakpoints.js
+++ b/tests/content/script/2279/errorBreakpoints.js
@@ -11,7 +11,7 @@ function runTest()
             {
                 FBTest.progress("recognized error row: " + el);
 
-                var objBox = el.querySelector("pre.objectBox-errorMessage");
+                var objBox = el.querySelector("span.objectBox-errorMessage");
                 var errBP = el.querySelector("img.errorBreak");
 
                 FBTest.progress("Found Breakpoint button: " + errBP);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list