Backed out changeset 069ccd107c32

This commit is contained in:
Robert O'Callahan 2010-10-29 16:06:35 +13:00
Родитель d9628b78f1
Коммит 379186f270
5 изменённых файлов: 0 добавлений и 107 удалений

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

@ -145,7 +145,6 @@ _BROWSER_FILES = \
browser_bug561636.js \
browser_bug562649.js \
browser_bug563588.js \
browser_bug575561.js \
browser_bug577121.js \
browser_bug579872.js \
browser_bug580956.js \
@ -219,8 +218,6 @@ _BROWSER_FILES = \
file_bug550565_favicon.ico \
browser_overLinkInLocationBar.js \
browser_aboutHome.js \
app_bug575561.html \
app_subframe_bug575561.html \
$(NULL)
# compartment-disabled

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

@ -1,16 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=575561
-->
<head>
<title>Test for links in app tabs</title>
</head>
<body>
<a href="http://example.com/browser/browser/base/content/test/dummy_page.html">same domain</a>
<a href="http://test1.example.com/browser/browser/base/content/test/dummy_page.html">same domain (different subdomain)</a>
<a href="http://example.org/browser/browser/base/content/test/dummy_page.html">different domain</a>
<a href="http://example.org/browser/browser/base/content/test/dummy_page.html" target="foo">different domain (with target)</a>
<iframe src="app_subframe_bug575561.html"></iframe>
</body>
</html>

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

@ -1,12 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=575561
-->
<head>
<title>Test for links in app tab subframes</title>
</head>
<body>
<a href="http://example.org/browser/browser/base/content/test/dummy_page.html">different domain</a>
</body>
</html>

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

@ -1,73 +0,0 @@
function test() {
waitForExplicitFinish();
// Pinned: Link to the same domain should not open a new tab
// Tests link to http://example.com/browser/browser/base/content/test/dummy_page.html
testLink(0, true, false, function() {
// Pinned: Link to the same domain should not open a new tab
// Tests link to http://test1.example.com/browser/browser/base/content/test/dummy_page.html
testLink(1, true, false, function() {
// Pinned: Link to a different domain should open a new tab
// Tests link to http://example.org/browser/browser/base/content/test/dummy_page.html
testLink(2, true, true, function() {
// Not Pinned: Link to a different domain should not open a new tab
// Tests link to http://example.org/browser/browser/base/content/test/dummy_page.html
testLink(2, false, false, function() {
// Pinned: Targetted link should open a new tab
// Tests link to http://example.org/browser/browser/base/content/test/dummy_page.html with target="foo"
testLink(3, true, true, function() {
// Pinned: Link in a subframe should not open a new tab
// Tests link to http://example.org/browser/browser/base/content/test/dummy_page.html in subframe
testLink(0, true, false, finish, true);
});
});
});
});
});
}
function testLink(aLinkIndex, pinTab, expectNewTab, nextTest, testSubFrame) {
let appTab = gBrowser.addTab("http://example.com/browser/browser/base/content/test/app_bug575561.html", {skipAnimation: true});
if (pinTab)
gBrowser.pinTab(appTab);
gBrowser.selectedTab = appTab;
appTab.linkedBrowser.addEventListener("load", onLoad, true);
let loadCount = 0;
function onLoad() {
loadCount++;
if (loadCount < 2)
return;
appTab.linkedBrowser.removeEventListener("load", onLoad, true);
let browser = gBrowser.getBrowserForTab(appTab);
if (testSubFrame)
browser = browser.contentDocument.getElementsByTagName("iframe")[0];
let links = browser.contentDocument.getElementsByTagName("a");
if (expectNewTab)
gBrowser.tabContainer.addEventListener("TabOpen", onTabOpen, true);
else
browser.addEventListener("load", onPageLoad, true);
info("Clicking " + links[aLinkIndex].textContent);
EventUtils.sendMouseEvent({type:"click"}, links[aLinkIndex], browser.contentWindow);
function onPageLoad() {
browser.removeEventListener("load", onPageLoad, true);
is(browser.contentDocument.location.href, links[aLinkIndex].href, "Link should not open in a new tab");
gBrowser.removeTab(appTab);
nextTest();
}
function onTabOpen(event) {
gBrowser.tabContainer.removeEventListener("TabOpen", onTabOpen, true);
ok(true, "Link should open a new tab");
gBrowser.removeTab(appTab);
gBrowser.removeCurrentTab();
nextTest();
}
}
}

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

@ -50,7 +50,6 @@ function checkServices() {
checkService("prefs", Ci.nsIPrefService);
checkService("contentPrefs", Ci.nsIContentPrefService);
checkService("wm", Ci.nsIWindowMediator);
checkService("obs", Ci.nsIObserverService);
checkService("perms", Ci.nsIPermissionManager);
checkService("io", Ci.nsIIOService);
checkService("io", Ci.nsIIOService2);
@ -67,8 +66,6 @@ function checkServices() {
checkService("scriptloader", Ci.mozIJSSubScriptLoader);
checkService("ww", Ci.nsIWindowWatcher);
checkService("tm", Ci.nsIThreadManager);
checkService("droppedLinkHandler", Ci.nsIDroppedLinkHandler);
checkService("strings", Ci.nsIStringBundleService);
checkService("urlFormatter", Ci.nsIURLFormatter);
checkService("eTLD", Ci.nsIEffectiveTLDService);
}