Category ArchiveTesting



Mozilla & Testing 08 Nov 2007 09:08 pm

Assert This! DOM Test Suite

I updated the DOM Test Suite
to use the latest JsUnit and reran the full set of tests to determine
which assertions are still being fired.

The test results are nothing new from what I can tell and are probably already included in the mochikit
version of the DOM Test suite. The assertions are relatively minor and known.

JavaScript & Mozilla & Testing 30 Oct 2007 05:20 pm

JScript Deviations from ES3

Yesterday, Pratap Lakshman of Microsoft announced the publication of the first draft of “JScript Deviations from ES3″

The document covers not only JScript as implemented in IE, but JavaScript as implemented in Firefox, Opera and Safari. This should make for some interesting reading!

Thanks Pratap!

Mozilla & Testing 29 Oct 2007 11:01 am

Assert This! - Top Site Assertions, October 27, 2007

Assert This! - Top Site Assertions, October 27, 2007

No matter where you go, Jesse’s been there already.

During some top site testing of about 7,500 pages with a debug Minefield build on Linux over the weekend, I ran into the following assertions ordered by decreasing count. This should give some idea of the frequency of each in the wild.

2939 ASSERTION: Computed overflow area must contain frame bounds: ‘aNewSize.width == 0 || aNewSize.height == 0 || aOverflowArea->Contains(nsRect(nsPoint(0, 0), aNewSize))’, file 1.9.0/mozilla/layout/generic/nsFrame.cpp, line 5222
1756 ASSERTION: bad argument: ‘(aRight > mLeft) && (aRight < mRight)’, file 1.9.0/mozilla/layout/generic/nsSpaceManager.cpp, line 1403
1333 ASSERTION: no user stylesheets in styleset, but we have one!: ‘numBefore > 0′, file 1.9.0/mozilla/layout/base/nsPresShell.cpp, line 1826
751 ASSERTION: invalid divisor: ‘Error’, file 1.9.0/mozilla/layout/tables/nsTableFrame.cpp, line 3287
345 ASSERTION: didn’t subtract all that we added: ‘totalSPref == 0 && totalSMin == 0 && totalSNonPctPref == 0 && nonPctCount == 0 && minOutsidePref == 0 && minWithinPref == 0 && (info.prefCoord == 0 || info.prefCoord == nscoord_MAX) && (info.prefPercent == 0.0f || !spanHasNonPct)’, file 1.9.0/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line 531
271 ASSERTION: nscoord addition will reach or pass nscoord_MAX: ‘(PRInt64)a + (PRInt64)b < (PRInt64)nscoord_MAX’, file ../../dist/include/gfx/nsCoord.h, line 153
258 ASSERTION: unconstrained widths no longer supported: ‘aContainingBlockWidth != NS_UNCONSTRAINEDSIZE’, file 1.9.0/mozilla/layout/base/nsLayoutUtils.cpp, line 1641
257 ASSERTION: Doing nscoord addition with values > nscoord_MAX: ‘a < nscoord_MAX && b < nscoord_MAX’, file ../../dist/include/gfx/nsCoord.h, line 151
211 ASSERTION: bad width: ‘Not Reached’, file 1.9.0/mozilla/layout/generic/nsLineLayout.cpp, line 177
204 ASSERTION: cannot call on a dirty frame not currently being reflowed: ‘!NS_SUBTREE_DIRTY(this) || (GetStateBits() & NS_FRAME_IN_REFLOW)’, file 1.9.0/mozilla/layout/generic/nsFrame.cpp, line 556
132 ASSERTION: shouldn’t use unconstrained widths anymore: ‘availableWidth != NS_UNCONSTRAINEDSIZE’, file 1.9.0/mozilla/layout/generic/nsHTMLReflowState.cpp, line 302
132 ASSERTION: nsStreamLoader not thread-safe: ‘_mOwningThread.GetThread() == PR_GetCurrentThread()’, file 1.9.0/mozilla/netwerk/base/src/nsStreamLoader.cpp, line 65
111 ASSERTION: RefreshURIList timer callbacks should only be RefreshTimer objects: ‘rt’, file 1.9.0/mozilla/docshell/base/nsDocShell.cpp, line 4635
93 ASSERTION: update-band called late: ‘psd->mX == psd->mLeftEdge’, file 1.9.0/mozilla/layout/generic/nsLineLayout.cpp, line 307
90 ASSERTION: shouldn’t have unconstrained widths anymore: ‘psd->mRightEdge != NS_UNCONSTRAINEDSIZE’, file 1.9.0/mozilla/layout/generic/nsLineLayout.cpp, line 815
48 ASSERTION: shouldn’t have unconstrained widths anymore: ‘NS_UNCONSTRAINEDSIZE != aReflowState.availableWidth’, file 1.9.0/mozilla/layout/generic/nsLineLayout.cpp, line 1099
45 ASSERTION: XPConnect is being called on a scope without a ‘Components’ property!
36 ASSERTION: Should be in an update while destroying frames: ‘mUpdateCount != 0′, file 1.9.0/mozilla/layout/base/nsCSSFrameConstructor.cpp, line 9572
35 ASSERTION: Adding child where we already have a child? This will likely misbehave: ‘Error’, file 1.9.0/mozilla/docshell/shistory/src/nsSHEntry.cpp, line 594
30 ASSERTION: deleting dirty buffer: ‘mBufDirty == PR_FALSE’, file 1.9.0/mozilla/netwerk/cache/src/nsDiskCacheStreams.cpp, line 750
30 ASSERTION: Unhandled border style!!: ‘Not Reached’, file 1.9.0/mozilla/layout/base/nsCSSRendering.cpp, line 1928
30 ASSERTION: Non-border-colors case with borderColorStyleCount < 1 or > 3; what happened?: ‘Error’, file 1.9.0/mozilla/layout/base/nsCSSRendering.cpp, line 2112
30 ASSERTION: Flush() failed: ‘NS_SUCCEEDED(rv)’, file 1.9.0/mozilla/netwerk/cache/src/nsDiskCacheStreams.cpp, line 461
30 ASSERTION: Failed to position iterator!: ‘NS_SUCCEEDED(rv)’, file 1.9.0/mozilla/content/base/src/nsContentIterator.cpp, line 997
27 ASSERTION: RemovedAsPrimaryFrame called after PreDestroy: ‘PR_FALSE’, file 1.9.0/mozilla/layout/forms/nsTextControlFrame.cpp, line 1202
22 ASSERTION: iconv failed: ‘Error’, file 1.9.0/mozilla/xpcom/io/nsNativeCharsetUtils.cpp, line 572
14 ASSERTION: intrinsic widths out of order: ‘aMinCoord <= aPrefCoord’, file 1.9.0/mozilla/layout/tables/nsTableColFrame.h, line 190
14 ASSERTION: PushBack: ‘Not Reached’, file 1.9.0/mozilla/netwerk/protocol/http/src/nsHttpConnection.h, line 117
13 ASSERTION: bad width: ‘metrics.width>=0′, file 1.9.0/mozilla/layout/generic/nsLineLayout.cpp, line 956
12 ASSERTION: this shouldn’t happen anymore: ‘NS_UNCONSTRAINEDSIZE != aComputedWidth && NS_UNCONSTRAINEDSIZE != aAvailWidth’, file 1.9.0/mozilla/layout/generic/nsHTMLReflowState.cpp, line 1924
12 ASSERTION: shouldn’t use unconstrained widths anymore: ‘(mFrameType == NS_CSS_FRAME_TYPE_INLINE && !frame->IsFrameOfType(nsIFrame::eReplaced)) || frame->GetType() == nsGkAtoms::textFrame || mComputedWidth != NS_UNCONSTRAINEDSIZE’, file 1.9.0/mozilla/layout/generic/nsHTMLReflowState.cpp, line 323
11 ASSERTION: Shouldn’t have pending bindings!: ‘mAttachedStack.Length() == 0′, file 1.9.0/mozilla/content/xbl/src/nsBindingManager.cpp, line 913
10 ASSERTION: invalid BC damage area: ‘PR_FALSE’, file 1.9.0/mozilla/layout/tables/nsTableFrame.cpp, line 3861
8 ASSERTION: evictionRank out of sync: ‘evictionRank == mapRecord->EvictionRank()’, file 1.9.0/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp, line 484
7 ASSERTION: no frame, see bug #188946: ‘frame’, file 1.9.0/mozilla/editor/libeditor/base/nsEditor.cpp, line 4159
7 ASSERTION: didn’t subtract all that we added: ’space == 0 && ((l2t == FLEX_PCT_LARGE) ? (-0.001f < basis.f && basis.f < 0.001f) : (basis.c == 0 || basis.c == nscoord_MAX))’, file 1.9.0/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line 1013
7 ASSERTION: can’t mark frame dirty during reflow: ‘!mIsReflowing’, file 1.9.0/mozilla/layout/base/nsPresShell.cpp, line 3132
6 ASSERTION: no unconstrained widths should be present anymore: ‘NS_UNCONSTRAINEDSIZE != aReflowState.ComputedWidth()’, file 1.9.0/mozilla/layout/generic/nsBlockReflowState.cpp, line 113
6 ASSERTION: This shouldn’t be called anymore: ‘Not Reached’, file 1.9.0/mozilla/layout/generic/nsLineLayout.cpp, line 2437
5 ASSERTION: subshell not in the map: ’shellContent’, file 1.9.0/mozilla/docshell/base/nsDocShell.cpp, line 3782
4 ASSERTION: storage allocated for zero data size: ‘!mBinding->mRecord.DataLocationInitialized()’, file 1.9.0/mozilla/netwerk/cache/src/nsDiskCacheStreams.cpp, line 372
4 ASSERTION: cannot call on a dirty frame not currently being reflowed: ‘!NS_SUBTREE_DIRTY(this) || (GetStateBits() & NS_FRAME_IN_REFLOW)’, file 1.9.0/mozilla/layout/generic/nsFrame.cpp, line 583
4 ASSERTION: Uh, LeaveModalState() called w/o a reachable top window?: ‘Error’, file 1.9.0/mozilla/dom/src/base/nsGlobalWindow.cpp, line 5219
4 ASSERTION: Failed to create scaled font: ‘cairo_scaled_font_status(scaledFont) == CAIRO_STATUS_SUCCESS’, file 1.9.0/mozilla/gfx/thebes/src/gfxPangoFonts.cpp, line 672
3 ASSERTION: nsNSSComponent relies on profile manager to wait for synchronous shutdown of all network activity: ‘mIsNetworkDown’, file 1.9.0/mozilla/security/manager/ssl/src/nsNSSComponent.cpp, line 2311
2 ASSERTION: unexpected progress values: ‘progress <= progressMax’, file 1.9.0/mozilla/netwerk/protocol/http/src/nsHttpChannel.cpp, line 4483
1 ASSERTION: More UnblockOnload() calls than BlockOnload() calls; dropping call: ‘Not Reached’, file 1.9.0/mozilla/content/base/src/nsDocument.cpp, line 5625
1 ASSERTION: CachedChromeStream doesn’t receive data: ‘Not Reached’, file 1.9.0/mozilla/content/xul/document/src/nsXULDocument.cpp, line 4339

General & Mozilla & Spider & Testing 06 Jun 2007 10:54 am

Compromised.

My shell account at Dreamhost was compromised and this site was vandalized. It appears this was a wide spread event and a number of other sites hosted at Dreamhost were affected. If you have an account at Dreamhost, I recommend you change your passwords for your shell and email and check your web content for modifications.

I’ve cleaned up the mess (I think). Although as far as I can tell the Spider.xpi was not modified, I have generated a new version of Spider 0.0.2.7 to force an update to any Spider users.

Mozilla & Testing 13 Mar 2007 03:43 pm

Firefox and Thunderbird testing - Script Framework

The latest installment of my automated testing saga is now available at Script Framework. This outlines the components that I have been using in automated testing and provides an example where a build is downloaded, installed, a profile created, an extension installed and a simple test that the extension works is performed.

Mozilla & Testing 09 Mar 2007 11:30 pm

Firefox and Thunderbird testing - killableprocess.py

Benjamin Smedberg wrote to point out killableprocess.py which looks like a much more robust tool than timed_run.py. I’ll check it out as a replacement for timed_run.py in my framework as soon as I finish the first round of documentation I have been supposed to write about my test framework since … like … forever.

Mozilla & Testing 08 Mar 2007 09:13 am

Firefox and Thunderbird testing - timed_run.py

timed_run.py is a modified version of a Python script written by Chris Cooper that manages the execution of external programs with the ability to terminate programs which do not complete within a specified period of time.

Mozilla & Testing 28 Nov 2006 11:19 am

Spider and Firefox automation

Spider has been updated to version 0.0.2.4. This update includes minor changes to the default output messages Spider issues as well as the ability to load browser chrome in addition to normal web pages. I’ve made a kludgey attempt to automate Firefox which simultaneously illustrates the possibilities and pitfalls of this approach. If you are a XUL hacker and have suggestions on how to improve this approach, I would really appreciate your feedback.

/bc

Mozilla & Testing 22 Aug 2006 04:03 pm

A little help please

DANGER! Will Robinson! DANGER!

If you are not comfortable using beta software, do not know how to back up your profile or don’t know what bugzilla is, then please do not download nightly builds for testing!

Every little bit helps…

One of the strengths of the Mozilla community which has helped make Firefox such a success are the people who love Firefox who also help to make it better. Many people have filed bugs on issues they have discovered and I would like to ask those people for a little bit of help.

Mozilla developers have been working hard to fix bugs for the releases of Firefox 2 and Thunderbird 2 later this year. So far, there have been 3331 bugs fixed on the 1.8 branch from which Firefox 2 and Thunderbird 2 will be released. Unfortunately, only 341 have been verified as fixed so far.

Crashes and Hangs

211 bugs which cause crashes or hangs have been fixed but not verified.

Regressions

327 bugs which cause regressions have been fixed but not verified.

If you filed one of the bugs on these lists, it would be very helpful if you could download a nightly build of Firefox 2 or Thunderbird 2 and verify that the bug you filed is actually fixed. Please comment in the bug and add me (bclary at bclary dot com) to the cc list.

Tip: You can easily find the bugs you filed by clicking on one of the above links and after the query loads, clicking the “Edit Search” link at the bottom of the page. Then under Email and Numbering, click the reporter check box under Any of of: and add your bugzilla email address to the field below the contains select box.

Thanks to Brian J Polidoro for bringing this to my attention.

Better now than never!

If you are a developer for a commercial web site or web application and Firefox compatibility is important to you, your employer and your customers, please begin testing your content and applications with the nightly builds of Firefox 2! The code is very quickly being locked down so that it is becoming increasingly difficult to get changes made before the release of Firefox 2. If you don’t report a problem with your site or application soon, it may be impossible to get the fix into the next release. The most important things to look for are regressions where something that worked in Firefox 1.5 is now broken in Firefox 2. This month marks the sixth year I have been a member of the Mozilla Community and it has never failed that someone from a major web site or application developer waits until the last minute to test their content with the upcoming release. Don’t be the grasshopper! Test today not tomorrow!

Mozilla & Testing 20 Jul 2006 03:01 pm

pipefail - testing pipeline exit codes

The problem

In bash, running test programs which indicate their pass or fail status via an exit code can be problematic when they are run as part of a pipeline in Linux, Mac OS X or Cygwin since the reported exit code of a pipeline is normally the exit code of the last program in the pipeline. If the test program is not the last program in the pipeline, then its exit code will be hidden by the exit code of the last program.

The solution

bash version 3 introduced an option which changes the exit code behavior of pipelines and reports the exit code of the pipeline as the exit code of the last program to return a non-zero exit code. So long as none of the programs following the test program report a non-zero exit code, the pipeline will report its exit code to be that of the test program. To enable this option, simply execute:

set -o pipefail

in the shell where the test program will execute.

Caveat Emptor

The pipefail option was introduced in bash version 3 which is supported in current Linux and Cygwin releases of bash but is not supported by the default bash shipped on Mac OS X.

To work around this lagging version on Mac OS X, you can simply download, build and install the latest version of bash from http://ftp.gnu.org/gnu/bash/ into your /usr/local/bin directory. Then code your shell scripts to use the shebang !#/usr/local/bin/bash instead of the normal /bin/bash. For systems such as Linux or Cygwin which already provide a pipefail capable version of bash, simply create a hard link from /usr/local/bin/bash to the system version /bin/bash.

ln /bin/bash /usr/local/bin/bash

Next Page »