mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
6bedaf2149
- Bug 1193050 - Update the copy of GentiumPlus used in font-inspector test. r=jdaggett (253fce5764)
- align tests (5b817116a0)
- Bug 1246106 - pass aStyleBorder as reference to ComputeBorderOverflow. r=mats (53ccaa1282)
- align tests (81b3943058)
- Bug 1269080 - Convert NS_ERROR to NS_WARNING when setting an invalid scheme in nsSimpleURI. r=mcmanus (cad86c963d)
- Bug 1248558 - "[Static Analysis][Unintentional integer overflow][CacheFile.cpp::PreloadChunk, CacheFile.cpp::GetChunkLocked]". r=michal (6a9e34dfbe)
- Bug 1121672 - Make CacheFile::IsDoomed() protect mHandle with lock, r=michal (9e925b903a)
- Bug 1253040 - Do not write metadata if CacheFile is killed, r=honzab (c0378088b2)
- grammar as 1268922 (c801618b1d)
- Bug 1247548 - Changed nsCookieService::EnsureReadComplete and nsCookieService::PurgeCookeis to allocate nsTArray instead of AutoTArray. r=jdm (0e2bb0465e)
- var-let (1702e664dc)
- Bug 1233813 - Fix mDNS bug in resolving services with no TXT records. r=schien (4ce7e5fca0)
- Bug 1266632 - Add a null check in nsHostResolver::SizeOfIncludingThis. r=sworkman. (035d4a7130)
- Bug 1267000 - null deref with spdy proxy r=hurley (099db40d0f)
- Bug 1240932 - figure out 'network id' on Linux. r=mcmanus (47ceb12a70)
- Bug 1240932: add Telemetry to record network id successes, r=mcmanus (6985d1a4ce)
- Bug 1205158 - Use channel->Open2() netwerk/test/ (r=sicking) (64de01cda3)
- Bug 1240932 - figure out 'network id' on OS X, r=mcmanus (7ee4875835)
- Bug 1240932 - figure out 'network id' on Windows, r=mcmanus (3227a81c14)
- Bug 1188644 - Use channel->ascynOpen2 in netwerk/test (r=mcmanus) (7097897cdc)
- Bug 1264887: |nsWifiScannerDBus|: Hold DBusMessage references in |RefPtr|, r=josh (7e68e8663f)
- Bug 1196638 - Infer the proper button for synthesized mouse clicks on all callsites. r=jmaher (838230baaa)
- Bug 1258532 - Port test_bug574596.html to mochitest-plain in order to enable it on e10s; r=mrbkap (ae5693ab54)
- Bug 1252855 - allow setting a specific list of prefs from the content process, r=mrbkap,margaret,haik (b13645826a)
- Bug 1215965 - Remove use of non-standard features from toolkit/components/social/SocialService.jsm. r=mixedpuppy (a1d79f295c)
- ship cmpiler for XP (ac60884173)
- Bug 1262814 - Warn on Wlanapi.dll load or init fail, don't fail assertion, r=mcmanus (aa1335320a)
- Bug 1137151: Marked destructors of ref-counted time-zone classes as protected, r=dhylands (5668226442)
- Bug 1225549 - Modify the data type of mThreshold of NetworkParams to long long from long. r=ettseng (7164a517ac)
- Bug 1139805 - B2G NetworkManager: move NetworkManager.js out of EXTRA_PP_COMPONENTS in moz.build. r=echen (e857f53cfc)
- Bug 1087608 - ensuring multitap gestures do not resolve to explore. r=eeejay (6c4b603738)
- bug 1259023 - make nsIAccessible.{Next,Prev}Sibling work with proxied accessibles r=yzen (84b47a82e0)
- bug 1259023 - make nsIAccessible.indexInParent work on proxied accessibles r=yzen (3531b45e35)
- bug 1250882 - implement xpcAccessible::GetState() for proxied accessibles r=davidb (5e58214441)
- bug 1250882 - implement xpcAccessible::Name() for proxied accessibles r=davidb (4b11af6ecc)
- bug 1250882 - implement xpcAccessible::GetDescription() for proxied accessibles r=davidb (d0d0e133fb)
- bug 1250882 - implement xpcAccessible::GetLanguage() for proxied accessibles r=davidb (88e98a5b24)
- bug 1250882 - implement xpcAccessible::GetValue() for proxied accessibles r=davidb (9ad4347d45)
- bug 1250882 - implement xpcAccessible::GetBounds() for proxied accessibles r=davidb (e67f7c551b)
- Bug 1249930 - menupoup shouldn't look for children in XBL anonymous content, r=davidb (14b3e39954)
- Bug 1243233 - Test ALLOW_COMPILER_WARNINGS instead of WARNINGS_AS_ERRORS, and move it to after it is set, r=glandium (216c407d20)
- Bug 1245992 - Update the Safe Browsing phishing interstitial page. r=flod,past (80afbfc6c9)
- Bug 1245260 - Ignore redundant calls to RestyleManager::IncrementAnimationGeneration; r=dbaron (e35571b613)
- Bug 1182778, r=margaret,f=bz (b379c97f8e)
- Bug 1258212 - Hook the parent up to the cild for registerContentHandler. r=gwright (039c75d4d5)
112 lines
4.1 KiB
JavaScript
112 lines
4.1 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/* Ensure that clicking the button in the Offline mode neterror page updates
|
|
global history. See bug 680727. */
|
|
/* TEST_PATH=toolkit/components/places/tests/browser/browser_bug680727.js make -C $(OBJDIR) mochitest-browser-chrome */
|
|
|
|
|
|
const kUniqueURI = Services.io.newURI("http://mochi.test:8888/#bug_680727",
|
|
null, null);
|
|
var gAsyncHistory =
|
|
Cc["@mozilla.org/browser/history;1"].getService(Ci.mozIAsyncHistory);
|
|
|
|
var proxyPrefValue;
|
|
var ourTab;
|
|
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
// Tests always connect to localhost, and per bug 87717, localhost is now
|
|
// reachable in offline mode. To avoid this, disable any proxy.
|
|
proxyPrefValue = Services.prefs.getIntPref("network.proxy.type");
|
|
Services.prefs.setIntPref("network.proxy.type", 0);
|
|
|
|
// Clear network cache.
|
|
Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
|
|
.getService(Components.interfaces.nsICacheStorageService)
|
|
.clear();
|
|
|
|
// Go offline, expecting the error page.
|
|
Services.io.offline = true;
|
|
|
|
BrowserTestUtils.openNewForegroundTab(gBrowser).then(tab => {
|
|
ourTab = tab;
|
|
BrowserTestUtils.waitForContentEvent(ourTab.linkedBrowser, "DOMContentLoaded",
|
|
.then(errorListener);
|
|
BrowserTestUtils.loadURI(ourTab.linkedBrowser, kUniqueURI.spec);
|
|
});
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// listen to loading the neterror page. (offline mode)
|
|
function errorListener() {
|
|
ok(Services.io.offline, "Services.io.offline is true.");
|
|
|
|
// This is an error page.
|
|
ContentTask.spawn(ourTab.linkedBrowser, kUniqueURI.spec, function(uri) {
|
|
is(content.document.documentURI.substring(0, 27),
|
|
"about:neterror?e=netOffline",
|
|
"Document URI is the error page.");
|
|
|
|
// But location bar should show the original request.
|
|
is(content.location.href, uri,
|
|
"Docshell URI is the original URI.");
|
|
}).then(() => {
|
|
// Global history does not record URI of a failed request.
|
|
return PlacesTestUtils.promiseAsyncUpdates().then(() => {
|
|
gAsyncHistory.isURIVisited(kUniqueURI, errorAsyncListener);
|
|
});
|
|
});
|
|
}
|
|
|
|
function errorAsyncListener(aURI, aIsVisited) {
|
|
ok(kUniqueURI.equals(aURI) && !aIsVisited,
|
|
"The neterror page is not listed in global history.");
|
|
|
|
Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
|
|
|
|
// Now press the "Try Again" button, with offline mode off.
|
|
Services.io.offline = false;
|
|
|
|
BrowserTestUtils.waitForContentEvent(ourTab.linkedBrowser, "DOMContentLoaded")
|
|
.then(reloadListener);
|
|
|
|
ContentTask.spawn(ourTab.linkedBrowser, null, function() {
|
|
ok(content.document.getElementById("errorTryAgain"),
|
|
"The error page has got a #errorTryAgain element");
|
|
content.document.getElementById("errorTryAgain").click();
|
|
});
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
// listen to reload of neterror.
|
|
function reloadListener() {
|
|
// This listener catches "DOMContentLoaded" on being called
|
|
// nsIWPL::onLocationChange(...). That is right *AFTER*
|
|
// IHistory::VisitURI(...) is called.
|
|
ok(!Services.io.offline, "Services.io.offline is false.");
|
|
|
|
ContentTask.spawn(ourTab.linkedBrowser, kUniqueURI.spec, function(uri) {
|
|
// This is not an error page.
|
|
is(content.document.documentURI, uri,
|
|
"Document URI is not the offline-error page, but the original URI.");
|
|
}).then(() => {
|
|
// Check if global history remembers the successfully-requested URI.
|
|
PlacesTestUtils.promiseAsyncUpdates().then(() => {
|
|
gAsyncHistory.isURIVisited(kUniqueURI, reloadAsyncListener);
|
|
});
|
|
});
|
|
}
|
|
|
|
function reloadAsyncListener(aURI, aIsVisited) {
|
|
ok(kUniqueURI.equals(aURI) && aIsVisited, "We have visited the URI.");
|
|
PlacesTestUtils.clearHistory().then(finish);
|
|
}
|
|
|
|
registerCleanupFunction(function* () {
|
|
Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
|
|
Services.io.offline = false;
|
|
yield BrowserTestUtils.removeTab(ourTab);
|
|
});
|