Closed Bug 590956 Opened 15 years ago Closed 14 years ago

Random failure into browser_viewport.js

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: vingtetun, Assigned: vingtetun)

Details

Attachments

(1 file)

TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/mobile/chrome/browser_viewport.js | Viewport scale=4 [got 1, expected 4] - Got false, expected true
Attached patch PatchSplinter Review
I've been obliged to use sendSyncMessage into content.js and to switch for addEventListener("pageshow", this, true); into bindings/browser.js to avoid the random failure. I've run the tests 10 times without seeing a failure with this patch (before it was failing at the first, second, or third try)
Assignee: nobody → 21
Attachment #469632 - Flags: review?(mark.finkle)
Some changes (working_tab -> currentTab, waitFor -> addMessageListener) are mostly (except the Browser:ViewportMetadata) to be similar to what is in the other tests
Comment on attachment 469632 [details] [diff] [review] Patch >diff -r 0b158275cb7e chrome/content/bindings/browser.js >--- a/chrome/content/bindings/browser.js Thu Aug 26 07:14:23 2010 -0700 >+++ b/chrome/content/bindings/browser.js Fri Aug 27 00:01:59 2010 +0200 >@@ -250,27 +250,24 @@ let DOMEvents = { > init: function() { > addEventListener("DOMContentLoaded", this, false); > addEventListener("DOMTitleChanged", this, false); > addEventListener("DOMLinkAdded", this, false); > addEventListener("DOMWillOpenModalDialog", this, false); > addEventListener("DOMModalDialogClosed", this, true); I wonder why this is | true | > addEventListener("DOMWindowClose", this, false); > addEventListener("DOMPopupBlocked", this, false); >- addEventListener("pageshow", this, false); >+ addEventListener("pageshow", this, true); If we need to do this we should have a comment > case "DOMContentLoaded": >- if (document.documentURIObject.spec == "about:blank") >- return; >- > sendAsyncMessage("DOMContentLoaded", { }); > break; This scares me. It will case a Ts regression like the one I just backed out. > resetMetadata: function resetMetadata() { > this.metadata = null; >- sendAsyncMessage("Browser:ViewportMetadata", {}); >+ sendSyncMessage("Browser:ViewportMetadata", {}); > }, > > updateMetadata: function updateMetadata() { > this.metadata = this.getViewportMetadata(); >- sendAsyncMessage("Browser:ViewportMetadata", this.metadata); >+ sendSyncMessage("Browser:ViewportMetadata", this.metadata); > }, This might not be too bad, but I don't like doing this just for tests.
Comment on attachment 469632 [details] [diff] [review] Patch Matt's is fixing the tests for another reason. I guess I can remove r? and just retry later to see if I can fix it at WFM
Attachment #469632 - Flags: review?(mark.finkle)
This no longer fails intermittently for me, but you can reopen if you're still seeing this.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: