Backed out changeset 41042ab2e4bc (wrong patch)

This commit is contained in:
Tom Schuster 2016-03-16 15:02:26 +01:00
Родитель 2fe587fac4
Коммит 1f813aa1a3
3 изменённых файлов: 1 добавлений и 29 удалений

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

@ -193,11 +193,6 @@ extensions.registerSchemaAPI("windows", null, (extension, context) => {
WindowManager.setState(window, updateInfo.state);
}
if (updateInfo.drawAttention) {
// Firefox can't cancel attention actions.
window.getAttention();
}
// TODO: All the other properties, focused=false...
return Promise.resolve(WindowManager.convert(extension, window));

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

@ -409,6 +409,7 @@
"description": "If true, brings the window to the front. If false, brings the next window in the z-order to the front."
},
"drawAttention": {
"unsupported": true,
"type": "boolean",
"optional": true,
"description": "If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request."

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

@ -125,27 +125,3 @@ add_task(function* testWindowUpdate() {
yield extension.awaitFinish("window-update");
yield extension.unload();
});
add_task(function* () {
let window1 = window;
let window2 = yield BrowserTestUtils.openNewBrowserWindow();
let extension = ExtensionTestUtils.loadExtension({
background: function() {
browser.windows.getAll(undefined, function(wins) {
browser.test.assertEq(wins.length, 2, "should have two windows");
let unfocused = wins.find(win => !win.focused);
browser.windows.update(unfocused.id, {drawAttention: true}, function() {
browser.test.sendMessage("check");
});
});
},
});
yield Promise.all([extension.startup(), extension.awaitMessage("check")]);
yield extension.unload();
yield BrowserTestUtils.closeWindow(window2);
});