зеркало из https://github.com/mozilla/pjs.git
Bug 565943 - Intermittent timeout in test_bug253481.xul
This commit is contained in:
Родитель
4c9c87e1eb
Коммит
5e71d8984d
|
@ -49,7 +49,7 @@ function testPaste(name, element, expected) {
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
addLoadEvent(function() {
|
||||
SimpleTest.waitForFocus(function() {
|
||||
setTimeout(function() {
|
||||
var testString = "\n hello hello \n world\nworld \n";
|
||||
var expectedResults = {
|
||||
|
@ -68,15 +68,21 @@ var expectedResults = {
|
|||
};
|
||||
|
||||
// Put a multi-line string in the clipboard
|
||||
var clip = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
|
||||
SimpleTest.waitForClipboard(testString, function() {
|
||||
var clip = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
|
||||
.getService(Components.interfaces.nsIClipboardHelper);
|
||||
clip.copyString(testString);
|
||||
|
||||
for (let [item, expected] in Iterator(expectedResults)) {
|
||||
clip.copyString(testString);
|
||||
}, function() {
|
||||
for (let [item, expected] in Iterator(expectedResults)) {
|
||||
testPaste(item, $(item), expected);
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
SimpleTest.finish();
|
||||
}, function() {
|
||||
ok(false, "Could not copy the string to clipboard, giving up");
|
||||
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче