Diff
Modified: trunk/LayoutTests/ChangeLog (117582 => 117583)
--- trunk/LayoutTests/ChangeLog 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/ChangeLog 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1,3 +1,32 @@
+2012-05-18 Mike West <[email protected]>
+
+ Deflaking http/tests/security/contentSecurityPolicy/script-src-redirect.html
+ https://bugs.webkit.org/show_bug.cgi?id=86433
+
+ Reviewed by Adam Barth.
+
+ As it turns out, this was a straightforward typo on my part. Loading
+ the wrong JS file is a surefire way to break tests. I've rewritten the
+ test function to make it more difficult to make such a mistake in the
+ future, and pushed that change to source-list-parsing-* tests that use
+ the same methodology.
+
+ * http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/resources/source-list-parsing-base.js.
+ (test):
+ (finishTesting):
+ * http/tests/security/contentSecurityPolicy/script-src-redirect-expected.txt:
+ * http/tests/security/contentSecurityPolicy/script-src-redirect.html:
+ * http/tests/security/contentSecurityPolicy/source-list-parsing-01.html:
+ * http/tests/security/contentSecurityPolicy/source-list-parsing-02.html:
+ * http/tests/security/contentSecurityPolicy/source-list-parsing-03.html:
+ * http/tests/security/contentSecurityPolicy/source-list-parsing-04.html:
+ * platform/chromium/test_expectations.txt: Unskipping.
+ * platform/mac-lion/Skipped: Unskipping.
+ * platform/gtk/test_expectations.txt: Unskipping.
+ * platform/efl/test_expectations.txt: Unskipping.
+ * platform/qt/Skipped: Unskipping.
+ * platform/mac/Skipped: Unskipping.
+
2012-05-18 Yury Semikhatsky <[email protected]>
Web Inspector: remove unnecessary indirection from profile types
Copied: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js (from rev 117582, trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/source-list-parsing-base.js) (0 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js (rev 0)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js 2012-05-18 13:46:47 UTC (rev 117583)
@@ -0,0 +1,27 @@
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpChildFramesAsText();
+}
+
+function test() {
+ if (tests.length === 0)
+ return finishTesting();
+
+ var baseURL = "http://127.0.0.1:8000/security/contentSecurityPolicy/";
+ var current = tests.shift();
+ var iframe = document.createElement("iframe");
+ iframe.src = "" + "resources/echo-script-src.pl?" +
+ "should_run=" + escape(current[0]) +
+ "&csp=" + escape(current[1]) +
+ "&q=" + baseURL + escape(current[2]);
+ iframe._onload_ = test;
+ document.body.appendChild(iframe);
+}
+
+function finishTesting() {
+ if (window.layoutTestController) {
+ setTimeout("layoutTestController.notifyDone()", 0);
+ }
+ return true;
+}
Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/source-list-parsing-base.js (117582 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/source-list-parsing-base.js 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/source-list-parsing-base.js 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1,27 +0,0 @@
-if (window.layoutTestController) {
- layoutTestController.waitUntilDone();
- layoutTestController.dumpAsText();
- layoutTestController.dumpChildFramesAsText();
-}
-
-function test() {
- if (tests.length === 0)
- return finishTesting();
-
- var defaultScript = 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/script.js'
- var current = tests.shift();
- var iframe = document.createElement('iframe');
- iframe.src = "" +
- "should_run=" + escape(current[0]) +
- "&csp=" + escape(current[1]) +
- "&q=" + escape(current[2] ? current[2] : defaultScript);
- iframe._onload_ = test;
- document.body.appendChild(iframe);
-}
-
-function finishTesting() {
- if (window.layoutTestController) {
- setTimeout("layoutTestController.notifyDone()", 0);
- }
- return true;
-}
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-redirect-expected.txt (117582 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-redirect-expected.txt 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-redirect-expected.txt 2012-05-18 13:46:47 UTC (rev 117583)
@@ -4,8 +4,8 @@
Loads an iframe which in turns tries to load an external script. The request for the script is redirected to 'localhost'. The iframe has a content security policy disabling external scripts from hosts other than 'localhost'. So the script should be allowed to run.
-
+
--------
Frame: '<!--framePath //<!--frame0-->-->'
--------
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-redirect.html (117582 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-redirect.html 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-redirect.html 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1,17 +1,15 @@
<!DOCTYPE html>
<html>
<head>
-<script src=""
+<script src=""
<script>
var tests = [
- ['no', 'script-src localhost', 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/echo-script-src.pl?should_run=no&csp=%20script-src%20localhost&q=http://127.0.0.1:8000/security/contentSecurityPolicy/resources/redir.php%3furl=http://localhost:8000/security/contentSecurityPolicy/resources/script.js'],
- ['no', 'script-src 127.0.0.1', 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/echo-script-src.pl?should_run=no&csp=%20script-src%20localhost&q=http://127.0.0.1:8000/security/contentSecurityPolicy/resources/redir.php%3furl=http://localhost:8000/security/contentSecurityPolicy/resources/script.js']
+ ['no', 'script-src localhost', 'resources/redir.php?url=""
+ ['no', 'script-src 127.0.0.1', 'resources/redir.php?url=""
];
</script>
</head>
<body _onload_='test()'>
- <p>
- Loads an iframe which in turns tries to load an external script. The request for the script is redirected to 'localhost'. The iframe has a content security policy disabling external scripts from hosts other than 'localhost'. So the script should be allowed to run.
- </p>
+ <p>Loads an iframe which in turns tries to load an external script. The request for the script is redirected to 'localhost'. The iframe has a content security policy disabling external scripts from hosts other than 'localhost'. So the script should be allowed to run.</p>
</body>
</html>
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-01.html (117582 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-01.html 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-01.html 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html>
<head>
-<script src=''></script>
+<script src=''></script>
<script>
var tests = [
- ['yes', 'script-src 127.0.0.1:8000'],
- ['yes', 'script-src http://127.0.0.1:8000'],
- ['no', 'script-src https://127.0.0.1:8000'],
- ['no', 'script-src https://127.0.0.1:*'],
- ['no', 'script-src https://127.0.0.1:* ']
+ ['yes', 'script-src 127.0.0.1:8000', 'resources/script.js'],
+ ['yes', 'script-src http://127.0.0.1:8000', 'resources/script.js'],
+ ['no', 'script-src https://127.0.0.1:8000', 'resources/script.js'],
+ ['no', 'script-src https://127.0.0.1:*', 'resources/script.js'],
+ ['no', 'script-src https://127.0.0.1:* ', 'resources/script.js']
];
</script>
</head>
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-02.html (117582 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-02.html 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-02.html 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html>
<head>
-<script src=''></script>
+<script src=''></script>
<script>
var tests = [
- ['no', 'script-src https://127.?.0.1:*'],
- ['yes', 'script-src https://127.0.0.1:\t* '],
- ['yes', 'script-src\thttp://127.0.0.1:8000'],
- ['yes', 'script-src http://127.0.0.1:8000 \t '],
- ['yes', 'script-src http://127.0.0.1:* ']
+ ['no', 'script-src https://127.?.0.1:*', 'resources/script.js'],
+ ['yes', 'script-src https://127.0.0.1:\t* ', 'resources/script.js'],
+ ['yes', 'script-src\thttp://127.0.0.1:8000', 'resources/script.js'],
+ ['yes', 'script-src http://127.0.0.1:8000 \t ', 'resources/script.js'],
+ ['yes', 'script-src http://127.0.0.1:* ', 'resources/script.js']
];
</script>
</head>
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-03.html (117582 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-03.html 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-03.html 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<head>
-<script src=''></script>
+<script src=''></script>
<script>
var tests = [
- ['yes', 'script-src http:'],
- ['no', 'script-src https:'],
- ['no', 'script-src https: '],
- ['no', 'script-src https://']
+ ['yes', 'script-src http:', 'resources/script.js'],
+ ['no', 'script-src https:', 'resources/script.js'],
+ ['no', 'script-src https: ', 'resources/script.js'],
+ ['no', 'script-src https://', 'resources/script.js']
];
</script>
</head>
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-04.html (117582 => 117583)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-04.html 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-04.html 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<head>
-<script src=''></script>
+<script src=''></script>
<script>
var tests = [
- ['no', 'script-src https: taco'],
- ['yes', 'script-src https: \x08'],
- ['no', 'script-src \'none\''],
- ['yes', '\t\t\tscript-src http://127.0.0.1:8000 \t\t https:']
+ ['no', 'script-src https: taco', 'resources/script.js'],
+ ['yes', 'script-src https: \x08', 'resources/script.js'],
+ ['no', 'script-src \'none\'', 'resources/script.js'],
+ ['yes', '\t\t\tscript-src http://127.0.0.1:8000 \t\t https:', 'resources/script.js']
];
</script>
</head>
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (117582 => 117583)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-18 13:46:47 UTC (rev 117583)
@@ -3721,7 +3721,6 @@
BUGWK81416 : fast/dom/wrapper-scope.html = TEXT
-BUGWK86433 : http/tests/security/contentSecurityPolicy/script-src-redirect.html = TEXT PASS
BUGWK86439 LINUX DEBUG : inspector/extensions/extensions-events.html = TIMEOUT PASS
BUGWK86439 LINUX DEBUG : inspector/extensions/extensions-sidebar.html = TIMEOUT PASS
Modified: trunk/LayoutTests/platform/efl/test_expectations.txt (117582 => 117583)
--- trunk/LayoutTests/platform/efl/test_expectations.txt 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/platform/efl/test_expectations.txt 2012-05-18 13:46:47 UTC (rev 117583)
@@ -446,9 +446,6 @@
// Doesn't apply to platforms that don't enforce the CFNetwork-style 3rd party cookie policy
BUGWK35824 SKIP : http/tests/cookies/third-party-cookie-relaxing.html = FAIL
-// Test is flaky on other platforms.
-BUGWK86433 : http/tests/security/contentSecurityPolicy/script-src-redirect.html = TEXT
-
// Rebaseline required after https://bugs.webkit.org/show_bug.cgi?id=84167
BUGWK84167 : editing/pasteboard/innerText-inline-table.html = IMAGE+TEXT
BUGWK84167 : editing/selection/iframe.html = IMAGE+TEXT
Modified: trunk/LayoutTests/platform/gtk/test_expectations.txt (117582 => 117583)
--- trunk/LayoutTests/platform/gtk/test_expectations.txt 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/platform/gtk/test_expectations.txt 2012-05-18 13:46:47 UTC (rev 117583)
@@ -1324,8 +1324,6 @@
BUGWK86445 : fast/multicol/split-in-top-margin.html = IMAGE
-BUGWK86433 : http/tests/security/contentSecurityPolicy/script-src-redirect.html = FAIL
-
BUGWK86284 : svg/text/add-tspan-position-bug.html = IMAGE
BUGWK86284 : svg/text/modify-tspan-position-bug.html = IMAGE
Modified: trunk/LayoutTests/platform/mac/Skipped (117582 => 117583)
--- trunk/LayoutTests/platform/mac/Skipped 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/platform/mac/Skipped 2012-05-18 13:46:47 UTC (rev 117583)
@@ -849,9 +849,6 @@
plugins/npruntime/delete-plugin-within-hasProperty-return-true.html
plugins/npruntime/delete-plugin-within-hasProperty-return-false.html
-# https://bugs.webkit.org/show_bug.cgi?id=86643
-http/tests/security/contentSecurityPolicy/script-src-redirect.html
-
# https://bugs.webkit.org/show_bug.cgi?id=86786
mathml/presentation/mo-stretch.html
mathml/presentation/mroot-pref-width.html
Modified: trunk/LayoutTests/platform/mac-lion/Skipped (117582 => 117583)
--- trunk/LayoutTests/platform/mac-lion/Skipped 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/platform/mac-lion/Skipped 2012-05-18 13:46:47 UTC (rev 117583)
@@ -136,9 +136,6 @@
# https://bugs.webkit.org/show_bug.cgi?id=86527 and <rdar://problem/11458493>
http/tests/media/video-query-url.html
-# https://bugs.webkit.org/show_bug.cgi?id=86643
-http/tests/security/contentSecurityPolicy/script-src-redirect.html
-
# https://bugs.webkit.org/show_bug.cgi?id=86785
fast/repaint/float-overflow-right.html
fast/repaint/float-overflow.html
Modified: trunk/LayoutTests/platform/qt/Skipped (117582 => 117583)
--- trunk/LayoutTests/platform/qt/Skipped 2012-05-18 13:43:18 UTC (rev 117582)
+++ trunk/LayoutTests/platform/qt/Skipped 2012-05-18 13:46:47 UTC (rev 117583)
@@ -2476,7 +2476,3 @@
# [Qt][GTK] New fast/multicol/split-in-top-margin.html fails
# https://bugs.webkit.org/show_bug.cgi?id=86445
fast/multicol/split-in-top-margin.html
-
-# Modified test fails on Qt after r117123
-# https://bugs.webkit.org/show_bug.cgi?id=86433
-http/tests/security/contentSecurityPolicy/script-src-redirect.html