Last Comment Bug 539713 - Simple Alive test for the Applications Prefpane (Port browser_bug410900.js)
: Simple Alive test for the Applications Prefpane (Port browser_bug410900.js)
Product: SeaMonkey
Classification: Client Software
Component: Preferences (show other bugs)
: Trunk
: All All
-- normal (vote)
: seamonkey2.1a1
Assigned To: Philip Chee
Depends on: 538164
  Show dependency treegraph
Reported: 2010-01-14 08:39 PST by Philip Chee
Modified: 2010-03-18 15:10 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch v1.0 initial implementation. [Checkin: comment 3] (5.32 KB, patch)
2010-03-06 10:22 PST, Philip Chee
neil: review+
bugspam.Callek: feedback+
Details | Diff | Splinter Review

Description User image Philip Chee 2010-01-14 08:39:23 PST
From Bug 538164 comment 12 :

> Is there a consumer of this? This smells like something we usually add mainly
> for tests to use, if there is an actual test for the pane, we probably should
> port that as well.

> If so, as I said, we really should do that, but it can be done in a followup.
Comment 1 User image Philip Chee 2010-03-06 10:22:28 PST
Created attachment 430856 [details] [diff] [review]
Patch v1.0 initial implementation. [Checkin: comment 3]


The Firefox test was using:
+    if (items[i].type == "apppanetest") 
For some reason in SeaMonkey .type was returning undefined, probably because of (listitem vs richlistitem) so I used the attribute instead.

I found two ways of running this test:

1. pure command line:
TEST_PATH=suite/common/tests/preferences/ make -C ../objdir-sm/ mochitest-browser-chrome

2. call up the mochitest UI to run interactively.

cd $OBJ_DIR$
python mozilla/_tests/testing/mochitest/ --browser-chrome --test-path=suite/common/tests/preferences

Passed: 4
Failed: 0
Todo: 0

Running chrome://mochikit/content/browser/suite/common/tests/preferences/browser_bug410900.js...
TEST-PASS | chrome://mochikit/content/browser/suite/common/tests/preferences/browser_bug410900.js | Specified pane was opened
TEST-PASS | chrome://mochikit/content/browser/suite/common/tests/preferences/browser_bug410900.js | handlersView is present
TEST-PASS | chrome://mochikit/content/browser/suite/common/tests/preferences/browser_bug410900.js | App handler list populated
TEST-PASS | chrome://mochikit/content/browser/suite/common/tests/preferences/browser_bug410900.js | apppanetest protocol handler was succesfully added
TEST-INFO | chrome://mochikit/content/browser/suite/common/tests/preferences/browser_bug410900.js | Console message: [JavaScript Error: "uncaught exception: [Exception... "Not enough arguments"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: chrome://global/content/bindings/textbox.xml ::  :: line 160"  data: no]"]

Ignore the last bit which appears to be fallout from the emptytext-to-placeholder patch. Obvious typo should be getAttribute() instead of setAttribute().
Comment 2 User image 2010-03-06 12:30:16 PST
Comment on attachment 430856 [details] [diff] [review]
Patch v1.0 initial implementation. [Checkin: comment 3]

Seems reasonable enough.
Comment 3 User image Jens Hatlak (:InvisibleSmiley) 2010-03-18 15:09:42 PDT
Comment on attachment 430856 [details] [diff] [review]
Patch v1.0 initial implementation. [Checkin: comment 3]

Note You need to log in before you can comment on or make changes to this bug.