[Pkg-mozext-commits] [firebug] 29/68: Issue 6130: test fixes
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:51 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 b2357968264de43edbc91c1a1a44acc7e61845b4
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date: Wed Apr 3 23:54:47 2013 +0200
Issue 6130: test fixes
---
tests/content/commandLine/5779/issue5779.js | 4 ++--
tests/content/commandLine/5873/issue5873.js | 36 ++++++++++++++---------------
tests/content/commandLine/5878/issue5878.js | 8 +++----
tests/content/commandLine/5951/issue5951.js | 2 +-
tests/content/commandLine/api/$x.js | 16 ++++++-------
tests/content/commandLine/api/api.js | 10 ++++----
tests/content/commandLine/dom.html | 2 ++
tests/content/commandLine/dom.js | 24 +++++++++++--------
8 files changed, 55 insertions(+), 47 deletions(-)
diff --git a/tests/content/commandLine/5779/issue5779.js b/tests/content/commandLine/5779/issue5779.js
index 42657de..f0ca80d 100644
--- a/tests/content/commandLine/5779/issue5779.js
+++ b/tests/content/commandLine/5779/issue5779.js
@@ -17,7 +17,7 @@ function runTest()
tasks.push(FBTest.executeCommandAndVerify,
"$$('div');",
"[div.test, div#root, div.rootdiv1, div.rootdiv2]",
- "pre", "objectBox-array");
+ "span", "objectBox-array");
tasks.push(FBTest.executeCommandAndVerify,
"$('div', document.getElementById('root'));",
@@ -27,7 +27,7 @@ function runTest()
tasks.push(FBTest.executeCommandAndVerify,
"$$('div', document.getElementById('root'));",
"[div.rootdiv1, div.rootdiv2]",
- "pre", "objectBox-array");
+ "span", "objectBox-array");
tasks.run(function() {
FBTest.testDone("issue5779.DONE");
diff --git a/tests/content/commandLine/5873/issue5873.js b/tests/content/commandLine/5873/issue5873.js
index ac93058..af3da71 100644
--- a/tests/content/commandLine/5873/issue5873.js
+++ b/tests/content/commandLine/5873/issue5873.js
@@ -157,7 +157,7 @@ function runTest()
{
// Test that evaluations work.
FBTest.executeCommandAndVerify(step3, "a.%global",
- "1", "pre", "objectBox-number");
+ "1", "span", "objectBox-number");
}
function step3()
{
@@ -175,7 +175,7 @@ function runTest()
function step5()
{
// Check that it hit at the right point.
- FBTest.executeCommandAndVerify(step6, "i", "4", "pre", "objectBox-number");
+ FBTest.executeCommandAndVerify(step6, "i", "4", "span", "objectBox-number");
}
function step6()
{
@@ -214,19 +214,19 @@ function runTest()
"Error: permission denied to access cross origin scope", "span", "errorMessage");
}
taskList.push(FBTest.executeCommandAndVerify, "frames[0].location.%framePriv",
- "2", "pre", "objectBox-number");
+ "2", "span", "objectBox-number");
taskList.push(FBTest.executeCommandAndVerify, "frames[0].%framePriv",
- "2", "pre", "objectBox-number");
+ "2", "span", "objectBox-number");
taskList.push(FBTest.executeCommandAndVerify, "frames[0].frameA.%framePriv",
- "2", "pre", "objectBox-number");
+ "2", "span", "objectBox-number");
// Test getting
taskList.push(FBTest.executeCommandAndVerify, "a.%global",
- "1", "pre", "objectBox-number");
+ "1", "span", "objectBox-number");
taskList.push(FBTest.executeCommandAndVerify, "typeof a.%values",
- "\"function\"", "pre", "objectBox-string");
+ "\"function\"", "span", "objectBox-string");
taskList.push(FBTest.executeCommandAndVerify, "a.%nonExistent",
- "undefined", "pre", "objectBox-undefined");
+ "undefined", "span", "objectBox-undefined");
taskList.push(FBTest.executeCommandAndVerify, "emptyObject.%blah",
"Error: missing closure", "span", "errorMessage");
@@ -234,9 +234,9 @@ function runTest()
"TypeError: can't get scope of non-object", "span", "errorMessage");
taskList.push(FBTest.executeCommandAndVerify, "innerA.%b",
- "2", "pre", "objectBox-number");
+ "2", "span", "objectBox-number");
taskList.push(FBTest.executeCommandAndVerify, "innerB.%a",
- "1", "pre", "objectBox-number");
+ "1", "span", "objectBox-number");
// Test setting
taskList.push(FBTest.executeCommandAndVerify, "a.%nonExistent = 1",
@@ -246,16 +246,16 @@ function runTest()
taskList.push(FBTest.executeCommandAndVerify, "delete a.%unused",
"Error: can't delete closure variable", "span", "errorMessage");
taskList.push(FBTest.executeCommandAndVerify, "++a.%local",
- "6", "pre", "objectBox-number");
+ "6", "span", "objectBox-number");
taskList.push(FBTest.executeCommandAndVerify, "emptyObject.%blah = 1",
"Error: missing closure", "span", "errorMessage");
// Verify the setting
taskList.push(FBTest.executeCommandAndVerify, "a.%unused",
- "(optimized away)", "pre", "objectBox-optimizedAway");
+ "(optimized away)", "span", "objectBox-optimizedAway");
taskList.push(FBTest.executeCommandAndVerify, "a.%local",
- "6", "pre", "objectBox-number");
+ "6", "span", "objectBox-number");
// Test that error sources are faked
taskList.push(FBTest.executeCommandAndVerify, "innerA.%a()",
@@ -268,22 +268,22 @@ function runTest()
// Test object->function heuristics:
// * already a function
taskList.push(FBTest.executeCommandAndVerify, "func.%priv",
- "1", "pre", "objectBox-number");
+ "1", "span", "objectBox-number");
// * already a function, but would need scope anyway
taskList.push(FBTest.executeCommandAndVerify, "scopelessFunc.%priv",
"Error: missing closure", "span", "errorMessage");
// * use of own functions
taskList.push(FBTest.executeCommandAndVerify, "funcWithProto.prototype.%priv",
- "10", "pre", "objectBox-number");
+ "10", "span", "objectBox-number");
// * use of own "constructor"
taskList.push(FBTest.executeCommandAndVerify, "func.prototype.%priv",
- "1", "pre", "objectBox-number");
+ "1", "span", "objectBox-number");
// * use of inherited functions
taskList.push(FBTest.executeCommandAndVerify, "new funcWithProto().%priv",
- "10", "pre", "objectBox-number");
+ "10", "span", "objectBox-number");
// * use of "constructor"
taskList.push(FBTest.executeCommandAndVerify, "new func().%priv",
- "1", "pre", "objectBox-number");
+ "1", "span", "objectBox-number");
// Test completion
taskList.push(testCompletion, "new func().%pr", true);
diff --git a/tests/content/commandLine/5878/issue5878.js b/tests/content/commandLine/5878/issue5878.js
index 762ffb1..e1a1a43 100644
--- a/tests/content/commandLine/5878/issue5878.js
+++ b/tests/content/commandLine/5878/issue5878.js
@@ -12,9 +12,9 @@ function runTest()
var tasks = new FBTest.TaskList();
tasks.push(executeIncludeCommand, 'include("./myScript.js");');
- tasks.push(FBTest.executeCommandAndVerify, 'window.a', "1", "pre", "objectBox-number");
+ tasks.push(FBTest.executeCommandAndVerify, 'window.a', "1", "span", "objectBox-number");
tasks.push(executeIncludeCommand, 'include("./myScript.js", "myscript");');
- tasks.push(FBTest.executeCommandAndVerify, 'window.a', "2", "pre", "objectBox-number");
+ tasks.push(FBTest.executeCommandAndVerify, 'window.a', "2", "span", "objectBox-number");
var contextMenuTarget = null;
var expectedMyScriptURL = basePath5878 + "myScript.js";
tasks.push(checkTableContent, "myscript", function(table, row, aliasName, url)
@@ -35,7 +35,7 @@ function runTest()
FBTest.executeContextMenuCommand(contextMenuTarget, "fbInclude", callback);
});
tasks.push(FBTest.executeCommandAndVerify, 'window.a', "3",
- "pre", "objectBox-number", false);
+ "span", "objectBox-number", false);
// (2): test copy location
tasks.push(function(callback)
{
@@ -65,7 +65,7 @@ function runTest()
});
// test for pending scripts
tasks.push(executeIncludeCommand, 'include("./pendingScript.php")');
- tasks.push(FBTest.executeCommandAndVerify, "window.pendingDone", "1", "pre",
+ tasks.push(FBTest.executeCommandAndVerify, "window.pendingDone", "1", "span",
"objectBox-number");
tasks.run(function()
{
diff --git a/tests/content/commandLine/5951/issue5951.js b/tests/content/commandLine/5951/issue5951.js
index 6979ec7..94dc1d3 100644
--- a/tests/content/commandLine/5951/issue5951.js
+++ b/tests/content/commandLine/5951/issue5951.js
@@ -10,7 +10,7 @@ function runTest()
var expression = "document.getElementsByTagName('span')";
var expected = "HTMLCollection[span.test, span#root]";
- var config = {tagName: "pre", classes: "objectBox-array"};
+ var config = {tagName: "span", classes: "objectBox-array"};
FBTest.waitForDisplayedElement("console", config, function(row)
{
FBTest.compare(expected, row.textContent, "Verify: " +
diff --git a/tests/content/commandLine/api/$x.js b/tests/content/commandLine/api/$x.js
index 7055616..b468aa5 100644
--- a/tests/content/commandLine/api/$x.js
+++ b/tests/content/commandLine/api/$x.js
@@ -12,26 +12,26 @@ function runTest()
taskList.push(FBTest.executeCommandAndVerify, "$x(\"//button\")",
"[button#btn1, button#btn2, button#btn3, button#btn4, button#btn5]",
- "pre", "objectBox objectBox-array");
- taskList.push(FBTest.executeCommandAndVerify, "$x(\"count(//button)\")", "5", "pre",
+ "span", "objectBox objectBox-array");
+ taskList.push(FBTest.executeCommandAndVerify, "$x(\"count(//button)\")", "5", "span",
"objectBox objectBox-number");
taskList.push(FBTest.executeCommandAndVerify, "$x(\"string(//button/text())\")",
- "\"Button 1\"", "pre", "objectBox objectBox-string");
+ "\"Button 1\"", "span", "objectBox objectBox-string");
taskList.push(FBTest.executeCommandAndVerify, "$x(\"count(//button)>2\")", "true",
- "pre", "objectBox objectBox-number");
+ "span", "objectBox objectBox-number");
taskList.push(FBTest.executeCommandAndVerify,
"$x(\".//button\", document.getElementById(\"buttonGroup2\"))",
- "[button#btn4, button#btn5]", "pre", "objectBox objectBox-array");
+ "[button#btn4, button#btn5]", "span", "objectBox objectBox-array");
taskList.push(FBTest.executeCommandAndVerify, "$x(\"//button\", document, \"node\")",
/<button\sid="btn1">/, "a", "objectLink objectLink-element");
taskList.push(FBTest.executeCommandAndVerify,
- "$x(\"count(//button)>2\", document, \"number\")", "1", "pre",
+ "$x(\"count(//button)>2\", document, \"number\")", "1", "span",
"objectBox objectBox-number");
taskList.push(FBTest.executeCommandAndVerify,
- "$x(\"count(//button)>2\", document, \"string\")", "\"true\"", "pre",
+ "$x(\"count(//button)>2\", document, \"string\")", "\"true\"", "span",
"objectBox objectBox-string");
taskList.push(FBTest.executeCommandAndVerify,
- "$x(\"//button\", document, \"bool\")", "true", "pre",
+ "$x(\"//button\", document, \"bool\")", "true", "span",
"objectBox objectBox-number");
taskList.run(function() {
diff --git a/tests/content/commandLine/api/api.js b/tests/content/commandLine/api/api.js
index fa2a47d..338d869 100644
--- a/tests/content/commandLine/api/api.js
+++ b/tests/content/commandLine/api/api.js
@@ -19,10 +19,10 @@ function runTest()
"a", "objectLink objectLink-element");
tasks.push(executeAndVerify, "$$(\".a.c\")", "[div.a, div.a]",
- "pre", "objectBox objectBox-array");
+ "span", "objectBox objectBox-array");
tasks.push(executeAndVerify, "$x(\"html/body/span/div[1]\")", "[div.test]",
- "pre", "objectBox objectBox-array");
+ "span", "objectBox objectBox-array");
tasks.push(executeAndVerify, "dir(a)", /\s*a\s*10\s*/,
"table", "domTable");
@@ -32,10 +32,10 @@ function runTest()
"div", "logRow logRow-dirxml");
tasks.push(executeAndVerify, "keys(b)", "[\"a\", \"name\"]",
- "pre", "objectBox objectBox-array");
+ "span", "objectBox objectBox-array");
tasks.push(executeAndVerify, "values(b)", "[7, \"a\"]",
- "pre", "objectBox objectBox-array");
+ "span", "objectBox objectBox-array");
tasks.push(executeAndVerify, "table(a)", FW.FBL.$STR("firebug.reps.table.ObjectProperties") + "10",
"div", "logRow logRow-table");
@@ -44,7 +44,7 @@ function runTest()
tasks.push(executeAndVerify,
"$$('.a').map(function(item){return item.localName;});",
"[\"div\", \"div\", \"div\"]",
- "pre", "objectBox objectBox-array");
+ "span", "objectBox objectBox-array");
// $x must also return a real array so, eg map() can be applied.
tasks.push(executeAndVerify,
diff --git a/tests/content/commandLine/dom.html b/tests/content/commandLine/dom.html
index e910a8f..de5c2a1 100644
--- a/tests/content/commandLine/dom.html
+++ b/tests/content/commandLine/dom.html
@@ -43,6 +43,8 @@ var aa = "three";
var bb = undefined;
var cc = null;
var dd = 2;
+var multiline = "multi\nline";
+var multispace = "multi space";
function set_d_val(td) {
dd = td;
diff --git a/tests/content/commandLine/dom.js b/tests/content/commandLine/dom.js
index 86af137..3b65eab 100644
--- a/tests/content/commandLine/dom.js
+++ b/tests/content/commandLine/dom.js
@@ -14,7 +14,7 @@ function runTest()
// parameters.
taskList.push(executeAndVerify, "state = true;", "true",
- "pre", "objectBox objectBox-number");
+ "span", "objectBox objectBox-number");
taskList.push(executeAndVerify, "window", "Window dom.html",
"a", " objectLink objectLink-object");
@@ -23,25 +23,31 @@ function runTest()
"a", " objectLink objectLink-object");
taskList.push(executeAndVerify, "aa", "\"three\"",
- "pre", "objectBox objectBox-string");
+ "span", "objectBox objectBox-string");
taskList.push(executeAndVerify, "cc", "null",
- "pre", "objectBox objectBox-null");
+ "span", "objectBox objectBox-null");
taskList.push(executeAndVerify, "dd", "2",
- "pre", "objectBox objectBox-number");
+ "span", "objectBox objectBox-number");
taskList.push(executeAndVerify, "dd = 999", "999",
- "pre", "objectBox objectBox-number");
+ "span", "objectBox objectBox-number");
taskList.push(executeAndVerify, "dd", "999",
- "pre", "objectBox objectBox-number");
+ "span", "objectBox objectBox-number");
taskList.push(executeAndVerify, "set_d_val", "set_d_val(td)",
"a", "objectLink objectLink-function");
taskList.push(executeAndVerify, "set_d_val(998);", "998",
- "pre", "objectBox objectBox-number");
+ "span", "objectBox objectBox-number");
+
+ // Strings with copyable white-space
+ taskList.push(executeAndVerify, "multiline", "\"multi\nline\"",
+ "pre", "objectBox objectBox-string");
+ taskList.push(executeAndVerify, "multispace", "\"multi space\"",
+ "pre", "objectBox objectBox-string");
// Errors
FBTest.setPref("ObjectShortIteratorMax", 1); // Related to R6588
@@ -52,10 +58,10 @@ function runTest()
// Assignment
taskList.push(executeAndVerify, "var blah = 'oink';",
">>> var blah = 'oink';",
- "pre", "objectBox objectBox-text");
+ "span", "objectBox objectBox-text");
taskList.push(executeAndVerify, "blah", "\"oink\"",
- "pre", "objectBox objectBox-string");
+ "span", "objectBox objectBox-string");
// DOM Elements
taskList.push(executeAndVerify,
--
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