[Pkg-mozext-commits] [firebug] 01/82: FBTest: merge changes to script/debuggerKeyword test from master
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag fbtest-1.11.2
in repository firebug.
commit deee9fe03f48adf76558b514862871c797c8ce05
Author: Jan Odvarko <odvarko at gmail.com>
Date: Wed Dec 12 14:07:23 2012 +0100
FBTest: merge changes to script/debuggerKeyword test from master
---
.../script/debuggerKeyword/testDriver1.6.js | 24 ++++++++++++----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/tests/content/script/debuggerKeyword/testDriver1.6.js b/tests/content/script/debuggerKeyword/testDriver1.6.js
index 7ca6b31..591b4ea 100644
--- a/tests/content/script/debuggerKeyword/testDriver1.6.js
+++ b/tests/content/script/debuggerKeyword/testDriver1.6.js
@@ -67,19 +67,15 @@ function executeTest(callback, doc, testId, lineNo, disable)
return;
}
- if (!clickDisableButton())
- return;
-
- FBTest.click(doc.getElementById(testId));
-
- setTimeout(function()
+ // Clicking on the 'Disable' button resumes the debugger.
+ clickDisableButton(function()
{
if (testResumeState())
{
FW.Firebug.Debugger.clearAllBreakpoints(null);
callback();
}
- });
+ })
});
// Execute a method with debuggger; keyword in it. This is done
@@ -93,22 +89,28 @@ function testResumeState()
var stopped = chrome.getGlobalAttribute("fbDebuggerButtons", "stopped");
if (!FBTest.compare("false", stopped, "The debugger must be resumed by now"))
{
- FBTest.testDone("debuggerKeyword.FAIL");
+ FBTest.testDone("debuggerKeyword.FAIL; stopped=" + stopped);
return false;
}
return true;
}
-function clickDisableButton()
+function clickDisableButton(callback)
{
var panel = FBTest.getPanel("script");
var button = panel.panelNode.querySelector(".notificationButton.skipButton");
if (!FBTest.ok(button, "There must be a balloon with 'Disable' button."))
{
FBTest.testDone("debuggerKeyword.FAIL");
- return false;
+
+ // Will fail on timeout since the callback will never be executed.
+ return;
}
+ FBTest.waitForDebuggerResume(function()
+ {
+ callback();
+ });
+
FBTest.click(button);
- return true;
}
--
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