From 48654d46b84b2838a0ae54b0ee673f52435ba173 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 6 May 2015 14:04:32 -0700 Subject: [PATCH] Bug 1162067: Add some debugging output to test_Debugger.Source.prototype.element.html, to catch intermittent failures. r=jlongster --HG-- extra : rebase_source : 93672173ca2a30e50885d602be48bd1111502557 --- .../test_Debugger.Source.prototype.element.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html b/toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html index e6271d5c5b11..d2eb5c77e9c8 100644 --- a/toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html +++ b/toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html @@ -91,6 +91,7 @@ window.onload = function () { // Try a dynamically inserted out-of-line script element. isolde = doc.createElement('script'); isolde.setAttribute('src', 'Debugger.Source.prototype.element-2.js'); + isolde.setAttribute('id', 'idolde, my dear'); dbg.onDebuggerStatement = isoldeDebuggerHandler; doc.body.appendChild(isolde); } @@ -101,8 +102,16 @@ window.onload = function () { // The top frame should belong to isolde. ok(frame.script.source.element === DOFor(isolde), "top frame belongs to isolde"); + info("frame.script.source.element is: " + uneval(frame.script.source.element)); + if (typeof frame.script.source.element.unsafeDereference() == 'object') { + info(" toString: " + frame.script.source.element.unsafeDereference()); + info(" id: " + frame.script.source.element.unsafeDereference().id); + } + ok(frame.script.source.elementAttributeName === undefined, "top frame source is not an attribute of isolde"); + info("frame.script.source.elementAttributeName is: " + + uneval(frame.script.source.elementAttributeName)); // Try a dynamically created div element with a handler. dieter = doc.createElement('div');