mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
+ started work on the first run experience: everything goes into a single new group, and there is an info item as well
+ Added "reset" to the dev menu so we can test first run (since the reset button is currently AWOL) + Added Utils.assertThrow(), an assert that throws an exception
This commit is contained in:
parent
8a017fdd19
commit
990ad5280a
@ -601,6 +601,26 @@ var Utils = {
|
||||
}
|
||||
},
|
||||
|
||||
// Function: assertThrow
|
||||
// Throws label as an exception if condition is false.
|
||||
assertThrow: function(label, condition) {
|
||||
if(!condition) {
|
||||
var text;
|
||||
if(typeof(label) == 'undefined')
|
||||
text = 'badly formed assert';
|
||||
else
|
||||
text = 'tabcandy assert: ' + label;
|
||||
|
||||
if(typeof(printStackTrace) == 'function') {
|
||||
var calls = printStackTrace();
|
||||
calls.splice(0, 3); // Remove this call and the printStackTrace calls
|
||||
text += '\n' + calls.join('\n');
|
||||
}
|
||||
|
||||
throw text;
|
||||
}
|
||||
},
|
||||
|
||||
expandObject: function(obj) {
|
||||
var s = obj + ' = {';
|
||||
for(prop in obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user