Bug 1162067: Add some debugging output to test_Debugger.Source.prototype.element.html, to catch intermittent failures. r=jlongster
authorJim Blandy <jimb@mozilla.com>
Wed, 06 May 2015 14:04:32 -0700
changeset 242780 aba073bd3884c727cef1424b85034eb756f2eac2
parent 242779 7a63a3b1bd61c5b008680524f9e829ff7905a380
child 242781 b6db7c0824d63402fec6a1685bd22cd5def8d9fe
push id59504
push userjblandy@mozilla.com
push dateThu, 07 May 2015 16:16:32 +0000
treeherdermozilla-inbound@aba073bd3884 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlongster
bugs1162067
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1162067: Add some debugging output to test_Debugger.Source.prototype.element.html, to catch intermittent failures. r=jlongster
toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html
--- a/toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html
+++ b/toolkit/devtools/server/tests/mochitest/test_Debugger.Source.prototype.element.html
@@ -86,28 +86,37 @@ window.onload = function () {
     ok(frame.script.source.element === DOFor(ulrich),
        "top frame belongs to ulrich");
     ok(frame.script.source.elementAttributeName === undefined,
        "top frame is not on an attribute of ulrich");
 
     // 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);
   }
 
   function isoldeDebuggerHandler(frame) {
     log += 'i';
 
     // 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');
     dieter.setAttribute('id', 'dieter');
     dieter.setAttribute('ondrag', 'debugger;');
     dbg.onDebuggerStatement = dieterDebuggerHandler;
     dieter.dispatchEvent(new Event('drag'));
  }