| Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-postmessage.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-postmessage.html b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-postmessage.html
|
| index d44071a5c5df5b26fc08f46bec9e0051626955e2..d036e60c51d4f670c3d5b8ea1649b0c545d38668 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-postmessage.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-postmessage.html
|
| @@ -1,34 +1,38 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| +<meta charset="utf-8">
|
| <title>Validate serialization of event.origin and event.suborigin in postMessage.</title>
|
| <script src="/resources/testharness.js"></script>
|
| <script src="/resources/testharnessreport.js"></script>
|
| </head>
|
| <script>
|
| -var iframe_test = async_test("Validate serialization of event.origin and event.suborigin in postMessage from an iframe");
|
| -var window_test = async_test("Validate serialization of event.origin and event.suborigin in postMessage from a window");
|
| +var iframe_test = async_test(
|
| + 'Validate serialization of event.origin and event.suborigin in ' +
|
| + 'postMessage from an iframe');
|
| +var window_test = async_test(
|
| + 'Validate serialization of event.origin and event.suborigin in ' +
|
| + 'postMessage from a window');
|
|
|
| window.onmessage = function(event) {
|
| if (event.data.type === 'iframe') {
|
| - iframe_test.step(function() {
|
| - assert_equals(event.origin, "http-so://foobar1.127.0.0.1:8000");
|
| - assert_equals(event.suborigin, "foobar1");
|
| - assert_equals(event.data.suborigin, "foobar1");
|
| - iframe_test.done();
|
| + iframe_test.step(function() {
|
| + assert_equals(event.origin, 'http-so://foobar1.127.0.0.1:8000');
|
| + assert_equals(event.suborigin, 'foobar1');
|
| + assert_equals(event.data.suborigin, 'foobar1');
|
| + iframe_test.done();
|
| });
|
| } else if (event.data.type === 'window') {
|
| - window_test.step(function() {
|
| - assert_equals(event.origin, "http-so://foobar2.127.0.0.1:8000");
|
| - assert_equals(event.suborigin, "foobar2");
|
| - assert_equals(event.data.suborigin, "foobar2");;
|
| - window_test.done();
|
| + window_test.step(function() {
|
| + assert_equals(event.origin, 'http-so://foobar2.127.0.0.1:8000');
|
| + assert_equals(event.suborigin, 'foobar2');
|
| + assert_equals(event.data.suborigin, 'foobar2');;
|
| + window_test.done();
|
| });
|
| } else {
|
| - assert_unreached();
|
| + assert_unreached();
|
| }
|
| -
|
| -}
|
| + }
|
|
|
| window.open('resources/post-document-to-parent.php?suborigin=foobar2&type=window');
|
| </script>
|
|
|