Title: [136963] trunk/LayoutTests
- Revision
- 136963
- Author
- mk...@chromium.org
- Date
- 2012-12-07 10:49:47 -0800 (Fri, 07 Dec 2012)
Log Message
fast/frames/sandboxed-iframe-scripting.html contains very misleading comments.
https://bugs.webkit.org/show_bug.cgi?id=104363
Reviewed by Darin Adler.
The comments in this test describe a state that is in fact the opposite
of what's being tested. That confused me. This patch corrects the
comments to make it clear that adding a sandbox attribute at runtime has
no effect on the frame; the sandboxing flags are set when the nested
browsing context is _navigated_, not when the attribute changes value.
Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox
* fast/frames/resources/sandboxed-iframe-script-dynamic.html:
* fast/frames/sandboxed-iframe-scripting-expected.txt:
* fast/frames/sandboxed-iframe-scripting.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (136962 => 136963)
--- trunk/LayoutTests/ChangeLog 2012-12-07 18:26:02 UTC (rev 136962)
+++ trunk/LayoutTests/ChangeLog 2012-12-07 18:49:47 UTC (rev 136963)
@@ -1,3 +1,22 @@
+2012-12-07 Mike West <mk...@chromium.org>
+
+ fast/frames/sandboxed-iframe-scripting.html contains very misleading comments.
+ https://bugs.webkit.org/show_bug.cgi?id=104363
+
+ Reviewed by Darin Adler.
+
+ The comments in this test describe a state that is in fact the opposite
+ of what's being tested. That confused me. This patch corrects the
+ comments to make it clear that adding a sandbox attribute at runtime has
+ no effect on the frame; the sandboxing flags are set when the nested
+ browsing context is _navigated_, not when the attribute changes value.
+
+ Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox
+
+ * fast/frames/resources/sandboxed-iframe-script-dynamic.html:
+ * fast/frames/sandboxed-iframe-scripting-expected.txt:
+ * fast/frames/sandboxed-iframe-scripting.html:
+
2012-12-07 Antoine Quint <grao...@apple.com>
Provide the backend for exposing the layer tree to the Web Inspector
Modified: trunk/LayoutTests/fast/frames/resources/sandboxed-iframe-script-dynamic.html (136962 => 136963)
--- trunk/LayoutTests/fast/frames/resources/sandboxed-iframe-script-dynamic.html 2012-12-07 18:26:02 UTC (rev 136962)
+++ trunk/LayoutTests/fast/frames/resources/sandboxed-iframe-script-dynamic.html 2012-12-07 18:49:47 UTC (rev 136963)
@@ -4,15 +4,15 @@
frame = window.top.document.getElementById('frame');
- // setting the sandbox flag at runtime should not change whether scripts
+ // Setting the sandbox flag at runtime should not change whether scripts
// are allowed in this document.
frame.sandbox = 'allow-same-origin'; // NO allow-scripts
++window.top.allowedExecuted;
- // however, new scripts (such as the onload one below) should
- // not run
+ // This means that new scripts (such as the onload handler below) should
+ // continue to execute, even though the frame now has a sandbox attribute.
function onload_hook()
{
Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-expected.txt (136962 => 136963)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-expected.txt 2012-12-07 18:26:02 UTC (rev 136962)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-expected.txt 2012-12-07 18:49:47 UTC (rev 136963)
@@ -1,5 +1,5 @@
ALERT: PASS: Executed script in data URL
-Verify that sandboxed frames with sandbox="allow-scripts" can execute scripts, but other sandboxed frames cannot. Also verify that removing the sandbox="allow-scripts" attribute at runtime prevents new scripts from launching, but existing ones keep running.
+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".
Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting.html (136962 => 136963)
--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting.html 2012-12-07 18:26:02 UTC (rev 136962)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting.html 2012-12-07 18:49:47 UTC (rev 136963)
@@ -38,9 +38,8 @@
<script>
description("Verify that sandboxed frames with sandbox="allow-scripts" can execute scripts, "
- + "but other sandboxed frames cannot. Also verify that removing the "
- + "sandbox="allow-scripts" attribute at runtime prevents new scripts from launching, "
- + "but existing ones keep running.");
+ + "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>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes