Permalink
Browse files

Added failing test for setting User-Agent.

  • Loading branch information...
1 parent f6d3b0b commit 740448d6920cdec59695df5083b6cba4e45f63d3 @bnoguchi bnoguchi committed Jul 1, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/browser.navigation.test.js
@@ -917,6 +917,20 @@ module.exports = {
done();
});
},
+
+ 'test setting user-agent': function(done){
+ var browser = tobi.createBrowser(80,'whatsmyuseragent.com');
+ browser.get('/', function(res,$){
+ res.should.have.status(200);
+ $('#MainBox p strong:first').should.have.text('Your User Agent:');
+ browser.userAgent = ' Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30';
+ browser.get('/', function(res,$){
+ res.should.have.status(200);
+ $('#MainBox p strong:first').should.have.text('Your User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30');
+ done();
+ });
+ });
+ },
after: function(){
app.close();

0 comments on commit 740448d

Please sign in to comment.