Update web-platform-tests.

This commit is contained in:
Ms2ger
2015-04-09 13:39:50 +02:00
parent 74afd086d2
commit 71008d816d
62 changed files with 793 additions and 150 deletions

View File

@@ -2,6 +2,7 @@
<html>
<head>
<title>Objects loaded using src attribute of &lt;embed&gt; tag are blocked unless their host is listed as an allowed source in the object-src directive</title>
<meta name=timeout content=long>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
@@ -34,19 +35,19 @@
function object_loaded() {
var elem = document.getElementById("flashObject");
var is_loaded = false;
try {
<!-- The Flash Player exposes values to JavaScript if a SWF has successfully been loaded. -->
var pct_loaded = elem.PercentLoaded();
is_loaded = true;
} catch (e) {}
var is_loaded = false;
try {
<!-- The Flash Player exposes values to JavaScript if a SWF has successfully been loaded. -->
var pct_loaded = elem.PercentLoaded();
is_loaded = true;
} catch (e) {}
if (hasMimeType) {
test1.step(function() {assert_false(is_loaded, "External object loaded.")});
} else {
test1.step(function() {assert_true(hasMimeType, "No Flash Player, cannot run test.")});
}
test1.done();
if (hasMimeType) {
test1.step(function() {assert_false(is_loaded, "External object loaded.")});
} else {
test1.step(function() {assert_true(hasMimeType, "No Flash Player, cannot run test.")});
}
test1.done();
}
</script>