summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/old-tests/submission/Microsoft/sandbox
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/old-tests/submission/Microsoft/sandbox')
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_001.htm11
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm21
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm12
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_004.htm10
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm12
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm12
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_008.htm9
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_009.htm9
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_010.htm9
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm13
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020.htm28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020a.htm13
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021.htm28
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021a.htm13
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_022.htm11
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm15
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm13
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_026.htm12
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_027.htm21
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm20
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm19
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_031.htm19
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm27
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdfbin0 -> 80990 bytes
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_001.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm25
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_005.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm37
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm37
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm37
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm37
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm37
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm65
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_012.htm36
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_013.htm38
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_014.htm36
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_015.htm36
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm35
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_017.htm36
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_018.htm36
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_019.htm36
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm44
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm38
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_023.htm34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_024.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_025.htm32
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_026.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_027.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_028.htm34
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_029.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_030.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_031.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_032.htm33
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js14
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-fail.htm9
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-iframe-content.htm9
-rw-r--r--testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-pass.htm9
60 files changed, 1540 insertions, 0 deletions
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_001.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_001.htm
new file mode 100644
index 000000000..24d16cfcc
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_001.htm
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with script</title>
+</head>
+<body>
+ <script type="text/javascript">
+ parent.window.postMessage("script ran", "*");
+ </script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm
new file mode 100644
index 000000000..e63784771
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 video with autoplay attribute.</title>
+ <script src="/common/media.js"></script>
+</head>
+<body>
+ <script>
+ function do_play(event) {
+ parent.window.postMessage("play event fired", "*");
+ }
+
+ document.write(
+ "<video id='video0' src='" + getVideoURI("/media/green-at-15") + "'" +
+ " autoplay onplay='do_play(event);'>"
+ );
+ </script>
+ Your browser does not support HTML5 video.
+ </video>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm
new file mode 100644
index 000000000..621ece79a
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>autofocus on form control</title>
+</head>
+<body>
+ <div>Below form control has autofocus attribute set.</div><br />
+ <form action="">
+ <span>Textbox: </span><input autofocus="autofocus" type="text" name="movie" />
+ </form>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_004.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_004.htm
new file mode 100644
index 000000000..02960d078
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_004.htm
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>object tag</title>
+</head>
+<body>
+ <object width="400" height="600" data="sandbox.pdf">
+ </object>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm
new file mode 100644
index 000000000..42542ae14
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Form submission</title>
+</head>
+<body>
+ <form id="form1" action="standalone-pass.htm">
+ <span>Name: </span><input type="text" name="name" value="browser" /><br />
+ <input id="submitButton" type="submit" value="Submit Form" />
+ </form>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm
new file mode 100644
index 000000000..fc01557c7
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Form submission</title>
+</head>
+<body>
+ <form id="form1" action="standalone-fail.htm">
+ <span>Name: </span><input type="text" name="name" value="browser" /><br />
+ <input id="submitButton" type="submit" value="Submit Form" />
+ </form>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_008.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_008.htm
new file mode 100644
index 000000000..115b97293
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_008.htm
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with hyperlink and target set to self</title>
+</head>
+<body>
+ <a id="hyperlink" href="standalone-pass.htm" target="_self">Click here to perform self navigation</a>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_009.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_009.htm
new file mode 100644
index 000000000..f232dcb7c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_009.htm
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with showModalDialog() API</title>
+</head>
+<body>
+ <button type="button" onclick="javascript:showModalDialog('standalone-fail.htm')">Click here to call showModalDialog() API</button>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_010.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_010.htm
new file mode 100644
index 000000000..d4e81bb96
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_010.htm
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with window.open()</title>
+</head>
+<body>
+ <button type="button" onclick="javascript:window.open('standalone-fail.htm')">Click here to call window.open() API</button>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm
new file mode 100644
index 000000000..b1e8f92fb
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with access to document.cookie</title>
+</head>
+<body>
+ <script type="text/javascript">
+ cookie = document.cookie;
+ document.cookie = "name=browser";
+ parent.window.postMessage("cookies are R/W", "*");
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020.htm
new file mode 100644
index 000000000..3304ea84b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020.htm
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with iframes</title>
+</head>
+<body>
+ <table cellpadding="5" cellspacing="10">
+ <tr>
+ <td>
+ <span>child iframe with sandbox="allow-scripts" attribute</span><br />
+ <iframe id="Iframe1" src="iframe_sandbox_020a.htm" sandbox="allow-scripts" style="height: 50px; width: 250px;"></iframe>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span>child iframe with sandbox="" attribute</span><br />
+ <iframe id="Iframe2" src="iframe_sandbox_020a.htm" sandbox="" style="height: 50px; width: 250px;"></iframe>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span>child iframe without sandbox attribute</span><br />
+ <iframe id="Iframe3" src="iframe_sandbox_020a.htm" style="height: 50px; width: 250px;"></iframe>
+ </td>
+ </tr>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020a.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020a.htm
new file mode 100644
index 000000000..a419c9413
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_020a.htm
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with script</title>
+</head>
+<body>
+ <div>Script Execution: <span id="scriptExecute" style="Color: Green">Blocked</span></div>
+ <script type="text/javascript">
+ document.getElementById("scriptExecute").innerHTML = "Not Blocked";
+ document.getElementById("scriptExecute").style.color = "Red";
+ </script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021.htm
new file mode 100644
index 000000000..e3041ccef
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021.htm
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with iframes</title>
+</head>
+<body>
+ <table cellpadding="5" cellspacing="10">
+ <tr>
+ <td>
+ <span>child iframe with sandbox="allow-scripts" attribute</span><br />
+ <iframe id="Iframe1" src="iframe_sandbox_021a.htm" sandbox="allow-scripts" style="height: 50px; width: 250px;"></iframe>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span>child iframe with sandbox="" attribute</span><br />
+ <iframe id="Iframe2" src="iframe_sandbox_020a.htm" sandbox="" style="height: 50px; width: 250px;"></iframe>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span>child iframe without sandbox attribute</span><br />
+ <iframe id="Iframe3" src="iframe_sandbox_021a.htm" style="height: 50px; width: 250px;"></iframe>
+ </td>
+ </tr>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021a.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021a.htm
new file mode 100644
index 000000000..4e22a363c
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_021a.htm
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with script</title>
+</head>
+<body>
+ <div>Script Execution: <span id="scriptExecute" style="Color: Red">Blocked</span></div>
+ <script type="text/javascript">
+ document.getElementById("scriptExecute").innerHTML = "Allowed";
+ document.getElementById("scriptExecute").style.color = "Green";
+ </script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_022.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_022.htm
new file mode 100644
index 000000000..11382d1d7
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_022.htm
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>target=_top</title>
+</head>
+<body>
+ <div>hyperlink with target=_top</div>
+ <br />
+ <a href="standalone-pass.htm" target="_top">Open the link in top window</a>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm
new file mode 100644
index 000000000..a65db539b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head><title>Access parent dom</title>
+</head>
+<body>
+ <script type="text/javascript">
+ if (window.parent.document)
+ {
+ parent.window.postMessage("window.parent.document", "*");
+ }else{
+ parent.window.postMessage("!window.parent.document", "*");
+ }
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm
new file mode 100644
index 000000000..1b0996e58
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head><title>Page with access to document.cookie</title>
+</head>
+<body>
+ <div>Cookie Read: <span id="readCookie"></span></div>
+ <script type="text/javascript">
+ cookie = document.cookie;
+ document.cookie = "name=browser";
+ parent.window.postMessage("cookies are R/W", "*");
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_026.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_026.htm
new file mode 100644
index 000000000..5f1a973e1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_026.htm
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head><title>Page with access to localStorage and sessionStorage</title>
+</head>
+<body>
+ <script type="text/javascript">
+ if (window.localStorage && window.sessionStorage) {
+ parent.window.postMessage("access to window.localStorage and window.sessionStorage", "*");
+ }
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_027.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_027.htm
new file mode 100644
index 000000000..366bff6f9
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_027.htm
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head><title>XMLHttpRequest</title>
+</head>
+<body>
+ <script type="text/javascript">
+ xhrRequest = new XMLHttpRequest();
+
+ xhrRequest.onreadystatechange = function () {
+ if (xhrRequest.readyState == 4 && xhrRequest.status == 200) {
+ //xhr successful
+ parent.window.postMessage("access to window.XMLHttpRequest", "*");
+ }
+ }
+
+ xhrRequest.open("GET", "standalone-pass.htm", true);
+ xhrRequest.send();
+
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm
new file mode 100644
index 000000000..d7ca76144
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head><title>Access parent dom</title>
+</head>
+<body>
+ <script type="text/javascript">
+ try
+ {
+ if (window.parent.document)
+ {
+ parent.window.postMessage("window.parent.document", "*");
+ }
+ }
+ catch(e)
+ {
+ parent.window.postMessage("!window.parent.document", "*");
+ }
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm
new file mode 100644
index 000000000..5d5c720bd
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head><title>Page with access to document.cookie</title>
+</head>
+<body>
+ <div>Cookie Read: <span id="readCookie"></span></div>
+ <script type="text/javascript">
+ try
+ {
+ cookie = document.cookie;
+ document.cookie = "name=browser";
+ parent.window.postMessage("cookies are R/W", "*");
+ }catch(e)
+ {
+ parent.window.postMessage("cookies are not R/W", "*");
+ }
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_031.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_031.htm
new file mode 100644
index 000000000..7ec7d7a4e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_031.htm
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head><title>Page with access to localStorage and sessionStorage</title>
+</head>
+<body>
+ <script type="text/javascript">
+ try
+ {
+ if (window.localStorage && window.sessionStorage) {
+ parent.window.postMessage("access to window.localStorage and window.sessionStorage", "*");
+ }
+ }
+ catch(e)
+ {
+ parent.window.postMessage("no access to window.localStorage and window.sessionStorage", "*");
+ }
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm
new file mode 100644
index 000000000..abc0370c2
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_032.htm
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head><title>XMLHttpRequest</title>
+</head>
+<body>
+ <script type="text/javascript">
+
+ try
+ {
+ xhrRequest = new XMLHttpRequest();
+
+ xhrRequest.onreadystatechange = function () {
+ if (xhrRequest.readyState == 4 && xhrRequest.status == 200) {
+ //xhr successful
+ parent.window.postMessage("access to window.XMLHttpRequest", "*");
+ }
+ }
+
+ xhrRequest.open("GET", "standalone-pass.htm", true);
+ xhrRequest.send();
+
+ }catch(e){}
+
+ parent.window.postMessage("no access to window.XMLHttpRequest", "*");
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdf b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdf
new file mode 100644
index 000000000..0e16bc8d9
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdf
Binary files differ
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_001.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_001.htm
new file mode 100644
index 000000000..53e2172bc
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_001.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow script execution inside iframe with sandbox attribute when sandbox="allow-scripts".</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-scripts-browsing-context-flag" />
+ <meta name="assert" content="Allow script execution inside iframe with sandbox attribute when sandbox='allow-scripts'." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Allow script execution inside iframe with sandbox attribute when sandbox='allow-scripts'.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "script ran");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 8000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <iframe src="iframe_sandbox_001.htm" sandbox="allow-scripts" style="display: none"></iframe>
+ <div id=log></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm
new file mode 100644
index 000000000..767518456
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow autoplay for HTML5 Video inside iframe with sandbox attribute if sandbox='allow-scripts'.</title>
+ <meta name=timeout content=long>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script>
+ async_test(function (t) {
+ var callback = t.step_func_done(function(event) {
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "play event fired");
+ });
+
+ window.addEventListener("message", callback, false);
+ }, "Allow autoplay for HTML5 Video inside iframe with sandbox attribute if sandbox='allow-scripts'.");
+ </script>
+ <iframe src="iframe_sandbox_002.htm" sandbox="allow-scripts" style="display: none"></iframe>
+ <div id=log></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm
new file mode 100644
index 000000000..21078322b
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block autofocus on form control inside iframe with sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-automatic-features-browsing-context-flag" />
+ <meta name="assert" content="Block autofocus on form control inside iframe with sandbox attribute." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Block autofocus on form controls inside iframe with sandbox attribute.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>Test passes if caret (text cursor) is not on the textbox in the below iframe.</td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox</pre>
+ <iframe src="iframe_sandbox_003.htm" sandbox style="height: 100px; width: 400px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm
new file mode 100644
index 000000000..21b063aed
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block plugins inside iframe with sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-plugins-browsing-context-flag" />
+ <meta name="assert" content="Block plugins inside iframe with sandbox attribute." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Block plugins inside iframe with sandbox attribute.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>Test passes if you DO NOT see the 'Sample PDF For Testing' pdf below or 'FAIL'.<br>
+ Test requires that a pdf plugin has been installed!</td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox</pre>
+ <iframe sandbox src="iframe_sandbox_004.htm" height="400" width ="600"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_005.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_005.htm
new file mode 100644
index 000000000..cc5f815c9
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_005.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block script execution inside iframe with sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-scripts-browsing-context-flag" />
+ <meta name="assert" content="Block script execution inside iframe with sandbox attribute." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Block script execution inside iframe with sandbox attribute.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_true(!event);
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <iframe src="iframe_sandbox_001.htm" sandbox style="display: none"></iframe>
+ <div id=log></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm
new file mode 100644
index 000000000..487e8d4cf
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow form submission inside sandbox iframe when sandbox='allow-forms'</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-forms-browsing-context-flag" />
+ <meta name="assert" content="Allow form submission inside sandbox iframe when sandbox='allow-forms'." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Allow form submission inside iframe with sandbox attribute if sandbox='allow-forms'.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>
+ <div>Steps:</div>
+ <div>1. Click button "Submit Form".</div>
+ <br />
+ <div>Test passes if there is no red on the page and if the word "PASS" appears in the below iframe after following the above steps.</div>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox="allow-forms"</pre>
+ <iframe src="iframe_sandbox_006.htm" sandbox="allow-forms" style="height: 100px; width: 300px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm
new file mode 100644
index 000000000..5caa12a07
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block form submission inside sandbox iframe</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-forms-browsing-context-flag" />
+ <meta name="assert" content="Block form submission inside sandbox iframe." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Block form submission inside iframe with sandbox attribute.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>
+ <div>Steps:</div>
+ <div>1. Click button "Submit Form".</div>
+ <br />
+ <div>Test passes if there is no red on the page and there is no navigation in the below iframe after following the above steps.</div>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox="allow-scripts allow-same-origin allow-top-navigation"</pre>
+ <iframe src="iframe_sandbox_007.htm" sandbox="allow-scripts allow-same-origin allow-top-navigation" style="height: 100px; width: 300px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm
new file mode 100644
index 000000000..dde12ef1d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow sandboxed iframe content to navigate the sandboxed browsing context itself.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-navigation-browsing-context-flag" />
+ <meta name="assert" content="Allow sandboxed iframe content to navigate the sandboxed browsing context itself." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Allow sandboxed iframe content to navigate the sandboxed browsing context itself.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>
+ <div>Steps:</div>
+ <div>1. Click link "Click here to perform self navigation".</div>
+ <br />
+ <div>Test passes if there is no red on the page and the word "PASS" appears in the below iframe after following the above steps.</div>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox=""</pre>
+ <iframe id="iframe1" name="iframe1" src="iframe_sandbox_008.htm" sandbox="" style="height: 100px; width: 350px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm
new file mode 100644
index 000000000..5cb0d9030
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block popup created via showModalDialog() inside iframe with sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="Block popup created via showModalDialog() inside iframe with sandbox attribute." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Block popup created via showModalDialog() inside iframe with sandbox attribute.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>
+ <div>Steps:</div>
+ <div>1. Click button "Click here to call showModalDialog() API".</div>
+ <br />
+ <div>Test passes if there is no red on the page and no new window opens. The user agent may offer the user the option of allowing a new window to open.</div>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation"</pre>
+ <iframe src="iframe_sandbox_009.htm" sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation" style="height: 100px; width: 450px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm
new file mode 100644
index 000000000..4341066e1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block window.open() API inside iframe with sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-navigation-browsing-context-flag" />
+ <meta name="assert" content="Block window.open() API inside iframe with sandbox attribute." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Block window.open() API inside iframe with sandbox attribute.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>
+ <div>Steps:</div>
+ <div>1. Click button "Click here to call window.open() API".</div>
+ <br />
+ <div>Test passes if there is no red on the page and no new window opens. The user agent may offer the user the option of allowing a new window to open.</div>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation"</pre>
+ <iframe src="iframe_sandbox_010.htm" sandbox="allow-scripts allow-same-origin allow-forms allow-top-navigation" style="height: 100px; width: 450px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm
new file mode 100644
index 000000000..ce3ee1a7d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: iframe sandbox attribute value support DOMTokenList interface.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-iframe-element" />
+ <meta name="assert" content="iframe sandbox attribute value support DOMTokenList interface." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <div id=log></div>
+ <iframe id="iframe1" src="about:blank" sandbox="allow-scripts allow-same-origin allow-forms" style="display : none"></iframe>
+ <script type="text/javascript">
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ assert_equals(iframeEle.sandbox.length, 3)
+ }, "DOMTokenList length")
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ assert_equals(iframeEle.sandbox.item(1), "allow-same-origin")
+ }, "DOMTokenList item(index)")
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ assert_true(iframeEle.sandbox.contains("allow-forms"))
+ }, "DOMTokenList contains(DomString)")
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ iframeEle.sandbox.add("ALLOW-SANDBOX");
+ assert_true(iframeEle.sandbox.contains("ALLOW-SANDBOX"))
+ }, "DOMTokenList add(DomString)")
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ iframeEle.sandbox.remove("ALLOW-SANDBOX");
+ assert_false(iframeEle.sandbox.contains("ALLOW-SANDBOX"))
+ }, "DOMTokenList remove(DomString)")
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ iframeEle.sandbox.remove("ALLOW-SANDBOX");
+ assert_true(
+ iframeEle.sandbox.toggle("allow-top-navigation") && iframeEle.sandbox.contains("allow-top-navigation") &&
+ !iframeEle.sandbox.toggle("allow-top-navigation") && !iframeEle.sandbox.contains("allow-top-navigation")
+ )
+ }, "DOMTokenList toggle(DomString) - Returns true if token is now present (it was added); returns false if it is not (it was removed).")
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ assert_equals(iframeEle.sandbox.value, iframeEle.sandbox.toString())
+ }, "DOMTokenList sandbox.toString()")
+
+ test(function() {
+ var iframeEle = document.getElementById("iframe1");
+ iframeEle.sandbox.remove("ALLOW-SANDBOX");
+ assert_true(iframeEle.sandbox.contains("allow-scripts") != iframeEle.sandbox.contains("Allow-SCRIPTS"))
+ }, "DOMTokenList case sensitivity")
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_012.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_012.htm
new file mode 100644
index 000000000..cf99378cd
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_012.htm
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox=" Allow-Scripts Allow-Same-Origin "></iframe>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_013.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_013.htm
new file mode 100644
index 000000000..ab0aea079
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_013.htm
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="
+ allow-scripts
+ allow-same-origin
+ "></iframe>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_014.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_014.htm
new file mode 100644
index 000000000..774720929
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_014.htm
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox=" allow-scripts allow-same-origin "></iframe>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_015.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_015.htm
new file mode 100644
index 000000000..a34ede4b3
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_015.htm
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="&#32ALLOW-SCRIPTS&#32allow-same-origin&#32"></iframe>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm
new file mode 100644
index 000000000..c84e223e1
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function() {
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="&#13ALLOW-SCRIPTS&#13allow-same-origin&#13"></iframe>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_017.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_017.htm
new file mode 100644
index 000000000..ade4c8092
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_017.htm
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="&#12ALLOW-SCRIPTS&#12allow-same-origin&#12"></iframe>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_018.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_018.htm
new file mode 100644
index 000000000..77f10d274
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_018.htm
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="&#10ALLOW-SCRIPTS&#10allow-same-origin&#10"></iframe>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_019.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_019.htm
new file mode 100644
index 000000000..d91280a60
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_019.htm
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: value of sandbox attribute must be an unordered set of unique space-separated tokens.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="value of sandbox attribute must be an unordered set of unique space-separated tokens." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("value of sandbox attribute must be an unordered set of unique space-separated tokens.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+
+ <iframe style="display:none" src="iframe_sandbox_012.htm" sandbox="&#9ALLOW-SCRIPTS&#9allow-same-origin&#9"></iframe>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm
new file mode 100644
index 000000000..751f85863
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</pre>
+ <div>This test is to verify script is blocked inside nested iframes if the top-most sandbox iframe has no 'allow-scripts' token.</div>
+ <br />
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>Test passes if there is no red on the page.</td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <div style="font-weight:bold">Top-most iframe with sandbox=""</div>
+ <iframe id="iframe1" name="iframe1" src="iframe_sandbox_020.htm" sandbox="" style="height: 330px; width: 400px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm
new file mode 100644
index 000000000..bbdc21f93
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#attr-iframe-sandbox" />
+ <meta name="assert" content="Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Nested iframes cannot have less sandbox restrictions than their most restrictive ancestor iframe.</pre>
+ <div>This test is to verify script is allowed inside nested iframes if any of the conditions below are true</div>
+ <div>1. both parent sandbox and child sandbox have 'allow-scripts' token.</div>
+ <div>2. parent sandbox has 'allow-scripts' token and nested child iframe has no sandbox attribute.</div>
+ <div>3. parent iframe has no sandbox attribute and child iframe has sandbox='allow-scripts' token.</div>
+ <div>4. both parent and child iframes have no sandbox attribute.</div>
+ <br />
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>Test passes if there is no red on the page.</td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <div style="float: left; border: 1px solid; padding: 5px;">
+ <div style="font-weight: bold">Top-most iframe with sandbox="allow-scripts"</div>
+ <iframe id="iframe1" src="iframe_sandbox_021.htm" sandbox="allow-scripts" style="height: 330px; width: 400px;"></iframe>
+ </div>
+ <div style="float: left; border: 1px solid; padding: 5px; margin-left: 20px;">
+ <div style="font-weight: bold">Top-most iframe without sandbox attribute</div>
+ <iframe id="iframe2" src="iframe_sandbox_021.htm" style="height: 330px; width: 400px;"></iframe>
+ </div>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm
new file mode 100644
index 000000000..aa08de512
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: allow sandbox iframe to navigate their top-level browsing context if sandbox="allow-top-navigation".</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-scripts-browsing-context-flag" />
+ <meta name="assert" content="Allow sandbox iframe to navigate their top-level browsing context if sandbox='allow-top-navigation'." />
+ <script src="sandbox_helper.js" type="text/javascript"></script>
+</head>
+<body>
+ <pre>Description: Allow sandbox iframe to navigate its top-level browsing context if sandbox='allow-top-navigation'.</pre>
+ <table id='testtable' border='1'>
+ <tr>
+ <td>Test Result</td>
+ <td>Test Assertion</td>
+ </tr>
+ <tr>
+ <td id='test_0_result'>Manual</td>
+ <td id='test_0_assertion'>
+ <div>Steps:</div>
+ <div>1. Click link "Open the link in top window".</div>
+ <br />
+ <div>Test passes if there is no red on the page and no top-level navigation after following the above steps.</div>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <div id="testframe">
+ <pre>iframe with sandbox="allow-top-navigation"</pre>
+ <iframe src="iframe_sandbox_022.htm" sandbox="allow-top-navigation" style="height: 100px; width: 450px;"></iframe>
+ </div>
+ <script type="text/javascript">
+ DisableTestForNonSupportingBrowsers();
+ </script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_023.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_023.htm
new file mode 100644
index 000000000..7f8a436b4
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_023.htm
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow sandbox iframe to access other content from the same origin if sandbox="allow-same-origin".</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content=" Allow sandbox iframe to access other content from the same origin if sandbox='allow-same-origin'." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Allow sandbox iframe to access other content from the same origin if sandbox='allow-same-origin'");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "window.parent.document");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <iframe src="iframe_sandbox_023.htm" sandbox="allow-scripts allow-same-origin" style="display:none"></iframe>
+ <div id=log></div>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_024.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_024.htm
new file mode 100644
index 000000000..935543707
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_024.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: document.cookie access is allowed inside iframe with sandbox="allow-same-origin".</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="document.cookie access is allowed inside iframe with sandbox='allow-same-origin'." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("document.cookie access is allowed inside iframe with sandbox='allow-same-origin'.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+ <iframe src="iframe_sandbox_024.htm" sandbox="allow-scripts allow-same-origin" style="display:none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_025.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_025.htm
new file mode 100644
index 000000000..ab291e5ce
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_025.htm
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow parent content to access sandbox child iframe content when sandbox='allow-same-origin</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Allow parent content to access sandbox child iframe content when sandbox='allow-same-origin'" />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+
+ var t = async_test("Allow parent content to access sandbox child iframe content when sandbox='allow-same-origin'");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(document.getElementById('sandboxIframe').contentDocument.title, "Page with a message");
+ });
+ t.done();
+ }
+ </script>
+ <div id=log></div>
+
+ <iframe id='sandboxIframe' src="standalone-iframe-content.htm" sandbox="allow-same-origin" onload="callback()" style="display : none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_026.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_026.htm
new file mode 100644
index 000000000..49243899e
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_026.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow localStorage and sessionStorage access inside iframe with sandbox='allow-same-origin allow-scripts'.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Allow localStorage and sessionStorage access inside iframe with sandbox='allow-same-origin allow-scripts'." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Allow localStorage and sessionStorage access inside iframe with sandbox='allow-same-origin allow-scripts'");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "access to window.localStorage and window.sessionStorage");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+ <iframe src="iframe_sandbox_026.htm" sandbox="allow-scripts allow-same-origin" style="display : none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_027.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_027.htm
new file mode 100644
index 000000000..2b9cba5d2
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_027.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Allow XMLHttpRequest inside iframe with the sandbox attribute if sandbox='allow-same-origin'.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Allow XMLHttpRequest in an iframe with the sandbox attribute if sandbox='allow-same-origin'." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Allow XMLHttpRequest in an iframe with the sandbox attribute if sandbox='allow-same-origin'.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "access to window.XMLHttpRequest");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+ <iframe src="iframe_sandbox_027.htm" sandbox="allow-scripts allow-same-origin" style="display : none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_028.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_028.htm
new file mode 100644
index 000000000..56dfb6810
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_028.htm
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block sandbox iframe from accessing other content from the same origin.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Block sandbox iframe from accessing other content from the same origin." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Block sandbox iframe from accessing other content from the same origin.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "!window.parent.document");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <iframe src="iframe_sandbox_028.htm" sandbox="allow-scripts" style="display:none"></iframe>
+ <div id=log></div>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_029.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_029.htm
new file mode 100644
index 000000000..b88b74a22
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_029.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block document.cookie inside iframe with the sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Block document.cookie inside iframe with the sandbox attribute." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Block document.cookie inside iframe with the sandbox attribute.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "cookies are not R/W");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+ <iframe src="iframe_sandbox_029.htm" sandbox="allow-scripts" style="display:none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_030.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_030.htm
new file mode 100644
index 000000000..1c3b54cb0
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_030.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block parent content to access sandbox child iframe content when sandbox attribute exists</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Block parent content to access sandbox child iframe content when sandbox attribute exists" />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+
+ var t = async_test("Block parent content to access sandbox child iframe content when sandbox attribute exists");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ try { document.getElementById('sandboxIframe').contentDocument.title; assert_true(false);}
+ catch(e) {assert_true(true);}
+ });
+ t.done();
+ }
+ </script>
+ <div id=log></div>
+
+ <iframe id='sandboxIframe' src="standalone-iframe-content.htm" sandbox onload="callback()" style="display : none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_031.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_031.htm
new file mode 100644
index 000000000..2582fac35
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_031.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block localStorage and sessionStorage inside iframe with the sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Block localStorage and sessionStorage inside iframe with the sandbox attribute." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Block localStorage and sessionStorage inside iframe with the sandbox attribute.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "no access to window.localStorage and window.sessionStorage");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+ <iframe src="iframe_sandbox_031.htm" sandbox="allow-scripts" style="display : none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_032.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_032.htm
new file mode 100644
index 000000000..1c234fcc9
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_032.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Sandbox: Block XMLHttpRequest in an iframe with the sandbox attribute.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+ <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+ <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
+ <meta name="assert" content="Block XMLHttpRequest inside sandbox iframe." />
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+
+
+ var t = async_test("Block XMLHttpRequest in an iframe with the sandbox attribute.");
+
+ function callback(event)
+ {
+ t.step(function(){
+ assert_true('sandbox' in document.createElement('iframe'));
+ assert_equals(event.data, "no access to window.XMLHttpRequest");
+ });
+ t.done();
+ }
+
+ var timer = setTimeout(callback, 4000);
+ window.addEventListener("message", callback, false);
+ </script>
+ <div id=log></div>
+ <iframe src="iframe_sandbox_032.htm" sandbox="allow-scripts" style="display : none"></iframe>
+</body>
+</html>
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js
new file mode 100644
index 000000000..1472cbf22
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js
@@ -0,0 +1,14 @@
+function IsSandboxSupported() {
+ if ('sandbox' in document.createElement('iframe')) {
+ return true;
+ }
+ return false;
+}
+
+function DisableTestForNonSupportingBrowsers() {
+ //check if sandbox is supported by the browser
+ if (!IsSandboxSupported()) {
+ document.getElementById('testframe').innerHTML = "FAIL: Your browser does not support the sandbox attribute on the iframe element.";
+ document.getElementById('testframe').style.color = "Red";
+ }
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-fail.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-fail.htm
new file mode 100644
index 000000000..1725ef060
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-fail.htm
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with FAIL message</title>
+</head>
+<body>
+ <div style="color: Red">FAIL!!!</div>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-iframe-content.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-iframe-content.htm
new file mode 100644
index 000000000..e543c21d6
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-iframe-content.htm
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with a message</title>
+</head>
+<body>
+ <div>Hello World.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-pass.htm b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-pass.htm
new file mode 100644
index 000000000..0ca822f8d
--- /dev/null
+++ b/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/standalone-pass.htm
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Page with PASS message</title>
+</head>
+<body>
+ <div style="color: Green">PASS!!!</div>
+</body>
+</html> \ No newline at end of file