mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 728926 - Intermittent failure in browser_dbg_script-switching.js | The correct script was loaded initially. | The first script is displayed.; r=past
This commit is contained in:
parent
ca32e1bec9
commit
29c43d4baa
@ -1093,6 +1093,7 @@ DebuggerView.Scripts = {
|
||||
while (this._scripts.firstChild) {
|
||||
this._scripts.removeChild(this._scripts.firstChild);
|
||||
}
|
||||
this._scriptsEmpty = true;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1185,7 +1186,10 @@ DebuggerView.Scripts = {
|
||||
script.setAttribute("tooltiptext", aScript.url);
|
||||
script.setUserData("sourceScript", aScript, null);
|
||||
|
||||
this._scripts.selectedItem = script;
|
||||
if (this._scriptsEmpty) {
|
||||
this._scriptsEmpty = false;
|
||||
this._scripts.selectedIndex = 0;
|
||||
}
|
||||
return script;
|
||||
},
|
||||
|
||||
@ -1210,6 +1214,12 @@ DebuggerView.Scripts = {
|
||||
*/
|
||||
_scripts: null,
|
||||
|
||||
/**
|
||||
* Flag specifying if the scripts menulist is empty.
|
||||
* This saves us checking for the itemCount value, thus making things faster.
|
||||
*/
|
||||
_scriptsEmpty: true,
|
||||
|
||||
/**
|
||||
* Initialization function, called when the debugger is initialized.
|
||||
*/
|
||||
|
@ -58,6 +58,7 @@ function testScriptsDisplay() {
|
||||
label2), "Second script label is incorrect.");
|
||||
|
||||
|
||||
dump("Debugger editor text:\n" + gDebugger.editor.getText() + "\n");
|
||||
ok(gDebugger.editor.getText().search(/debugger/) != -1,
|
||||
"The correct script was loaded initially.");
|
||||
|
||||
@ -80,6 +81,7 @@ function testScriptsDisplay() {
|
||||
|
||||
function testSwitchPaused()
|
||||
{
|
||||
dump("Debugger editor text:\n" + gDebugger.editor.getText() + "\n");
|
||||
ok(gDebugger.editor.getText().search(/debugger/) == -1,
|
||||
"The second script is no longer displayed.");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user