зеркало из https://github.com/mozilla/gecko-dev.git
45 строки
1.8 KiB
HTML
45 строки
1.8 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1240471
|
|
-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test for Bug 1240471</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
<script type="application/javascript">
|
|
SimpleTest.waitForExplicitFinish();
|
|
"use strict";
|
|
function onLoad () {
|
|
let youtube_changed_url_query = "https://mochitest.youtube.com/embed/Xm5i5kbIXzc?start=10&end=20";
|
|
|
|
function testEmbed(embed, expected_url) {
|
|
ok (embed, "Embed node exists");
|
|
embed = SpecialPowers.wrap(embed);
|
|
is (embed.srcURI.spec, expected_url, "Should have src uri of " + expected_url);
|
|
}
|
|
info("Running youtube rewrite query test");
|
|
testEmbed(document.getElementById("testembed-correct"), youtube_changed_url_query);
|
|
testEmbed(document.getElementById("testembed-wrong"), youtube_changed_url_query);
|
|
testEmbed(document.getElementById("testembed-whywouldyouevendothat"), youtube_changed_url_query);
|
|
SimpleTest.finish();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="onLoad()">
|
|
<embed id="testembed-correct"
|
|
src="https://mochitest.youtube.com/v/Xm5i5kbIXzc?start=10&end=20"
|
|
type="application/x-shockwave-flash"
|
|
allowscriptaccess="always"></embed>
|
|
<embed id="testembed-wrong"
|
|
src="https://mochitest.youtube.com/v/Xm5i5kbIXzc&start=10&end=20"
|
|
type="application/x-shockwave-flash"
|
|
allowscriptaccess="always"></embed>
|
|
<embed id="testembed-whywouldyouevendothat"
|
|
src="https://mochitest.youtube.com/v/Xm5i5kbIXzc&start=10?end=20"
|
|
type="application/x-shockwave-flash"
|
|
allowscriptaccess="always"></embed>
|
|
</body>
|
|
</html>
|