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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-options.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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-names.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-options.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-options.html b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-options.html
index 0aace7a147712528fc1f8c61700ba0980414584e..6703750ac3429426bac2f2cf403247dfbc57b95c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-options.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-options.html
@@ -1,33 +1,42 @@
<!DOCTYPE html>
<html>
<head>
+<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
var test_suborigin_options = [
- [ "foobar 'unsafe-postmessage-send'", "Single option" ],
- [ "foobar 'unsafe-postmessage-receive' 'unsafe-postmessage-send'", "Two options" ],
- [ "foobar 'unsafe-cookies' 'unsafe-postmessage-receive' 'unsafe-postmessage-send'", "All options" ],
- [ "foobar 'unknown'", "Unknown option" ],
- [ "foobar 'unknown' 'unsafe-cookies'", "Unknown option with valid options" ],
+ [ 'foobar \'unsafe-postmessage-send\'', 'Single option' ],
+ [ 'foobar \'unsafe-postmessage-receive\' \'unsafe-postmessage-send\'',
+ 'Two options' ],
+ [ 'foobar \'unsafe-cookies\' \'unsafe-postmessage-receive\' ' +
+ '\'unsafe-postmessage-send\'',
+ 'All options' ],
+ [ 'foobar \'unknown\'', 'Unknown option' ],
+ [ 'foobar \'unknown\' \'unsafe-cookies\'',
+ 'Unknown option with valid options' ],
];
for (option in test_suborigin_options) {
- async_test(t => {
- var id = option;
- var iframe;
- window.addEventListener('message', t.step_func(event => {
+ async_test(t => {
+ var id = option;
+ var iframe;
+ window.addEventListener('message', t.step_func(event => {
if (event.source != iframe.contentWindow)
- return;
+ return;
- assert_equals(event.data, "SecurityError: Blocked a frame with origin \"http://127.0.0.1:8000\" from accessing a cross-origin frame.");
+ assert_equals(event.data,
+ 'SecurityError: Blocked a frame with origin ' +
+ '"http://127.0.0.1:8000" from accessing a cross-origin frame.');
t.done();
- }));
- iframe = document.createElement('iframe');
- iframe.setAttribute('src', "resources/reach-into-iframe.php?childsuborigin=" + test_suborigin_options[id][0]);
- document.body.appendChild(iframe);
+ }));
+ iframe = document.createElement('iframe');
+ iframe.setAttribute('src',
+ 'resources/reach-into-iframe.php?childsuborigin=' +
+ test_suborigin_options[id][0]);
+ document.body.appendChild(iframe);
}, test_suborigin_options[option][1]);
}
</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-names.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698