From a4d4ccb3fccabfe4e9b6431b02b5a418883d2d51 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 15 Nov 2018 20:58:03 +0000 Subject: [PATCH] Bug 1507352 - Part 2: Fix the path names to headless.html used inside test_headless_screenshot.html r=mossop This has no material impact on whether the test fails or passes, but it is a waste of effort to package headless.html inside chrome.ini and then fail to link to it properly when running the test. Depends on D11969 Differential Revision: https://phabricator.services.mozilla.com/D11963 --HG-- extra : moz-landing-system : lando --- .../shell/test/test_headless_screenshot.html | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/browser/components/shell/test/test_headless_screenshot.html b/browser/components/shell/test/test_headless_screenshot.html index ed7591ce14e7..eb8041781e51 100644 --- a/browser/components/shell/test/test_headless_screenshot.html +++ b/browser/components/shell/test/test_headless_screenshot.html @@ -76,7 +76,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1378010 size += "," + height; } - await runFirefox(["-url", "http://mochi.test:8888/headless.html", "-screenshot", screenshotPath, "-window-size", size]); + await runFirefox(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", screenshotPath, "-window-size", size]); let saved = await OS.File.exists(screenshotPath); ok(saved, "A screenshot should be saved in the tmp directory"); @@ -109,33 +109,33 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1378010 // Test all four basic variations of the "screenshot" argument // when a file path is specified. - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", "-screenshot", screenshotPath], screenshotPath); - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", `-screenshot=${screenshotPath}`], screenshotPath); - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", "--screenshot", screenshotPath], screenshotPath); - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", `--screenshot=${screenshotPath}`], screenshotPath); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", screenshotPath], screenshotPath); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", `-screenshot=${screenshotPath}`], screenshotPath); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "--screenshot", screenshotPath], screenshotPath); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", `--screenshot=${screenshotPath}`], screenshotPath); // Test variations of the "screenshot" argument when a file path // isn't specified. - await testFileCreationPositive(["-screenshot", "http://mochi.test:8888/headless.html"], "screenshot.png"); - await testFileCreationPositive(["http://mochi.test:8888/headless.html", "-screenshot"], "screenshot.png"); - await testFileCreationPositive(["--screenshot", "http://mochi.test:8888/headless.html"], "screenshot.png"); - await testFileCreationPositive(["http://mochi.test:8888/headless.html", "--screenshot"], "screenshot.png"); + await testFileCreationPositive(["-screenshot", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html"], "screenshot.png"); + await testFileCreationPositive(["http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot"], "screenshot.png"); + await testFileCreationPositive(["--screenshot", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html"], "screenshot.png"); + await testFileCreationPositive(["http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "--screenshot"], "screenshot.png"); // Test invalid URL arguments (either no argument or too many arguments). await testFileCreationNegative(["-screenshot"], "screenshot.png"); - await testFileCreationNegative(["http://mochi.test:8888/headless.html", "http://mochi.test:8888/headless.html", "-screenshot"], "screenshot.png"); + await testFileCreationNegative(["http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "http://mochi.test:8888/headless.html", "-screenshot"], "screenshot.png"); // Test all four basic variations of the "window-size" argument. - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", "-screenshot", "-window-size", "800"], "screenshot.png"); - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", "-screenshot", "-window-size=800"], "screenshot.png"); - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", "-screenshot", "--window-size", "800"], "screenshot.png"); - await testFileCreationPositive(["-url", "http://mochi.test:8888/headless.html", "-screenshot", "--window-size=800"], "screenshot.png"); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", "-window-size", "800"], "screenshot.png"); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", "-window-size=800"], "screenshot.png"); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", "--window-size", "800"], "screenshot.png"); + await testFileCreationPositive(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", "--window-size=800"], "screenshot.png"); // Test other variations of the "window-size" argument. await testWindowSizePositive(800, 600); await testWindowSizePositive(1234); - await testFileCreationNegative(["-url", "http://mochi.test:8888/headless.html", "-screenshot", "-window-size", "hello"], "screenshot.png"); - await testFileCreationNegative(["-url", "http://mochi.test:8888/headless.html", "-screenshot", "-window-size", "800,"], "screenshot.png"); + await testFileCreationNegative(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", "-window-size", "hello"], "screenshot.png"); + await testFileCreationNegative(["-url", "http://mochi.test:8888/chrome/browser/components/shell/test/headless.html", "-screenshot", "-window-size", "800,"], "screenshot.png"); SimpleTest.finish(); })();