Bug 1703420 - Use SpecialPowers.spawnChrome to query the top level content document's location to run the test on Fission+XOrig. r=boris

Differential Revision: https://phabricator.services.mozilla.com/D111026
This commit is contained in:
Hiroyuki Ikezoe 2021-04-07 01:27:29 +00:00
Родитель 7a0649e83c
Коммит b22b1a8297
2 изменённых файлов: 8 добавлений и 4 удалений

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

@ -72,7 +72,6 @@ support-files = Ahem.ttf file_animations_async_tests.html
[test_animations_event_handler_attribute.html]
[test_animations_iterationstart.html]
[test_animations_omta.html]
fail-if = xorigin
[test_animations_omta_start.html]
[test_animations_pausing.html]
[test_animations_playbackrate.html]

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

@ -2108,8 +2108,11 @@ addAsyncAnimTest(async function() {
div1.style.height = "10px";
div1.style.animation = "anim2 linear 1s";
const topLocation =
await SpecialPowers.spawnChrome([], () => browsingContext.top.currentURI.spec);
var visitedLink = document.createElement("a");
visitedLink.setAttribute("href", window.top.location.href);
visitedLink.setAttribute("href", topLocation);
visitedLink.classList.add("visitedLink");
visitedLink.classList.add("target");
visitedLink.style.display = "block";
@ -2117,7 +2120,7 @@ addAsyncAnimTest(async function() {
visitedLink.style.animation = "anim2 linear 1s";
var refVisitedLink = document.createElement("a");
refVisitedLink.setAttribute("href", window.top.location.href);
refVisitedLink.setAttribute("href", topLocation);
refVisitedLink.classList.add("visitedLink");
gDisplay.appendChild(div1);
@ -2499,7 +2502,9 @@ addAsyncAnimTest(async function() {
omta_todo_is("background-color", "rgb(128, 128, 0)", RunningOn.ToDoCompositor,
"background-color on compositor at 5s");
gDiv.setAttribute("href", window.top.location.href);
const topLocation =
await SpecialPowers.spawnChrome([], () => browsingContext.top.currentURI.spec);
gDiv.setAttribute("href", topLocation);
await waitForVisitedLinkColoring(gDiv, "color", "rgb(0, 0, 255)");
await waitForPaintsFlushed();