Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html

Issue 2370843003: Suborigin LayoutTest formatting and refactoring (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html
index 55d0a402aa676504e0156bceaae124fac205c30b..4ad57b3f80020187c04c04d213788de8b228152d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
+<meta charset="utf-8">
<title>Allow suborigin in HTTP header</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@@ -8,40 +9,42 @@
<body>
<script>
var tests;
-var nextTest = function() {
- var test = tests.shift();
- if (test)
- test();
+function next_test() {
+ var test = tests.shift();
+ if (test)
+ test();
}
-tests = [
- function() {
- async_test(function(t) {
- window.onmessage = t.step_func(function(event) {
- assert_equals(event.data, 'I am a secret');
- t.done();
- nextTest();
- });
- var iframe = document.createElement('iframe');
- iframe.src = "resources/iframe-reaches-into-parent.php?suborigin=foobar&childsuborigin=foobar";
- document.body.appendChild(iframe);
- }, 'iframe reaches into parent')
- },
- function() {
- async_test(function(t) {
- window.onmessage = t.step_func(function(event) {
- assert_equals(event.data, 'I am a secret');
- t.done();
- nextTest();
- });
- var iframe = document.createElement('iframe');
- iframe.src = "resources/reach-into-iframe.php?suborigin=foobar&childsuborigin=foobar";
- document.body.appendChild(iframe);
- }, 'Parent reaches into iframe')
- }
+var tests = [
+ function() {
+ async_test(function(t) {
+ window.onmessage = t.step_func(function(event) {
+ assert_equals(event.data, 'I am a secret');
+ t.done();
+ next_test();
+ });
+ var iframe = document.createElement('iframe');
+ iframe.src = 'resources/iframe-reaches-into-parent.php?' +
+ 'suborigin=foobar&childsuborigin=foobar';
+ document.body.appendChild(iframe);
+ }, 'iframe reaches into parent')
+ },
+ function() {
+ async_test(function(t) {
+ window.onmessage = t.step_func(function(event) {
+ assert_equals(event.data, 'I am a secret');
+ t.done();
+ next_test();
+ });
+ var iframe = document.createElement('iframe');
+ iframe.src = 'resources/reach-into-iframe.php?' +
+ 'suborigin=foobar&childsuborigin=foobar';
+ document.body.appendChild(iframe);
+ }, 'Parent reaches into iframe')
+ }
];
-nextTest();
+next_test();
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698