forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge mozilla-central to mozilla-inbound
- Loading branch information
Showing
366 changed files
with
9,965 additions
and
3,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
browser/components/preferences/in-content/tests/browser_applications_selection.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
var win; | ||
var feedItem; | ||
var container; | ||
|
||
SimpleTest.requestCompleteLog(); | ||
|
||
add_task(function* setup() { | ||
yield openPreferencesViaOpenPreferencesAPI("applications", null, {leaveOpen: true}); | ||
info("Preferences page opened on the applications pane."); | ||
|
||
registerCleanupFunction(() => { | ||
gBrowser.removeCurrentTab(); | ||
}); | ||
}); | ||
|
||
add_task(function* getFeedItem() { | ||
win = gBrowser.selectedBrowser.contentWindow; | ||
|
||
container = win.document.getElementById("handlersView"); | ||
feedItem = container.querySelector("richlistitem[type='application/vnd.mozilla.maybe.feed']"); | ||
Assert.ok(feedItem, "feedItem is present in handlersView."); | ||
}) | ||
|
||
add_task(function* selectInternalOptionForFeed() { | ||
// Select the item. | ||
feedItem.scrollIntoView(); | ||
container.selectItem(feedItem); | ||
Assert.ok(feedItem.selected, "Should be able to select our item."); | ||
|
||
// Wait for the menu. | ||
let list = yield waitForCondition(() => | ||
win.document.getAnonymousElementByAttribute(feedItem, "class", "actionsMenu")); | ||
info("Got list after item was selected"); | ||
|
||
// Find the "Add Live bookmarks option". | ||
let chooseItems = list.getElementsByAttribute("action", Ci.nsIHandlerInfo.handleInternally); | ||
Assert.equal(chooseItems.length, 1, "Should only be one action to handle internally"); | ||
|
||
// Select the option. | ||
let cmdEvent = win.document.createEvent("xulcommandevent"); | ||
cmdEvent.initCommandEvent("command", true, true, win, 0, false, false, false, false, null); | ||
chooseItems[0].dispatchEvent(cmdEvent); | ||
|
||
// Check that we display the correct result. | ||
list = yield waitForCondition(() => | ||
win.document.getAnonymousElementByAttribute(feedItem, "class", "actionsMenu")); | ||
info("Got list after item was selected"); | ||
Assert.ok(list.selectedItem, "Should have a selected item."); | ||
Assert.equal(list.selectedItem.getAttribute("action"), | ||
Ci.nsIHandlerInfo.handleInternally, | ||
"Newly selected item should be the expected one."); | ||
}); | ||
|
||
// This builds on the previous selectInternalOptionForFeed task. | ||
add_task(function* reselectInternalOptionForFeed() { | ||
// Now select a different option in the list - use the pdf item as that doesn't | ||
// need to load any favicons. | ||
let anotherItem = container.querySelector("richlistitem[type='application/pdf']"); | ||
|
||
container.selectItem(anotherItem); | ||
|
||
// Wait for the menu so that we don't hit race conditions. | ||
yield waitForCondition(() => | ||
win.document.getAnonymousElementByAttribute(anotherItem, "class", "actionsMenu")); | ||
info("Got list after item was selected"); | ||
|
||
// Now select the feed item again, and check what it is displaying. | ||
container.selectItem(feedItem); | ||
|
||
let list = yield waitForCondition(() => | ||
win.document.getAnonymousElementByAttribute(feedItem, "class", "actionsMenu")); | ||
info("Got list after item was selected"); | ||
|
||
Assert.ok(list.selectedItem, | ||
"Should have a selected item"); | ||
Assert.equal(list.selectedItem.getAttribute("action"), | ||
Ci.nsIHandlerInfo.handleInternally, | ||
"Selected item should still be the same as the previously selected item."); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- This Source Code Form is subject to the terms of the Mozilla Public | ||
- License, v. 2.0. If a copy of the MPL was not distributed with this | ||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | ||
|
||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | ||
<ShortName>Вікіпэдыя (be-tarask)</ShortName> | ||
<Description>Вікіпэдыя, вольная энцыкляпэдыя</Description> | ||
<InputEncoding>UTF-8</InputEncoding> | ||
<Image width="16" height="16">resource://search-plugins/images/wikipedia.ico</Image> | ||
<Url type="application/x-suggestions+json" method="GET" template="https://be-tarask.wikipedia.org/w/api.php"> | ||
<Param name="action" value="opensearch"/> | ||
<Param name="search" value="{searchTerms}"/> | ||
</Url> | ||
<Url type="text/html" method="GET" template="https://be-tarask.wikipedia.org/wiki/Спэцыяльныя:Пошук" | ||
resultdomain="wikipedia.org" rel="searchform"> | ||
<Param name="search" value="{searchTerms}"/> | ||
<Param name="sourceid" value="Mozilla-search"/> | ||
</Url> | ||
</SearchPlugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- This Source Code Form is subject to the terms of the Mozilla Public | ||
- License, v. 2.0. If a copy of the MPL was not distributed with this | ||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | ||
|
||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | ||
<ShortName>Вікіпедыя (be)</ShortName> | ||
<Description>Вікіпедыя, свабодная энцыклапедыя</Description> | ||
<InputEncoding>UTF-8</InputEncoding> | ||
<Image width="16" height="16">resource://search-plugins/images/wikipedia.ico</Image> | ||
<Url type="application/x-suggestions+json" method="GET" template="https://be.wikipedia.org/w/api.php"> | ||
<Param name="action" value="opensearch"/> | ||
<Param name="search" value="{searchTerms}"/> | ||
</Url> | ||
<Url type="text/html" method="GET" template="https://be.wikipedia.org/wiki/Адмысловае:Search" | ||
resultdomain="wikipedia.org" rel="searchform"> | ||
<Param name="search" value="{searchTerms}"/> | ||
<Param name="sourceid" value="Mozilla-search"/> | ||
</Url> | ||
</SearchPlugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- This Source Code Form is subject to the terms of the Mozilla Public | ||
- License, v. 2.0. If a copy of the MPL was not distributed with this | ||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | ||
|
||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | ||
<ShortName>Яндекс</ShortName> | ||
<Description>Пошук з дапамогаю Яндекс</Description> | ||
<InputEncoding>UTF-8</InputEncoding> | ||
<Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAB50lEQVQ4T43SvWsacRgH8OcPCITSLRQ6BSRL1gxZTNZQsgYC3QKunVoMnTKFhBQSnDqIUa5gxNbBCgriC4pv50sJ1lIR5SROpRVbz+O4b5/flbvedekJH+557nvfH8chdbvdIFMYPAgBICdqt9uKpmnw8huNRuDnX8J5QKvVgmEYnqiqClmWwZ113kmger0OXdf/Wv6EIb0BTo+AgB94ceDKJ5MJuHPOMwlUqVSwWq1sevQaxqvn0O5l6HdvgaMdV75cLtFoNMC9Xd6JisWiedNiPNuB9l4yZ+1jEvBvuXJBURRwL8YzUT6fx2KxsGHrKdQPCXNW794Bvieu3CLegrsnlM1mMZ/PbfqeH6vToDkvb2+Bx49cuWU2m4G7bUqn0xiPx7ZpqYRf29v4cXyMxf4+tLU1V24ZDAbgbptSqRSGw6HL9OwM37n4bXPTvP6bC7lcDtw9oWQyiX6/b/vMH1XZ2MAoEMDXqytM+QBnLtRqNXAvxjNRPB5Hr9ez9Q8PMfD50OM/2P3FBb7wAc680+mIMri3yzuRJEloNpsmORTCJy7INzd/9stLc7dyIZPJgDvnPJNA0WgU1WrVkxJ/4FgsBu6s804CRSKRh0KhgHK5/F+JRAL8fJBnslA4HH7NHhg8CDnLwm8IYz560xw92AAAAABJRU5ErkJggg==</Image> | ||
<Url type="application/x-suggestions+json" method="GET" template="https://suggest.yandex.net/suggest-ff.cgi"> | ||
<Param name="part" value="{searchTerms}"/> | ||
</Url> | ||
<Url type="text/html" method="GET" template="https://yandex.by/yandsearch" resultdomain="yandex.by"> | ||
<MozParam name="clid" condition="purpose" purpose="searchbar" value="2186618"/> | ||
<MozParam name="clid" condition="purpose" purpose="keyword" value="2186621"/> | ||
<MozParam name="clid" condition="purpose" purpose="contextmenu" value="2186623"/> | ||
<MozParam name="clid" condition="purpose" purpose="homepage" value="2186617"/> | ||
<MozParam name="clid" condition="purpose" purpose="newtab" value="2186620"/> | ||
<Param name="text" value="{searchTerms}"/> | ||
</Url> | ||
<SearchForm>https://www.yandex.by/</SearchForm> | ||
</SearchPlugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.