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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-invalid-names.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-invalid-names.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-invalid-names.html b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-invalid-names.html
index da3c35cbe6ac1322ae089875463acd21f03ecff0..70c5a274fcd10707ac1b9925804fe870ded6eaf6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-invalid-names.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-invalid-names.html
@@ -1,48 +1,51 @@
<!DOCTYPE html>
<html>
<head>
- <title>Invalid suborigin names</title>
+<meta charset="utf-8">
+<title>Invalid suborigin names</title>
</head>
<script>
if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
}
function finish() {
- if (window.testRunner)
- testRunner.notifyDone();
+ if (window.testRunner)
+ testRunner.notifyDone();
}
var test_suborigin_names = [
- "",
- "'foobar'",
- "'foobar",
- "foobar'",
- "foo'bar",
- "foob@r",
- "foo bar",
- "Foobar",
- "FOOBAR",
- ];
+ '',
+ '\'foobar\'',
+ '\'foobar',
+ 'foobar\'',
+ 'foo\'bar',
+ 'foob@r',
+ 'foo bar',
+ 'Foobar',
+ 'FOOBAR',
+];
var iframe;
var i = 0;
function next() {
- if (i >= test_suborigin_names.length)
- finish();
- document.getElementById('iframe').src = "resources/reach-into-iframe.php?childsuborigin=" + test_suborigin_names[i];
- i++;
+ if (i >= test_suborigin_names.length)
+ finish();
+ document.getElementById('iframe').src = 'resources/reach-into-iframe.php?' +
+ 'childsuborigin=' +
+ test_suborigin_names[i];
+ i++;
}
window.onmessage = function(event) {
- alert(event.data);
- next();
+ alert(event.data);
+ next();
};
-window.onload = function() {;
- next();
+window.onload = function() {
+ next();
};
</script>
<iframe id="iframe"></iframe>

Powered by Google App Engine
This is Rietveld 408576698