Fix & re-enable bug_580512.js [r=dietrich, a=test]
authorPaul O’Shannessy <paul@oshannessy.com>
Fri, 21 Jan 2011 10:30:00 -0800
changeset 61271 dbf0cee832f64531ceca28c7466750f9e1fc3c8a
parent 61270 5d466f5defc920bd96a85022ab332a31a14e1b89
child 61272 273cb783edac27156fef0348a1a0b716a953805f
push id18287
push usermmmulani@uwaterloo.ca
push dateTue, 25 Jan 2011 18:25:29 +0000
treeherdermozilla-central@dbf0cee832f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich, test
milestone2.0b10pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix & re-enable bug_580512.js [r=dietrich, a=test]
browser/components/sessionstore/test/browser/Makefile.in
browser/components/sessionstore/test/browser/browser_580512.js
--- a/browser/components/sessionstore/test/browser/Makefile.in
+++ b/browser/components/sessionstore/test/browser/Makefile.in
@@ -42,17 +42,16 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = browser/components/sessionstore/test/browser 
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 # browser_506482.js is disabled because of frequent failures (bug 538672)
 # browser_526613.js is disabled because of frequent failures (bug 534489)
-# browser_580512.js is disabled because of wrong assumptions after bug 592822
 
 _BROWSER_TEST_FILES = \
 	head.js \
 	browser_248970_a.js \
 	browser_248970_b.js \
 	browser_248970_b_sample.html \
 	browser_339445.js \
 	browser_339445_sample.html \
@@ -114,16 +113,17 @@ include $(topsrcdir)/config/rules.mk
 	browser_500328.js \
 	browser_514751.js \
 	browser_522375.js \
 	browser_522545.js \
 	browser_524745.js \
 	browser_528776.js \
 	browser_579868.js \
 	browser_579879.js \
+	browser_580512.js \
 	browser_581593.js \
 	browser_586147.js \
 	browser_586068-cascaded_restore.js \
 	browser_589246.js \
 	browser_590268.js \
 	browser_597315.js \
 	browser_597315_index.html \
 	browser_597315_a.html \
--- a/browser/components/sessionstore/test/browser/browser_580512.js
+++ b/browser/components/sessionstore/test/browser/browser_580512.js
@@ -16,17 +16,24 @@ function test() {
 }
 
 function closeFirstWin(win) {
   win.gBrowser.pinTab(win.gBrowser.tabs[0]);
   win.gBrowser.pinTab(win.gBrowser.tabs[1]);
   win.BrowserTryToCloseWindow();
   ok(win.closed, "window closed");
 
-  openWinWithCb(checkSecondWin, URIS_NORMAL_B, URIS_PINNED.concat(URIS_NORMAL_B));
+
+  // The second check will be platform dependent. After bug 592833, Win/Linux
+  // will restore all tabs from the last close window while OSX will just
+  // reopen pinned tabs.
+  let expectedURIs = URIS_PINNED.concat(URIS_NORMAL_B);
+  if (!navigator.platform.match(/Mac/))
+    expectedURIs = expectedURIs.concat(URIS_NORMAL_A);
+  openWinWithCb(checkSecondWin, URIS_NORMAL_B, expectedURIs);
 }
 
 function checkSecondWin(win) {
   is(win.gBrowser.browsers[0].currentURI.spec, URIS_PINNED[0], "first pinned tab restored");
   is(win.gBrowser.browsers[1].currentURI.spec, URIS_PINNED[1], "second pinned tab restored");
   ok(win.gBrowser.tabs[0].pinned, "first pinned tab is still pinned");
   ok(win.gBrowser.tabs[1].pinned, "second pinned tab is still pinned");
   win.close();