Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(redirects): remove broken redirect rules #9762

Merged
merged 3 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions libs/fundamental-redirects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,75 +317,6 @@ const SCL3_REDIRECT_PATTERNS = [
"/docs/Web/API/CanvasRenderingContext2D.globalCompositeOperation",
{ permanent: true }
),
//##################################
// MOZILLADEMOS
//##################################
// canvas images
redirect(
/^samples\/canvas-tutorial\/images\/backdrop.png$/i,
"https://mdn.mozillademos.org/files/5395/backdrop.png",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/bg_gallery.png$/i,
"https://mdn.mozillademos.org/files/5415/bg_gallery.png",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_1.jpg$/i,
"https://mdn.mozillademos.org/files/5399/gallery_1.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_2.jpg$/i,
"https://mdn.mozillademos.org/files/5401/gallery_2.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_3.jpg$/i,
"https://mdn.mozillademos.org/files/5403/gallery_3.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_4.jpg$/i,
"https://mdn.mozillademos.org/files/5405/gallery_4.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_5.jpg$/i,
"https://mdn.mozillademos.org/files/5407/gallery_5.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_6.jpg$/i,
"https://mdn.mozillademos.org/files/5409/gallery_6.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_7.jpg$/i,
"https://mdn.mozillademos.org/files/5411/gallery_7.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/gallery_8.jpg$/i,
"https://mdn.mozillademos.org/files/5413/gallery_8.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/picture_frame.png$/i,
"https://mdn.mozillademos.org/files/242/Canvas_picture_frame.png",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/rhino.jpg$/i,
"https://mdn.mozillademos.org/files/5397/rhino.jpg",
{ permanent: true }
),
redirect(
/^samples\/canvas-tutorial\/images\/wallpaper.png$/i,
"https://mdn.mozillademos.org/files/222/Canvas_createpattern.png",
{ permanent: true }
),
// canvas example in samples/domref
redirect(
/^samples\/domref\/mozGetAsFile.html$/i,
Expand Down
61 changes: 0 additions & 61 deletions testing/integration/headless/map_301.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,67 +469,6 @@
)
)

# Converted from SCL3 Apache files - move to untrusted domain
MOZILLADEMOS_URLS = list(
flatten(
(
# https://mdn.mozillademos.org/
url_test(
"/samples/canvas-tutorial/images/backdrop.png",
"https://mdn.mozillademos.org/files/5395/backdrop.png",
),
url_test(
"/samples/canvas-tutorial/images/bg_gallery.png",
"https://mdn.mozillademos.org/files/5415/bg_gallery.png",
),
url_test(
"/samples/canvas-tutorial/images/gallery_1.jpg",
"https://mdn.mozillademos.org/files/5399/gallery_1.jpg",
),
url_test(
"/samples/canvas-tutorial/images/gallery_2.jpg",
"https://mdn.mozillademos.org/files/5401/gallery_2.jpg",
),
url_test(
"/samples/canvas-tutorial/images/gallery_3.jpg",
"https://mdn.mozillademos.org/files/5403/gallery_3.jpg",
),
url_test(
"/samples/canvas-tutorial/images/gallery_4.jpg",
"https://mdn.mozillademos.org/files/5405/gallery_4.jpg",
),
url_test(
"/samples/canvas-tutorial/images/gallery_5.jpg",
"https://mdn.mozillademos.org/files/5407/gallery_5.jpg",
),
url_test(
"/samples/canvas-tutorial/images/gallery_6.jpg",
"https://mdn.mozillademos.org/files/5409/gallery_6.jpg",
),
url_test(
"/samples/canvas-tutorial/images/gallery_7.jpg",
"https://mdn.mozillademos.org/files/5411/gallery_7.jpg",
),
url_test(
"/samples/canvas-tutorial/images/gallery_8.jpg",
"https://mdn.mozillademos.org/files/5413/gallery_8.jpg",
),
url_test(
"/samples/canvas-tutorial/images/picture_frame.png",
"https://mdn.mozillademos.org/files/242/Canvas_picture_frame.png",
),
url_test(
"/samples/canvas-tutorial/images/rhino.jpg",
"https://mdn.mozillademos.org/files/5397/rhino.jpg",
),
url_test(
"/samples/canvas-tutorial/images/wallpaper.png",
"https://mdn.mozillademos.org/files/222/Canvas_createpattern.png",
),
)
)
)

# These are the remaining "samples/*" URL's, the ones that haven't been redirected
# by any of the special cases, which we expect to be redirected to the media CDN.
DEFAULT_SAMPLES_URLS = [
Expand Down
9 changes: 0 additions & 9 deletions testing/integration/headless/test_redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
LEGACY_URLS,
MARIONETTE_URLS,
MISC_REDIRECT_URLS,
MOZILLADEMOS_URLS,
REDIRECT_URLS,
SCL3_REDIRECT_URLS,
WEBEXT_URLS,
Expand All @@ -38,14 +37,6 @@ def test_github_redirects(url, base_url):
assert_valid_url(**url)


@pytest.mark.parametrize(
"url", MOZILLADEMOS_URLS, ids=[item["url"] for item in MOZILLADEMOS_URLS]
)
def test_mozillademos_redirects(url, base_url):
url["base_url"] = base_url
assert_valid_url(**url)


@pytest.mark.parametrize(
"url", DEFAULT_SAMPLES_URLS, ids=[item["url"] for item in DEFAULT_SAMPLES_URLS]
)
Expand Down
61 changes: 0 additions & 61 deletions testing/tests/redirects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,61 +488,6 @@ const GITHUB_IO_URLS = [].concat(
)
);

const MOZILLADEMOS_URLS = [].concat(
url_test(
"/samples/canvas-tutorial/images/backdrop.png",
"https://mdn.mozillademos.org/files/5395/backdrop.png"
),
url_test(
"/samples/canvas-tutorial/images/bg_gallery.png",
"https://mdn.mozillademos.org/files/5415/bg_gallery.png"
),
url_test(
"/samples/canvas-tutorial/images/gallery_1.jpg",
"https://mdn.mozillademos.org/files/5399/gallery_1.jpg"
),
url_test(
"/samples/canvas-tutorial/images/gallery_2.jpg",
"https://mdn.mozillademos.org/files/5401/gallery_2.jpg"
),
url_test(
"/samples/canvas-tutorial/images/gallery_3.jpg",
"https://mdn.mozillademos.org/files/5403/gallery_3.jpg"
),
url_test(
"/samples/canvas-tutorial/images/gallery_4.jpg",
"https://mdn.mozillademos.org/files/5405/gallery_4.jpg"
),
url_test(
"/samples/canvas-tutorial/images/gallery_5.jpg",
"https://mdn.mozillademos.org/files/5407/gallery_5.jpg"
),
url_test(
"/samples/canvas-tutorial/images/gallery_6.jpg",
"https://mdn.mozillademos.org/files/5409/gallery_6.jpg"
),
url_test(
"/samples/canvas-tutorial/images/gallery_7.jpg",
"https://mdn.mozillademos.org/files/5411/gallery_7.jpg"
),
url_test(
"/samples/canvas-tutorial/images/gallery_8.jpg",
"https://mdn.mozillademos.org/files/5413/gallery_8.jpg"
),
url_test(
"/samples/canvas-tutorial/images/picture_frame.png",
"https://mdn.mozillademos.org/files/242/Canvas_picture_frame.png"
),
url_test(
"/samples/canvas-tutorial/images/rhino.jpg",
"https://mdn.mozillademos.org/files/5397/rhino.jpg"
),
url_test(
"/samples/canvas-tutorial/images/wallpaper.png",
"https://mdn.mozillademos.org/files/222/Canvas_createpattern.png"
)
);

const DEFAULT_SAMPLES_URLS = [].concat(
url_test("/samples/cssref/background.html", null, { statusCode: 302 }),
url_test("/samples/html/progress.html", null, { statusCode: 302 })
Expand Down Expand Up @@ -1326,12 +1271,6 @@ describe("github io redirects", () => {
}
});

describe("mozilla demos redirects", () => {
for (const [url, t] of MOZILLADEMOS_URLS) {
it(url, t);
}
});

describe("default samples redirects", () => {
for (const [url, t] of DEFAULT_SAMPLES_URLS) {
it(url, t);
Expand Down