Open Bug 818597 Opened 12 years ago Updated 2 years ago

Port the basic functionality test for the downloads panel to per-window PB mode

Categories

(Firefox :: Downloads Panel, defect)

x86_64
Linux
defect

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

It would be nice to have an automated test for bug 801232.
I tried to take a stab at this.  It's harder than it seems since this test is based on fancy generators, and I don't know how to add a step in the middle of it to open a window in private mode, wait for it to be loaded, and then proceed.  The magic that I was looking for was something like:

function gen_test() {
  const DownloadData = ...

  let win = OpenBrowserWindow({private: true});
  waitForFocus(func /* not sure what func should be! */, win);
  yield;

  // proceed with the rest...
}

but I couldn't get it to work.

Pointers appreciated!
My suspicion is that there should be some global generator foo that is the result of calling gen_test(), and func should be |function() foo.next()|.
(In reply to comment #2)
> My suspicion is that there should be some global generator foo that is the
> result of calling gen_test(), and func should be |function() foo.next()|.

Isn't that gen_test itself?
No. The first call to gen_test returns the generator object on which next() should be invoked.
(In reply to comment #4)
> No. The first call to gen_test returns the generator object on which next()
> should be invoked.

OK, I'll let you write the patch since it seems like you know what you're talking about then.  :P
Josh, did you mean to work on this?
Eep. Yes.
notice the basic functionality test is disabled per bug 767828, we didn't debug that failure yet
Depends on: 767828
Assignee: josh → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.