Need a controller like a getPlacesController() to open the Places Library

VERIFIED FIXED

Status

P4
normal
VERIFIED FIXED
10 years ago
2 years ago

People

(Reporter: aakashd, Unassigned)

Tracking

Details

(Whiteboard: [verified-mozmill-1.2])

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090104 Minefield/3.2a1pre Ubiquity/0.1.5
Build Identifier: Mozmill 1.0.2

I tried playing around with the recorder and the Places Library and noticed that the following happened when opening up the Places Library 

Cmd+Shift+B:
  controller.keypress(new elementslib.ID(controller.window.document, "main-window"),66,false,false,true,true);

Mouse Click (nothing was shown when selecting the library through the bookmarks menu, but I clicked on the Places toolbar after opening it):

var setupModule = function(module) {
  controller = new mozmill.controller.MozMillController(mozmill.utils.getWindowByTitle("Library"));
}

var testRecorded = function () {
  controller.click(new elementslib.ID(controller.window.document, "placesToolbar"));
}


Since there's already controllers for Preferences, Add-ons and the general Browser, there should also be one for Places (whether its opened through a Show all History or Organize Bookmarks menu options).

Reproducible: Always

Steps to Reproduce:
1. Open Mozmill
2. Start the Recorder
3. Open the Places Library through the bookmarks menu, history menu or Cmd/Ctrl+Shift+B 
4. Stop the Recorder
Actual Results:  
Opening the Places Library isn't instantiated onto the Editor after finishing recording

Expected Results:  
The Places Library should have one simple controller that opens it and puts it into focus much like the getPreferencesController() and getAddonsController()
The way how it should work right now you can see in the following example:

var testLib = function(){
  let ctrl = new mozmill.controller.MozMillController(mozmill.utils.getWindowByTitle("Library"));
  ctrl.type(new elementslib.ID(ctrl.window.document, "searchFilter"), "Mozilla");
}

The inspector always operates on the controller instance which will fail when you are using another window. I think too that we should have a places controller. It's used more often than the add-ons window I believe.

Mikeal, something which could be done for the next minor release?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
Would be nice to have but doesn't stop us from writing tests => P4
Priority: -- → P4
Whiteboard: [mozmill-1.2]
Fixed in r444.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Verified fixed.
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2] → [verified-mozmill-1.2]
(Assignee)

Updated

2 years ago
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.