Bug 728626 - Non-Firefox tests should not use 'about:robots' which is Firefox specific. r=ttaubert

This commit is contained in:
Raymond Lee 2012-05-22 09:25:49 +08:00
Родитель 57155591da
Коммит 35e2050b31
9 изменённых файлов: 28 добавлений и 28 удалений

Просмотреть файл

@ -102,7 +102,7 @@ var gTestSteps = [
ensure_opentabs_match_db(nextStep); ensure_opentabs_match_db(nextStep);
}); });
}, true); }, true);
tab.linkedBrowser.loadURI('about:robots'); tab.linkedBrowser.loadURI("about:mozilla");
}, },
function() { function() {
info("Running step 9 - enter private browsing mode, without keeping session"); info("Running step 9 - enter private browsing mode, without keeping session");

Просмотреть файл

@ -15,7 +15,7 @@ function test() {
is(gBrowser.visibleTabs.length, 2, "2 tabs should be open"); is(gBrowser.visibleTabs.length, 2, "2 tabs should be open");
is(Disabled(), true, "Bookmark All Tabs should be disabled since there are two tabs with the same address"); is(Disabled(), true, "Bookmark All Tabs should be disabled since there are two tabs with the same address");
let testTab2 = gBrowser.addTab("about:robots"); let testTab2 = gBrowser.addTab("about:mozilla");
is(gBrowser.visibleTabs.length, 3, "3 tabs should be open"); is(gBrowser.visibleTabs.length, 3, "3 tabs should be open");
// Wait for tab load, the code checks for currentURI. // Wait for tab load, the code checks for currentURI.
testTab2.linkedBrowser.addEventListener("load", function () { testTab2.linkedBrowser.addEventListener("load", function () {

Просмотреть файл

@ -4,6 +4,6 @@
</head> </head>
<frameset cols="*,*"> <frameset cols="*,*">
<frame name="left" src="frameLeft.html"> <frame name="left" src="frameLeft.html">
<frame name="right" src="about:robots"> <frame name="right" src="about:mozilla">
</frameset> </frameset>
</html> </html>

Просмотреть файл

@ -20,30 +20,30 @@ function test() {
waitForExplicitFinish(); waitForExplicitFinish();
let aboutBrowser = gBrowser.getBrowserForTab(tabAbout); let aboutBrowser = gBrowser.getBrowserForTab(tabAbout);
aboutBrowser.addEventListener("load", function () { aboutBrowser.addEventListener("load", function onAboutBrowserLoad() {
aboutBrowser.removeEventListener("load", arguments.callee, true); aboutBrowser.removeEventListener("load", onAboutBrowserLoad, true);
let tabRobots = gBrowser.addTab(); let tabMozilla = gBrowser.addTab();
gBrowser.selectedTab = tabRobots; gBrowser.selectedTab = tabMozilla;
let robotsBrowser = gBrowser.getBrowserForTab(tabRobots); let mozillaBrowser = gBrowser.getBrowserForTab(tabMozilla);
robotsBrowser.addEventListener("load", function () { mozillaBrowser.addEventListener("load", function onMozillaBrowserLoad() {
robotsBrowser.removeEventListener("load", arguments.callee, true); mozillaBrowser.removeEventListener("load", onMozillaBrowserLoad, true);
let robotsZoom = ZoomManager.zoom; let mozillaZoom = ZoomManager.zoom;
// change the zoom on the robots page // change the zoom on the mozilla page
FullZoom.enlarge(); FullZoom.enlarge();
// make sure the zoom level has been changed // make sure the zoom level has been changed
isnot(ZoomManager.zoom, robotsZoom, "Zoom level can be changed"); isnot(ZoomManager.zoom, mozillaZoom, "Zoom level can be changed");
robotsZoom = ZoomManager.zoom; mozillaZoom = ZoomManager.zoom;
// switch to about: tab // switch to about: tab
gBrowser.selectedTab = tabAbout; gBrowser.selectedTab = tabAbout;
// switch back to robots tab // switch back to mozilla tab
gBrowser.selectedTab = tabRobots; gBrowser.selectedTab = tabMozilla;
// make sure the zoom level has not changed // make sure the zoom level has not changed
is(ZoomManager.zoom, robotsZoom, is(ZoomManager.zoom, mozillaZoom,
"Entering private browsing should not reset the zoom on a tab"); "Entering private browsing should not reset the zoom on a tab");
// leave private browsing mode // leave private browsing mode
@ -52,11 +52,11 @@ function test() {
// cleanup // cleanup
gPrefService.clearUserPref("browser.privatebrowsing.keep_current_session"); gPrefService.clearUserPref("browser.privatebrowsing.keep_current_session");
FullZoom.reset(); FullZoom.reset();
gBrowser.removeTab(tabRobots); gBrowser.removeTab(tabMozilla);
gBrowser.removeTab(tabAbout); gBrowser.removeTab(tabAbout);
finish(); finish();
}, true); }, true);
robotsBrowser.contentWindow.location = "about:robots"; mozillaBrowser.contentWindow.location = "about:mozilla";
}, true); }, true);
aboutBrowser.contentWindow.location = "about:"; aboutBrowser.contentWindow.location = "about:";
} }

Просмотреть файл

@ -24,10 +24,10 @@ function onTabViewWindowLoaded() {
contentWindow = document.getElementById("tab-view").contentWindow; contentWindow = document.getElementById("tab-view").contentWindow;
originalTab = gBrowser.selectedTab; originalTab = gBrowser.selectedTab;
newTabs = [gBrowser.addTab("about:robots"), gBrowser.addTab("about:mozilla"), gBrowser.addTab("about:license")]; newTabs = [gBrowser.addTab("about:rights"), gBrowser.addTab("about:mozilla"), gBrowser.addTab("about:license")];
is(originalTab._tPos, 0, "Original tab is in position 0"); is(originalTab._tPos, 0, "Original tab is in position 0");
is(newTabs[0]._tPos, 1, "Robots is in position 1"); is(newTabs[0]._tPos, 1, "Rights is in position 1");
is(newTabs[1]._tPos, 2, "Mozilla is in position 2"); is(newTabs[1]._tPos, 2, "Mozilla is in position 2");
is(newTabs[2]._tPos, 3, "License is in position 3"); is(newTabs[2]._tPos, 3, "License is in position 3");
@ -51,7 +51,7 @@ function onTabViewWindowHidden() {
is(newTabs[2]._tPos, 0, "License is in position 0"); is(newTabs[2]._tPos, 0, "License is in position 0");
is(originalTab._tPos, 1, "Original tab is in position 1"); is(originalTab._tPos, 1, "Original tab is in position 1");
is(newTabs[0]._tPos, 2, "Robots is in position 2"); is(newTabs[0]._tPos, 2, "Rights is in position 2");
is(newTabs[1]._tPos, 3, "Mozilla is in position 3"); is(newTabs[1]._tPos, 3, "Mozilla is in position 3");
gBrowser.removeTab(newTabs[0]); gBrowser.removeTab(newTabs[0]);

Просмотреть файл

@ -40,7 +40,7 @@ function test3() {
whenTabViewIsHidden(function() { whenTabViewIsHidden(function() {
is(gBrowser.tabs.length, 2, "There are two tabs after cmd/ctrl + t is pressed"); is(gBrowser.tabs.length, 2, "There are two tabs after cmd/ctrl + t is pressed");
gBrowser.tabs[0].linkedBrowser.loadURI("about:robots"); gBrowser.tabs[0].linkedBrowser.loadURI("about:mozilla");
gBrowser.tabs[1].linkedBrowser.loadURI("http://example.com/"); gBrowser.tabs[1].linkedBrowser.loadURI("http://example.com/");
afterAllTabsLoaded(function () { afterAllTabsLoaded(function () {

Просмотреть файл

@ -29,7 +29,7 @@ function onTabViewWindowLoaded(win) {
let datatext = win.gBrowser.loadOneTab("data:text/plain,bug610242", bg); let datatext = win.gBrowser.loadOneTab("data:text/plain,bug610242", bg);
let datahtml = win.gBrowser.loadOneTab("data:text/html,<blink>don't blink!</blink>", bg); let datahtml = win.gBrowser.loadOneTab("data:text/html,<blink>don't blink!</blink>", bg);
let mozilla = win.gBrowser.loadOneTab("about:mozilla", bg); let mozilla = win.gBrowser.loadOneTab("about:mozilla", bg);
let robots = win.gBrowser.loadOneTab("about:robots", bg); let synclog = win.gBrowser.loadOneTab("about:sync-log", bg);
let html = win.gBrowser.loadOneTab("http://example.com", bg); let html = win.gBrowser.loadOneTab("http://example.com", bg);
let png = win.gBrowser.loadOneTab("http://mochi.test:8888/browser/browser/base/content/test/moz.png", bg); let png = win.gBrowser.loadOneTab("http://mochi.test:8888/browser/browser/base/content/test/moz.png", bg);
let svg = win.gBrowser.loadOneTab("http://mochi.test:8888/browser/browser/base/content/test/title_test.svg", bg); let svg = win.gBrowser.loadOneTab("http://mochi.test:8888/browser/browser/base/content/test/title_test.svg", bg);
@ -79,7 +79,7 @@ function onTabViewWindowLoaded(win) {
check(datatext, "datatext", false); check(datatext, "datatext", false);
check(datahtml, "datahtml", false); check(datahtml, "datahtml", false);
check(mozilla, "about:mozilla", false); check(mozilla, "about:mozilla", false);
check(robots, "about:robots", true); check(synclog, "about:sync-log", true);
check(html, "html", true); check(html, "html", true);
check(png, "png", false); check(png, "png", false);
check(svg, "svg", true); check(svg, "svg", true);

Просмотреть файл

@ -79,9 +79,9 @@ function createBrowserState() {
"2nd-group-id": {bounds: bounds, title: "new group 2", id: "2nd-group-id"} "2nd-group-id": {bounds: bounds, title: "new group 2", id: "2nd-group-id"}
}; };
let tab1Data = {bounds: bounds, url: "about:robots", groupID: "2nd-group-id"}; let tab1Data = {bounds: bounds, url: "about:rights", groupID: "2nd-group-id"};
let tab1 = { let tab1 = {
entries: [{url: "about:robots"}], entries: [{url: "about:rights"}],
extData: {"tabview-tab": JSON.stringify(tab1Data)} extData: {"tabview-tab": JSON.stringify(tab1Data)}
}; };

Просмотреть файл

@ -52,7 +52,7 @@ function onTabViewLoadedAndShown() {
contentWindow.gPrefBranch.setBoolPref("animate_zoom", false); contentWindow.gPrefBranch.setBoolPref("animate_zoom", false);
// Create a second tab // Create a second tab
gBrowser.addTab("about:robots"); gBrowser.addTab("about:mozilla");
is(gBrowser.tabs.length, 2, "we now have 2 tabs"); is(gBrowser.tabs.length, 2, "we now have 2 tabs");
registerCleanupFunction(function() { registerCleanupFunction(function() {