Closed Bug 579233 Opened 14 years ago Closed 14 years ago

Random failure of browser_settitle.js followed by timeout of browser_visituri.js

Categories

(Toolkit :: Places, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mak, Unassigned)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1279239313.1279242389.18593.gz

************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'[JavaScript Error: "this.storage is undefined" {file: "resource://gre/modules/HUDService.jsm" line: 432}]' when calling method: [nsIObserver::observe]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "<unknown>"  data: yes]
************************************************************
TEST-INFO | chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_settitle.js | Console message: [JavaScript Error: "this.storage is undefined" {file: "resource://gre/modules/HUDService.jsm" line: 432}]
NEXT ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_settitle.js |  - Got http://example.com/tests/toolkit/components/places/tests/browser/399606-location.reload.html, expected http://example.com/tests/toolkit/components/places/tests/browser/title2.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_settitle.js |  - Got location.reload(), expected Some title
TEST-PASS | chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_settitle.js |

TEST-INFO | chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_visituri.js | Console message: [JavaScript Error: "this.storage is undefined" {file: "resource://gre/modules/HUDService.jsm" line: 432}]
NEXT ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_visituri.js | Timed out

looks like some previous test could hit us here, there are lots of hudservice warnings
It looks like this test is getting the title change of the previous test.  I updated the test to wait until it gets the title notification it expected (and make sure it isn't anything explicitly unexpected).
Attachment #458430 - Flags: review?(mak77)
Comment on attachment 458430 [details] [diff] [review]
Wait until we get an expected title


>+      ok(aURI.spec != "http://example.com/tests/toolkit/components/places/tests/browser/title1.html");
>+      if (aURI.spec != "http://example.com/tests/toolkit/components/places/tests/browser/title2.html") {
>+        return;
>+      }

I prefer if you wrap all the rest in a positive if, it should be easier to follow

> 
>       PlacesUtils.history.removeObserver(this);
>-      confirmResults(this.data);
>+      is(aPageTitle, "Some title");
>+
>+      var title = getColumn("moz_places", "title", "url", aURI.spec);
>+      is(title, aPageTitle);
>+
>+      finishAndCleanUp();
>     },
>     onBeforeDeleteURI: function() {},
>     onDeleteURI: function() {},
>     onClearHistory: function() {},
>     onPageChanged: function() {},
>     onDeleteVisits: function() {},
>     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
>   };
>   PlacesUtils.history.addObserver(historyObserver, false);
> 
>   load("http://example.com/tests/toolkit/components/places/tests/browser/title1.html", function() {
>     load("http://example.com/tests/toolkit/components/places/tests/browser/title2.html");
>   });
> 
>   function confirmResults(data) {
>-    is(data[0].uri.spec, "http://example.com/tests/toolkit/components/places/tests/browser/title2.html");
>-    is(data[0].title, "Some title");
>-
>-    data.forEach(function(item) {
>-      var title = getColumn("moz_places", "title", "url", data[0].uri.spec);
>-      is(title, item.title);
>-    });
>-
>-    finishAndCleanUp();
>   }

hum, looks like this is now an empty function?? You should remove it.

Can I also ask you to change your listeners so that instead of listening on gBrowser you listen on the new specific tab you opened for your test? Both for browser_visituri and browser_settitle.

Looks like this bug is blocking my lazy_add patch, since the test fails pretty often here after, so first this happens, happier I am :)
Attachment #458430 - Flags: review?(mak77) → review-
also ok(), is() and so on, should have a third param, the message :)
we don't see this from some time, we fixed some related bug, and this code is also changing on places branch, thus I'm closing and I suggest to reopen if needed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: