Diff
Modified: trunk/LayoutTests/ChangeLog (145992 => 145993)
--- trunk/LayoutTests/ChangeLog 2013-03-16 16:41:34 UTC (rev 145992)
+++ trunk/LayoutTests/ChangeLog 2013-03-16 16:43:39 UTC (rev 145993)
@@ -1,3 +1,31 @@
+2013-03-16 Mike West <[email protected]>
+
+ fast/frames/sandboxed-iframe-scripting is flakey
+ https://bugs.webkit.org/show_bug.cgi?id=112482
+
+ Reviewed by Simon Fraser.
+
+ Tests that rely on multiple 'iframe' elements loading in a specific
+ order are a Bad Idea™. This patch splits
+ 'fast/frames/sandboxed-iframe-scripting.html' out into five tests, and
+ changes two of them (#2 and #4) to use message passing in order to
+ test in a way that 'js-test-{pre,post}' can cleanly report.
+
+ * fast/frames/sandboxed-iframe-scripting-01-expected.txt: Added.
+ * fast/frames/sandboxed-iframe-scripting-01.html: Added.
+ * fast/frames/sandboxed-iframe-scripting-02-expected.txt: Added.
+ * fast/frames/sandboxed-iframe-scripting-02.html: Added.
+ * fast/frames/sandboxed-iframe-scripting-03-expected.txt: Added.
+ * fast/frames/sandboxed-iframe-scripting-03.html: Added.
+ * fast/frames/sandboxed-iframe-scripting-04-expected.txt: Added.
+ * fast/frames/sandboxed-iframe-scripting-04.html: Added.
+ * fast/frames/sandboxed-iframe-scripting-05-expected.txt: Added.
+ * fast/frames/sandboxed-iframe-scripting-05.html: Added.
+ * fast/frames/sandboxed-iframe-scripting-expected.txt: Removed.
+ * fast/frames/sandboxed-iframe-scripting.html: Removed.
+ * platform/mac/TestExpectations:
+ Remove the skipped test, since it no longer exists.
+
2013-03-16 Jochen Eisinger <[email protected]>
Update test expectations for content shell.
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-01-expected.txt (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-01-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-01-expected.txt 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,11 @@
+Verify that sandboxed frames with sandbox='allow-scripts' can execute script.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS disallowedExecuted is 0
+PASS allowedExecuted is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-01.html (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-01.html (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-01.html 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script>
+ var allowedExecuted = 0;
+ var disallowedExecuted = 0;
+ window._onload_ = function() {
+ shouldBe("disallowedExecuted", "0");
+ shouldBe("allowedExecuted", "1");
+
+ isSuccessfullyParsed();
+ };
+ </script>
+</head>
+<body>
+ <iframe sandbox="allow-same-origin allow-scripts"
+ src="" ++window.top.allowedExecuted;">
+ </iframe>
+ <script>
+ description("Verify that sandboxed frames with sandbox='allow-scripts' can execute script.");
+ </script>
+</body>
+</html>
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-02-expected.txt (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-02-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-02-expected.txt 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,12 @@
+ALERT: PASS: Executed script in data URL
+Verify that sandboxed frames with sandbox='allow-scripts' can execute script from data: URLs.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS disallowedExecuted is 0
+PASS allowedExecuted is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-02.html (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-02.html (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-02.html 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script>
+ window.jsTestIsAsync = true;
+
+ var allowedExecuted = 0;
+ var disallowedExecuted = 0;
+ window.addEventListener('message', function () {
+ allowedExecuted++;
+
+ finish();
+ });
+
+ function finish() {
+ shouldBe("disallowedExecuted", "0");
+ shouldBe("allowedExecuted", "1");
+
+ finishJSTest();
+ };
+ </script>
+ <script src=""
+</head>
+<body>
+ <iframe sandbox="allow-same-origin allow-scripts"
+ src="" Executed script in data URL');window.parent.postMessage({'pass': true}, '*');</script>">
+ </iframe>
+ <script>
+ description("Verify that sandboxed frames with sandbox='allow-scripts' can execute script from data: URLs.");
+ </script>
+</body>
+</html>
+
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-03-expected.txt (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-03-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-03-expected.txt 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: Blocked script execution in 'about:blank' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
+Verify that sandboxed frames without sandbox='allow-scripts' cannot execute script.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS disallowedExecuted is 0
+PASS allowedExecuted is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-03.html (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-03.html (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-03.html 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script>
+ var allowedExecuted = 0;
+ var disallowedExecuted = 0;
+ window._onload_ = function() {
+ shouldBe("disallowedExecuted", "0");
+ shouldBe("allowedExecuted", "0");
+
+ isSuccessfullyParsed();
+ };
+ </script>
+</head>
+<body>
+ <iframe sandbox="allow-same-origin"
+ src="" ++window.top.disallowedExecuted;">
+ </iframe>
+ <script>
+ description("Verify that sandboxed frames without sandbox='allow-scripts' cannot execute script.");
+ </script>
+</body>
+</html>
+
+
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04-expected.txt (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04-expected.txt 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: Blocked script execution in 'data:text/html,<script>alert('FAIL: Executed script without allow-scripts in data URL');window.parent.postMessage({'fail': true}, '*');</script>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
+Verify that sandboxed frames without sandbox='allow-scripts' cannot execute script from data: URLs.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS disallowedExecuted is 0
+PASS allowedExecuted is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04.html (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04.html (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04.html 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script>
+ window.jsTestIsAsync = true;
+
+ var allowedExecuted = 0;
+ var disallowedExecuted = 0;
+ window.addEventListener('message', function () {
+ disallowedExecuted++;
+
+ finish();
+ });
+
+ function finish() {
+ shouldBe("disallowedExecuted", "0");
+ shouldBe("allowedExecuted", "0");
+
+ finishJSTest();
+ };
+ </script>
+ <script src=""
+</head>
+<body>
+ <iframe sandbox="allow-same-origin"
+ _onload_="finish()"
+ src="" Executed script without allow-scripts in data URL');window.parent.postMessage({'fail': true}, '*');</script>">
+ </iframe>
+ <script>
+ description("Verify that sandboxed frames without sandbox='allow-scripts' cannot execute script from data: URLs.");
+ </script>
+</body>
+</html>
+
+
+
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-05-expected.txt (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-05-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-05-expected.txt 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,11 @@
+Verify that adding a sandbox attribute at runtime does not effect the iframe's current state.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS disallowedExecuted is 0
+PASS allowedExecuted is 2
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-05.html (0 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-05.html (rev 0)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-05.html 2013-03-16 16:43:39 UTC (rev 145993)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script>
+ var allowedExecuted = 0;
+ var disallowedExecuted = 0;
+ window._onload_ = function() {
+ shouldBe("disallowedExecuted", "0");
+ shouldBe("allowedExecuted", "2");
+
+ isSuccessfullyParsed();
+ };
+ </script>
+</head>
+<body>
+ <iframe id="frame" src=""
+ <script>
+ description("Verify that adding a sandbox attribute at runtime does not effect the iframe's current state.");
+ </script>
+</body>
+</html>
+
+
+
+
+
Deleted: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-expected.txt (145992 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-expected.txt 2013-03-16 16:41:34 UTC (rev 145992)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-expected.txt 2013-03-16 16:43:39 UTC (rev 145993)
@@ -1,14 +0,0 @@
-CONSOLE MESSAGE: Blocked script execution in 'about:blank' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
-ALERT: PASS: Executed script in data URL
-CONSOLE MESSAGE: Blocked script execution in 'data:text/html,<script> alert('FAIL: Executed script without allow-scripts in data URL'); </script>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
-Verify that sandboxed frames with sandbox="allow-scripts" can execute scripts, but other sandboxed frames cannot. Also verify that adding a sandbox attribute at runtime does not effect the current state of the iframe.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS disallowedExecuted is 0
-PASS allowedExecuted is 3
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting.html (145992 => 145993)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting.html 2013-03-16 16:41:34 UTC (rev 145992)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting.html 2013-03-16 16:43:39 UTC (rev 145993)
@@ -1,45 +0,0 @@
-<html>
-<head>
-<script src=""
-<script>
-if (window.testRunner)
- window.testRunner.dumpAsText();
-
-var disallowedExecuted = 0;
-var allowedExecuted = 0;
-
-window._onload_ = function()
-{
- shouldBe("disallowedExecuted", "0");
- shouldBe("allowedExecuted", "3");
-
- isSuccessfullyParsed();
-}
-</script>
-</head>
-
-<body>
-
- <iframe sandbox="allow-same-origin allow-scripts"
- src="" ++window.top.allowedExecuted;">
- </iframe>
- <iframe sandbox="allow-same-origin allow-scripts"
- src="" alert('PASS: Executed script in data URL'); </script>">
- </iframe>
- <iframe sandbox="allow-same-origin"
- src="" ++window.top.disallowedExecuted;">
- </iframe>
- <iframe sandbox="allow-same-origin"
- src="" alert('FAIL: Executed script without allow-scripts in data URL'); </script>">
- </iframe>
-
- <iframe id="frame" src=""
- </iframe>
-
- <script>
- description("Verify that sandboxed frames with sandbox="allow-scripts" can execute scripts, "
- + "but other sandboxed frames cannot. Also verify that adding a sandbox attribute at runtime "
- + "does not effect the current state of the iframe.");
- </script>
-</body>
-</html>
Modified: trunk/LayoutTests/platform/mac/TestExpectations (145992 => 145993)
--- trunk/LayoutTests/platform/mac/TestExpectations 2013-03-16 16:41:34 UTC (rev 145992)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2013-03-16 16:43:39 UTC (rev 145993)
@@ -1350,8 +1350,6 @@
webkit.org/b/104962 platform/mac/fast/loader/file-url-mimetypes-2.html [ Failure ]
-webkit.org/b/112482 fast/frames/sandboxed-iframe-scripting.html [ Failure Pass ]
-
webkit.org/b/105601 svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm [ Crash Pass ]
webkit.org/b/105603 http/tests/cookies/single-quoted-value.html [ Failure Pass ]