title: Protractor/jasmine test throws "UnknownError: unknown error: Maximum call stack size exceeded"
body: <p>I have a test which each time I run it, throws "<strong>UnknownError: unknown error: Maximum call stack size exceeded.</strong> "</p>
  
  <p>This test is calling a method in one of my services which writes to Google Drive. </p>
  
  <p>The test that is failing is calling my doDrive function with "ui", meaning update a Drive item. If I change a single character "ui" -> "ni", meaning create a new Drive item, the test works. The code under test works fine in normal use.</p>
  
  <pre><code>it('should update a file', function() {
  browser.executeAsyncScript(function(callback) {
      // get service
      var service=angular.element(document.getElementById('ngapp')).injector().get('DriveQ')
      // generate a title
      var title = 'title of file';
      // call doDrive to create a new file
      service.doDrive({t:'ui',id:'0B6B-RNrxsCu2Sll7JZTYy2aDA', item:{title:title}})
          .then(function (resp){
                      resp.originalTitle=title;
                      callback(resp)
              });
  }).then(function(resp) {
      expect(resp.title).toEqual(resp.originalTitle);
  });
  });
  </code></pre>
  
  <p>I'm using the chrome webdriver directly, and I also have <code>browser.ignoreSynchronization = true;</code></p>