author | Marco Bonardo <mbonardo@mozilla.com> |
Tue, 26 Jul 2011 11:53:11 +0200 | |
changeset 73331 | ee078de32bbae5b80b9a10053796ead673a48b03 |
parent 73321 | 6f72420d9852c6693b526f5f300b944042b028e8 (current diff) |
parent 73330 | 982a5835fba1bddf72e64775a5601132bef77181 (diff) |
child 73332 | de99c5ffafd0a31cd962d506d847b5d2f6607b23 |
push id | 771 |
push user | mak77@bonardo.net |
push date | Tue, 26 Jul 2011 09:53:31 +0000 |
treeherder | mozilla-inbound@ee078de32bba [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 8.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
|
--- a/browser/base/content/inspector.js +++ b/browser/base/content/inspector.js @@ -877,16 +877,17 @@ var InspectorUI = { /** * Begin inspecting webpage, attach page event listeners, activate * highlighter event listeners. */ startInspecting: function IUI_startInspecting() { this.attachPageListeners(); this.inspecting = true; + this.highlighter.veilTransparentBox.removeAttribute("locked"); }, /** * Stop inspecting webpage, detach page listeners, disable highlighter * event listeners. */ stopInspecting: function IUI_stopInspecting() { @@ -896,16 +897,17 @@ var InspectorUI = { this.detachPageListeners(); this.inspecting = false; if (this.highlighter.node) { this.select(this.highlighter.node, true, true); } else { this.select(null, true, true); } + this.highlighter.veilTransparentBox.setAttribute("locked", true); }, /** * Select an object in the tree view. * @param aNode * node to inspect * @param forceUpdate * force an update?
--- a/browser/base/content/tabview/modules/AllTabs.jsm +++ b/browser/base/content/tabview/modules/AllTabs.jsm @@ -30,16 +30,18 @@ * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ +"use strict"; + const Cu = Components.utils; Cu.import("resource://gre/modules/Services.jsm"); let EXPORTED_SYMBOLS = ["AllTabs"]; let AllTabs = { // ---------- // Function: toString @@ -159,18 +161,18 @@ function tabEventListener(event) { Cu.reportError(ex); } }); } function observer(subject, topic, data) { switch (topic) { case "domwindowopened": - subject.addEventListener("load", function() { - subject.removeEventListener("load", arguments.callee, false); + subject.addEventListener("load", function onLoad() { + subject.removeEventListener("load", onLoad, false); // Now that the window has loaded, only register on browser windows let doc = subject.document.documentElement; if (doc.getAttribute("windowtype") == "navigator:browser") registerBrowserWindow(subject); }, false); break; }
--- a/browser/base/content/tabview/modules/utils.jsm +++ b/browser/base/content/tabview/modules/utils.jsm @@ -40,16 +40,18 @@ * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ +"use strict"; + // ********** // Title: utils.js let EXPORTED_SYMBOLS = ["Point", "Rect", "Range", "Subscribable", "Utils"]; // ######### const Ci = Components.interfaces; const Cu = Components.utils; @@ -364,20 +366,21 @@ Range.prototype = { var proportion = (value - this.min) / this.extent; if (smooth) { // The ease function ".5+.5*Math.tanh(4*x-2)" is a pretty // little graph. It goes from near 0 at x=0 to near 1 at x=1 // smoothly and beautifully. // http://www.wolframalpha.com/input/?i=.5+%2B+.5+*+tanh%28%284+*+x%29+-+2%29 - function tanh(x) { + let tanh = function tanh(x) { var e = Math.exp(x); return (e - 1/e) / (e + 1/e); - } + }; + return .5 - .5 * tanh(2 - 4 * proportion); } return proportion; }, // ---------- // Function: scale
--- a/browser/base/content/tabview/search.js +++ b/browser/base/content/tabview/search.js @@ -580,27 +580,26 @@ function ensureSearchShown(activatedByKe $search.show(); #ifdef XP_MACOSX UI.setTitlebarColors({active: "#717171", inactive: "#EDEDED"}); #endif // NOTE: when this function is called by keydown handler, next keypress // event or composition events of IME will be fired on the focused editor. - - function dispatchTabViewSearchEnabledEvent() { + let dispatchTabViewSearchEnabledEvent = function dispatchTabViewSearchEnabledEvent() { let newEvent = document.createEvent("Events"); newEvent.initEvent("tabviewsearchenabled", false, false); dispatchEvent(newEvent); }; if (activatedByKeypress) { // set the focus so key strokes are entered into the textbox. $searchbox[0].focus(); - dispatchTabViewSearchEnabledEvent(); + dispatchTabViewSearchEnabledEvent(); } else { // marshal the focusing, otherwise it ends up with searchbox[0].focus gets // called before the search button gets the focus after being pressed. setTimeout(function setFocusAndDispatchSearchEnabledEvent() { $searchbox[0].focus(); dispatchTabViewSearchEnabledEvent(); }, 0); }
--- a/browser/base/content/tabview/tabitems.js +++ b/browser/base/content/tabview/tabitems.js @@ -477,16 +477,17 @@ TabItem.prototype = Utils.extend(new Ite // Parameters: // groupClose - true if this method is called by group close action. // Returns true if this tab is removed. close: function TabItem_close(groupClose) { // When the last tab is closed, put a new tab into closing tab's group. If // closing tab doesn't belong to a group and no empty group, create a new // one for the new tab. if (!groupClose && gBrowser.tabs.length == 1) { + let group; if (this.tab._tabViewTabItem.parent) { group = this.tab._tabViewTabItem.parent; } else { let emptyGroups = GroupItems.groupItems.filter(function (groupItem) { return (!groupItem.getChildren().length); }); group = (emptyGroups.length ? emptyGroups[0] : GroupItems.newGroup()); }
--- a/browser/base/content/tabview/tabview.js +++ b/browser/base/content/tabview/tabview.js @@ -1,8 +1,10 @@ +"use strict"; + const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; const Cr = Components.results; Cu.import("resource:///modules/tabview/AllTabs.jsm"); Cu.import("resource:///modules/tabview/utils.jsm"); Cu.import("resource://gre/modules/Services.jsm");
--- a/browser/base/content/tabview/thumbnailStorage.js +++ b/browser/base/content/tabview/thumbnailStorage.js @@ -100,18 +100,18 @@ let ThumbnailStorage = { gBrowser.browsers.forEach(function(browser) { let checkAndAddToList = function(browserObj) { if (!self.enablePersistentHttpsCaching && browserObj.currentURI.schemeIs("https")) self.excludedBrowsers.push(browserObj); }; if (browser.contentDocument.readyState != "complete" || browser.webProgress.isLoadingDocument) { - browser.addEventListener("load", function() { - browser.removeEventListener("load", arguments.callee, true); + browser.addEventListener("load", function onLoad() { + browser.removeEventListener("load", onLoad, true); checkAndAddToList(browser); }, true); } else { checkAndAddToList(browser); } }); gBrowser.addTabsProgressListener(this); },
--- a/browser/base/content/tabview/ui.js +++ b/browser/base/content/tabview/ui.js @@ -856,18 +856,18 @@ let UI = { return; } if (this._closedLastVisibleTab || (this._closedSelectedTabInTabView && !this.closedLastTabInTabView) || this.restoredClosedTab) { if (this.restoredClosedTab) { // when the tab view UI is being displayed, update the thumb for the // restored closed tab after the page load - tab.linkedBrowser.addEventListener("load", function (event) { - tab.linkedBrowser.removeEventListener("load", arguments.callee, true); + tab.linkedBrowser.addEventListener("load", function onLoad(event) { + tab.linkedBrowser.removeEventListener("load", onLoad, true); TabItems._update(tab); }, true); } this._closedLastVisibleTab = false; this._closedSelectedTabInTabView = false; this.closedLastTabInTabView = false; this.restoredClosedTab = false; return;
--- a/browser/base/content/test/tabview/browser_tabview_bug597980.js +++ b/browser/base/content/test/tabview/browser_tabview_bug597980.js @@ -66,20 +66,20 @@ function part2(win) { let newTab = win.gBrowser.loadOneTab("about:blank", {inBackground: true}); hideTabView(function() { let selectedTab = win.gBrowser.selectedTab; isnot(selectedTab, newTab, "They are different tabs"); // switch the selected tab to new tab win.gBrowser.selectedTab = newTab; - win.addEventListener("tabviewhidden", function () { - win.removeEventListener("tabviewhidden", arguments.callee, false); + whenTabViewIsHidden(function () { is(win.gBrowser.selectedTab, newTab, "The seleted tab should be the same as before (new tab)"); win.close(); finish(); - }, false); + }); + // show tabview EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, win); // hide tabview EventUtils.synthesizeKey("e", { accelKey: true, shiftKey: true }, win); }) }
--- a/browser/base/content/test/tabview/browser_tabview_bug598600.js +++ b/browser/base/content/test/tabview/browser_tabview_bug598600.js @@ -4,18 +4,18 @@ let newWin; function test() { let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore); waitForExplicitFinish(); // open a new window and setup the window state. newWin = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no"); - newWin.addEventListener("load", function(event) { - this.removeEventListener("load", arguments.callee, false); + newWin.addEventListener("load", function onLoad(event) { + this.removeEventListener("load", onLoad, false); let newState = { windows: [{ tabs: [{ entries: [{ "url": "about:blank" }], hidden: true, attributes: {}, extData: {
--- a/browser/base/content/test/tabview/browser_tabview_bug618828.js +++ b/browser/base/content/test/tabview/browser_tabview_bug618828.js @@ -50,18 +50,18 @@ function onTabViewWindowLoaded(win, tab) } let testClickOnOtherSearchResult = function () { // search for the tab from our main window searchbox.setAttribute('value', 'other'); contentWindow.performSearch(); // prepare to finish when the main window gets focus back - window.addEventListener('focus', function () { - window.removeEventListener('focus', arguments.callee, true); + window.addEventListener('focus', function onFocus() { + window.removeEventListener('focus', onFocus, true); assertSearchIsDisabled(); // check that the right tab is active is(gBrowser.selectedTab, tab, 'search result is the active tab'); finishTest(); }, true);
--- a/browser/base/content/test/tabview/browser_tabview_bug622835.js +++ b/browser/base/content/test/tabview/browser_tabview_bug622835.js @@ -6,22 +6,20 @@ function test() { newWindowWithTabView(onTabViewShown); } function onTabViewShown(win) { let contentWindow = win.TabView.getContentWindow(); let finishTest = function () { - win.addEventListener('tabviewhidden', function () { - win.removeEventListener('tabviewhidden', arguments.callee, false); + hideTabView(function () { win.close(); finish(); - }, false); - win.TabView.hide(); + }, win); } // do not let the group arrange itself contentWindow.GroupItems.pauseArrange(); // let's create a groupItem small enough to get stacked let groupItem = new contentWindow.GroupItem([], { immediately: true,
--- a/browser/base/content/test/tabview/browser_tabview_multiwindow_search.js +++ b/browser/base/content/test/tabview/browser_tabview_multiwindow_search.js @@ -3,37 +3,35 @@ let newWindows = []; function test() { waitForExplicitFinish(); let windowOne = openDialog(location, "", "chrome,all,dialog=no", "data:text/html,"); let windowTwo; - windowOne.addEventListener("load", function() { - windowOne.removeEventListener("load", arguments.callee, false); - windowOne.gBrowser.selectedBrowser.addEventListener("load", function() { - windowOne.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); + whenWindowLoaded(windowOne, function () { + windowOne.gBrowser.selectedBrowser.addEventListener("load", function onLoad() { + windowOne.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true); windowTwo = openDialog(location, "", "chrome,all,dialog=no", "http://mochi.test:8888/"); - windowTwo.addEventListener("load", function() { - windowTwo.removeEventListener("load", arguments.callee, false); - windowTwo.gBrowser.selectedBrowser.addEventListener("load", function() { - windowTwo.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); + whenWindowLoaded(windowTwo, function () { + windowTwo.gBrowser.selectedBrowser.addEventListener("load", function onLoad() { + windowTwo.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true); newWindows = [ windowOne, windowTwo ]; // show the tab view window.addEventListener("tabviewshown", onTabViewWindowLoaded, false); ok(!TabView.isVisible(), "Tab View is hidden"); TabView.toggle(); }, true); - }, false); + }); }, true); - }, false); + }); } function onTabViewWindowLoaded() { window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false); ok(TabView.isVisible(), "Tab View is visible"); let contentWindow = document.getElementById("tab-view").contentWindow; let search = contentWindow.document.getElementById("search");
--- a/browser/base/content/test/tabview/head.js +++ b/browser/base/content/test/tabview/head.js @@ -163,33 +163,33 @@ function hideTabView(callback, win) { function whenTabViewIsHidden(callback, win) { win = win || window; if (!win.TabView.isVisible()) { callback(); return; } - win.addEventListener('tabviewhidden', function () { - win.removeEventListener('tabviewhidden', arguments.callee, false); + win.addEventListener('tabviewhidden', function onHidden() { + win.removeEventListener('tabviewhidden', onHidden, false); callback(); }, false); } // ---------- function whenTabViewIsShown(callback, win) { win = win || window; if (win.TabView.isVisible()) { callback(); return; } - win.addEventListener('tabviewshown', function () { - win.removeEventListener('tabviewshown', arguments.callee, false); + win.addEventListener('tabviewshown', function onShown() { + win.removeEventListener('tabviewshown', onShown, false); callback(); }, false); } // ---------- function showSearch(callback, win) { win = win || window;
--- a/browser/themes/gnomestripe/browser/browser.css +++ b/browser/themes/gnomestripe/browser/browser.css @@ -1954,8 +1954,13 @@ panel[dimmed="true"] { left: 12px; } #highlighter-veil-transparentbox { box-shadow: 0 0 0 1px rgba(0,0,0,0.5); outline: 1px dashed rgba(255,255,255,0.5); outline-offset: -1px; } + +#highlighter-veil-transparentbox[locked] { + box-shadow: 0 0 0 1px black; + outline-color: white; +}
--- a/browser/themes/pinstripe/browser/browser.css +++ b/browser/themes/pinstripe/browser/browser.css @@ -2528,8 +2528,13 @@ panel[dimmed="true"] { left: 12px; } #highlighter-veil-transparentbox { box-shadow: 0 0 0 1px rgba(0,0,0,0.5); outline: 1px dashed rgba(255,255,255,0.5); outline-offset: -1px; } + +#highlighter-veil-transparentbox[locked] { + box-shadow: 0 0 0 1px black; + outline-color: white; +}
--- a/browser/themes/winstripe/browser/browser.css +++ b/browser/themes/winstripe/browser/browser.css @@ -2515,8 +2515,13 @@ panel[dimmed="true"] { left: 12px; } #highlighter-veil-transparentbox { box-shadow: 0 0 0 1px rgba(0,0,0,0.5); outline: 1px dashed rgba(255,255,255,0.5); outline-offset: -1px; } + +#highlighter-veil-transparentbox[locked] { + box-shadow: 0 0 0 1px black; + outline-color: white; +}
--- a/config/config.mk +++ b/config/config.mk @@ -159,20 +159,20 @@ endif CC := $(CC_WRAPPER) $(CC) CXX := $(CXX_WRAPPER) $(CXX) MKDIR ?= mkdir SLEEP ?= sleep TOUCH ?= touch ifndef .PYMAKE -PYTHONPATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py +PYTHON_PATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py else PYCOMMANDPATH += $(topsrcdir)/config -PYTHONPATH = %pythonpath main +PYTHON_PATH = %pythonpath main endif # determine debug-related options _DEBUG_CFLAGS := _DEBUG_LDFLAGS := ifdef MOZ_DEBUG _DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
--- a/config/rules.mk +++ b/config/rules.mk @@ -1532,17 +1532,17 @@ endif XPIDL_DEPS = \ $(topsrcdir)/xpcom/idl-parser/header.py \ $(topsrcdir)/xpcom/idl-parser/xpidl.py \ $(NULL) $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done $(REPORT_BUILD) - $(PYTHONPATH) \ + $(PYTHON_PATH) \ -I$(topsrcdir)/other-licenses/ply \ -I$(topsrcdir)/xpcom/idl-parser \ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(topsrcdir)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ @if test -n "$(findstring $*.h, $(EXPORTS))"; \ then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi ifndef NO_GEN_XPT # generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
--- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -1951,16 +1951,22 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns tmp->mRadioGroups.Clear(); // nsDocument has a pretty complex destructor, so we're going to // assume that *most* cycles you actually want to break somewhere // else, and not unlink an awful lot here. tmp->mIdentifierMap.Clear(); + +#ifdef MOZ_SMIL + if (tmp->mAnimationController) { + tmp->mAnimationController->Unlink(); + } +#endif // MOZ_SMIL tmp->mInUnlinkOrDeletion = PR_FALSE; NS_IMPL_CYCLE_COLLECTION_UNLINK_END nsresult nsDocument::Init() {
--- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -3610,17 +3610,17 @@ nsGenericElement::DispatchClickEvent(nsP } event.pressure = pressure; event.clickCount = clickCount; event.inputSource = inputSource; event.isShift = aSourceEvent->isShift; event.isControl = aSourceEvent->isControl; event.isAlt = aSourceEvent->isAlt; event.isMeta = aSourceEvent->isMeta; - event.flags = aFlags; + event.flags |= aFlags; // Be careful not to overwrite existing flags! return DispatchEvent(aPresContext, &event, aTarget, aFullDispatch, aStatus); } nsIFrame* nsGenericElement::GetPrimaryFrame(mozFlushType aType) { nsIDocument* doc = GetCurrentDoc();
--- a/js/src/config/config.mk +++ b/js/src/config/config.mk @@ -159,20 +159,20 @@ endif CC := $(CC_WRAPPER) $(CC) CXX := $(CXX_WRAPPER) $(CXX) MKDIR ?= mkdir SLEEP ?= sleep TOUCH ?= touch ifndef .PYMAKE -PYTHONPATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py +PYTHON_PATH = $(PYTHON) $(topsrcdir)/config/pythonpath.py else PYCOMMANDPATH += $(topsrcdir)/config -PYTHONPATH = %pythonpath main +PYTHON_PATH = %pythonpath main endif # determine debug-related options _DEBUG_CFLAGS := _DEBUG_LDFLAGS := ifdef MOZ_DEBUG _DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
--- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -1532,17 +1532,17 @@ endif XPIDL_DEPS = \ $(topsrcdir)/xpcom/idl-parser/header.py \ $(topsrcdir)/xpcom/idl-parser/xpidl.py \ $(NULL) $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done $(REPORT_BUILD) - $(PYTHONPATH) \ + $(PYTHON_PATH) \ -I$(topsrcdir)/other-licenses/ply \ -I$(topsrcdir)/xpcom/idl-parser \ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(topsrcdir)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@ @if test -n "$(findstring $*.h, $(EXPORTS))"; \ then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi ifndef NO_GEN_XPT # generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
--- a/toolkit/components/console/hudservice/HUDService.jsm +++ b/toolkit/components/console/hudservice/HUDService.jsm @@ -5420,19 +5420,22 @@ ConsoleUtils = { aClipboardText = aClipboardText || (aBody + (aSourceURL ? " @ " + aSourceURL : "") + (aSourceLine ? ":" + aSourceLine : "")); aBody = aBody instanceof Ci.nsIDOMNode ? aBody : aDocument.createTextNode(aBody); bodyNode.appendChild(aBody); + let repeatContainer = aDocument.createElementNS(XUL_NS, "xul:hbox"); + repeatContainer.setAttribute("align", "start"); let repeatNode = aDocument.createElementNS(XUL_NS, "xul:label"); repeatNode.setAttribute("value", "1"); repeatNode.classList.add("webconsole-msg-repeat"); + repeatContainer.appendChild(repeatNode); // Create the timestamp. let timestampNode = aDocument.createElementNS(XUL_NS, "xul:label"); timestampNode.classList.add("webconsole-timestamp"); let timestamp = ConsoleUtils.timestamp(); let timestampString = ConsoleUtils.timestampString(timestamp); timestampNode.setAttribute("value", timestampString); @@ -5450,17 +5453,17 @@ ConsoleUtils = { node.classList.add("hud-msg-node"); node.timestamp = timestamp; ConsoleUtils.setMessageType(node, aCategory, aSeverity); node.appendChild(timestampNode); // childNode[0] node.appendChild(iconContainer); // childNode[1] node.appendChild(bodyNode); // childNode[2] - node.appendChild(repeatNode); // childNode[3] + node.appendChild(repeatContainer); // childNode[3] if (locationNode) { node.appendChild(locationNode); // childNode[4] } node.setAttribute("id", "console-msg-" + HUDService.sequenceId()); return node; }, @@ -5585,18 +5588,19 @@ ConsoleUtils = { * * @param nsIDOMNode aOriginal * The Original Node. The one being merged into. * @param nsIDOMNode aFiltered * The node being filtered out because it is repeated. */ mergeFilteredMessageNode: function ConsoleUtils_mergeFilteredMessageNode(aOriginal, aFiltered) { - // childNodes[3] is the node containing the number of repetitions of a node. - let repeatNode = aOriginal.childNodes[3]; + // childNodes[3].firstChild is the node containing the number of repetitions + // of a node. + let repeatNode = aOriginal.childNodes[3].firstChild; if (!repeatNode) { return aOriginal; // no repeat node, return early. } let occurrences = parseInt(repeatNode.getAttribute("value")) + 1; repeatNode.setAttribute("value", occurrences); },
--- a/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_611795.js +++ b/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_611795.js @@ -11,28 +11,29 @@ function onContentLoaded() let HUD = HUDService.getHudByWindow(content); let jsterm = HUD.jsterm; let outputNode = HUD.outputNode; let msg = "The unknown CSS property warning is displayed only once"; let node = outputNode.firstChild; - is (node.childNodes[2].textContent, "Unknown property '-moz-opacity'. Declaration dropped.", "correct node") - is(node.childNodes[3].getAttribute("value"), 2, msg); + is(node.childNodes[2].textContent, "Unknown property '-moz-opacity'. Declaration dropped.", "correct node") + is(node.childNodes[3].firstChild.getAttribute("value"), 2, msg); jsterm.clearOutput(); - jsterm.setInputValue("for (let i = 0; i < 10; ++i) console.log('hi');"); + jsterm.setInputValue("for (let i = 0; i < 10; ++i) console.log('this is a line of reasonably long text that I will use to verify that the repeated text node is of an appropriate size.');"); jsterm.execute(); - msg = "The console output is repeated 10 times"; + let msg = "The console output is repeated 10 times"; let node = outputNode.querySelector(".webconsole-msg-console"); - is(node.childNodes[3].getAttribute("value"), 10, msg); + is(node.childNodes[3].firstChild.getAttribute("value"), 10, msg); + jsterm.clearOutput(); finishTest(); } /** * Unit test for bug 611795: * Repeated CSS messages get collapsed into one. */ function test()