When the tests are run one by one (visualizing the test sequence first) the expected behavior is correct: a save popup is open in the browser and when the content is saved is the one produced by write.
Tried with a normal http request (in a page) and worked like a charm.
So the only problem (if any?!) is that when the entire test sequence is run at once the toString method is called instead (but I think is more over a correct behavior than a wrong one).
As usual I managed to find a weird context and complain about.
Thanks for your support,