Open Bug 447607 Opened 13 years ago Updated 13 years ago

Automate litmus test Testcase ID #5300 - Select All - context-menu item and shortcuts

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

ASSIGNED

People

(Reporter: poonaatsoc, Assigned: poonaatsoc)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Proposed type of test: chrome

Proposed location of test: toolkit/mozapps/downloads/tests/chrome
Attached patch v1.0Splinter Review
I have edited the existing test_select_all.xul by edward for this litmus test.  Test select all tests "accelKey-a", but not "Select All" from the context menu.

"Select All" is now covered by this test.

The test passes.
Attachment #331572 - Flags: review?(sdwilsh)
Product: Firefox → Toolkit
Comment on attachment 331572 [details] [diff] [review]
v1.0

> /**
>  * Test bug 429614 to make sure ctrl/cmd-a work to select all downloads and
>  * hitting delete removes them all.
>+ * Apart from this, it also tests bug 447607, which checks that clicking
>+ * on "Select All" from the context menu of the download, selects all
>+ * downloads in the dm list.
no need to list the bug number

>+      function popupListener() {
>+        let menuitem = popup.childNodes;
>+        for(let i = 0; i < menuitem.length; i++) {
>+          if(menuitem[i].label == "Select All")
>+            menuitem[i].doCommand();
>+        }
test on the command attribute please - not the string label


>+        is(downloadView.selectedCount, sites.length, "All downloads selected on clicking " +
>+           "Select All from the download context menu");
>+
line wrapping at 80 characters please (start the string on a new line)

You don't actually clear the selection from doing accel + a, so the test could fail and we'd never know it.

I would actually change the order in which you do these too.  Do the context menu first, then do the old test.
Attachment #331572 - Flags: review?(sdwilsh) → review-
You need to log in before you can comment on or make changes to this bug.