mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
61b14e0f32
- Bug 1146204 - Build libopus in unified mode; r=cpearce (d4f89d6d30)
- tweak build files a little (ab9bba79a1)
- Bug 1222575 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in modules/libjar/; r=aklotz (b723bc0f41)
- Bug 1225004 - Record reason for NS_ERROR_FILE_CORRUPTED in nsLayoutStylesheetCache::LoadSheet in crash reports. r=roc (e78457b15b)
- Bug 1214782, r=ehsan (63513465b5)
- Bug 1153259 - use NS_NewByteInputStream in zipwriter to reduce do_CreateInstance overhead; r=aklotz (e20238389f)
- Bug 1201636 - Use channel->asyncOpen2() in modules/libjar/zipwriter/nsZipWriter.cpp (r=sicking) (79a4741b44)
- Bug 1179069 - Remove docshell warnings in embedding. r=bz (b464524d63)
- Bug 1179058 - Implement shouldAddToSessionHistory in WebBrowserChromeJS object. r=adw (d7382a5f59)
- missing bit of Bug 1164049 - Fix some mode lines in embedding/. and some makefile fixes (9f1dc553d3)
- Bug 1202887 - Delay WebBrowserPersist error callbacks caused by IPC ActorDestroy. r=billm (e552a83758)
- Bug 1106321 - Serialize DEVMODE down to the content process when printing on Windows. r=jimm (bef76e4d3c)
- bug 147419 remove ununsed plexName colorspace resolutionName and downloadFonts r=roc (e010cd1704)
- Bug 1178799 - Filter X11 SelectionRequest events with an invalid requestor on GTK3. r=karlt (4ce7135a77)
- Bug 1227023 - Include the Gtk+3 version in update URL if available on Gtk+2 builds. r=karlt (b9689fdd31)
- Bug 1229099 - use snprintf instead of JS_snprintf in xpcom/; r=mccr8 (2cf37f7d5a)
- Bug 939790 - make SafeMutex::mOwnerThread a relaxed atomic variable; r=bsmedberg (0ffc8a5409)
- Bug 1183093 - Uninitialised value use in Probe::Trigger. r=dteller. (6d645ef81c)
- Bug 1140771 - Build more XPCOM code in unified mode; r=froydnj bug 1170585 - Don't try to build IO Poisoning on iOS. r=froydnj (9c5e98b533)
- Bug 1201287 - Cleanup nsSupportsPrimitives.cpp. r=smaug (5fc766af1a)
- pointer style (6ee79e071f)
- Bug 1225682 - Don't use nsAuto{,C}String as class member variables in js/xpconnect/. r=mccr8 (6e4ca9ebcb)
88 lines
2.8 KiB
JavaScript
88 lines
2.8 KiB
JavaScript
"use strict"; // -*- js-indent-level: 2; indent-tabs-mode: nil -*-
|
|
var Cc = Components.classes;
|
|
var Ci = Components.interfaces;
|
|
const contentBase = "https://example.com/browser/embedding/test/";
|
|
const chromeBase = "chrome://mochitests/content/browser/embedding/test/";
|
|
const testPageURL = contentBase + "bug1204626_doc0.html";
|
|
|
|
function one_test(delay, continuation) {
|
|
let delayStr = delay === null ? "no delay" : "delay = " + delay + "ms";
|
|
let browser;
|
|
|
|
BrowserTestUtils.openNewForegroundTab(gBrowser, testPageURL).then((tab) => {
|
|
browser = tab.linkedBrowser;
|
|
let persistable = browser.QueryInterface(Ci.nsIFrameLoaderOwner)
|
|
.frameLoader
|
|
.QueryInterface(Ci.nsIWebBrowserPersistable);
|
|
persistable.startPersistence(/* outer window ID: */ 0, {
|
|
onDocumentReady,
|
|
onError: function(status) {
|
|
ok(false, new Components.Exception("startPersistence failed", status));
|
|
continuation();
|
|
}
|
|
});
|
|
});
|
|
|
|
function onDocumentReady(doc) {
|
|
const nameStem="test_bug1204626_" + Date.now();
|
|
let wbp = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
|
|
.createInstance(Ci.nsIWebBrowserPersist);
|
|
let tmp = Cc["@mozilla.org/file/directory_service;1"]
|
|
.getService(Ci.nsIProperties)
|
|
.get("TmpD", Ci.nsIFile);
|
|
let tmpFile = tmp.clone();
|
|
tmpFile.append(nameStem + "_saved.html");
|
|
let tmpDir = tmp.clone();
|
|
tmpDir.append(nameStem + "_files");
|
|
|
|
registerCleanupFunction(function cleanUp() {
|
|
if (tmpFile.exists()) {
|
|
tmpFile.remove(/* recursive: */ false);
|
|
}
|
|
if (tmpDir.exists()) {
|
|
tmpDir.remove(/* recursive: */ true);
|
|
}
|
|
});
|
|
|
|
wbp.progressListener = {
|
|
onProgressChange: function(){},
|
|
onLocationChange: function(){},
|
|
onStatusChange: function(){},
|
|
onSecurityChange: function(){},
|
|
onStateChange: function wbp_stateChange(_wbp, _req, state, _status) {
|
|
if ((state & Ci.nsIWebProgressListener.STATE_STOP) == 0) {
|
|
return;
|
|
}
|
|
ok(true, "Finished save (" + delayStr + ") but might have crashed.");
|
|
continuation();
|
|
}
|
|
}
|
|
|
|
function doSave() {
|
|
wbp.saveDocument(doc, tmpFile, tmpDir, null, 0, 0);
|
|
}
|
|
if (delay === null) {
|
|
doSave();
|
|
} else {
|
|
setTimeout(doSave, delay);
|
|
}
|
|
browser.messageManager.loadFrameScript("data:,content.window.close()", true);
|
|
}
|
|
}
|
|
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
// 0ms breaks having the actor under PBrowser, but not 10ms.
|
|
// 10ms provokes the double-__delete__, but not 0ms.
|
|
// And a few others, just in case.
|
|
const testRuns = [null, 0, 10, 0, 10, 20, 50, 100];
|
|
let i = 0;
|
|
(function next_test() {
|
|
if (i < testRuns.length) {
|
|
one_test(testRuns[i++], next_test);
|
|
} else {
|
|
finish();
|
|
}
|
|
})();
|
|
}
|