console.log("%o", array);
console.log("%O", array);
console.log("Test for zero \"%f\" in formatter", 0);
+ console.log("%% self-escape1", "dummy");
+ console.log("%%s self-escape2", "dummy");
+ console.log("%%ss self-escape3", "dummy");
+ console.log("%%s%s%%s self-escape4", "dummy");
+ console.log("%%%%% self-escape5", "dummy");
+ console.log("%%%s self-escape6", "dummy");
+
// Populate Globals
var regex1 = /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i;
var regex2 = new RegExp("foo\\\\bar\\sbaz", "i");
getFoo: { value: function() { return this.foo; } },
bar: { get: function() { return this.bar; }, set: function(x) { this.bar = x; } }
});
+ var negZero = 1 / Number.NEGATIVE_INFINITY;
+ var textNode = document.getElementById("x").nextSibling;
+ var arrayLikeFunction = function() {};
+ arrayLikeFunction.splice = function() {};
globals = [
regex1, regex2, str, str2, error, errorWithMessage, node, func, multilinefunc, num, linkify,
null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter,
NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array, {}, [function() {}], bar, svg,
- objectWithNonEnumerables, Object.create(null), Object, Object.prototype
+ objectWithNonEnumerables, negZero, Object.create(null), Object, Object.prototype, arrayLikeFunction,
+ new Number(42), new String("abc"), new Uint16Array([1, 2, 3]), textNode, domException()
];
runTest();
}
+function domException()
+{
+ var result = "FAIL";
+ try {
+ var a = document.createElement("div");
+ var b = document.createElement("div");
+ a.removeChild(b);
+ } catch(e) {
+ e.stack = "";
+ result = e;
+ }
+ return result;
+}
+
function test()
{
+ InspectorTest.hideInspectorView();
InspectorTest.evaluateInPage("globals.length", loopOverGlobals.bind(this, 0));
function loopOverGlobals(current, total)
function advance()
{
var next = current + 1;
- if (next == total.description) {
- InspectorTest.expandConsoleMessages();
- InspectorTest.runAfterPendingDispatches(finish);
- } else {
+ if (next == total.description)
+ InspectorTest.waitForRemoteObjectsConsoleMessages(onRemoteObjectsLoaded);
+ else
loopOverGlobals(next, total);
- }
+ }
+
+ function onRemoteObjectsLoaded()
+ {
+ InspectorTest.expandConsoleMessages(finish, undefined, function(section) { return section.titleElement.textContent !== "#text"; });
}
function finish()