1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug455629.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,63 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=455629 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 455629</title> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.13 +</head> 1.14 +<body> 1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=455629">Mozilla Bug 455629</a> 1.16 +<p id="display"></p> 1.17 +<div id="content" style="display: none"> 1.18 + 1.19 +</div> 1.20 +<pre id="test"> 1.21 +<script type="application/javascript"> 1.22 +/** Test for Bug 455629 **/ 1.23 +SimpleTest.waitForExplicitFinish(); 1.24 + 1.25 +var done = 0; 1.26 +function doTest(name) { 1.27 + var elem = $(name); 1.28 + var doc = elem.getSVGDocument(); 1.29 + try { 1.30 + doc.foopy = 42; 1.31 + fail("Able to set cross origin property!"); 1.32 + } catch (e) { 1.33 + ok(true, "unable to set non-allAccess property cross origin"); 1.34 + } 1.35 + 1.36 + if (elem instanceof HTMLObjectElement) { 1.37 + doc = elem.contentDocument; 1.38 + try { 1.39 + doc.foopy = 42; 1.40 + fail("Able to set cross origin property!"); 1.41 + } catch (e) { 1.42 + ok(true, "unable to set non-allAccess property cross origin"); 1.43 + } 1.44 + } 1.45 + 1.46 + if (++done == 2) { 1.47 + SimpleTest.finish(); 1.48 + } 1.49 +} 1.50 +</script> 1.51 + 1.52 +<object id="obj" 1.53 + type="image/svg+xml" 1.54 + onload="doTest('obj')" 1.55 + data="http://example.org/tests/content/base/test/bug455629-helper.svg"> 1.56 +</object> 1.57 + 1.58 +<embed id="emb" 1.59 + type="image/svg+xml" 1.60 + onload="doTest('emb')" 1.61 + src="http://example.org/tests/content/base/test/bug455629-helper.svg"> 1.62 +</embed> 1.63 + 1.64 +</pre> 1.65 +</body> 1.66 +</html>