| Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-storage-dom-access.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-storage-dom-access.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-storage-dom-access.php
|
| index a373506f177da67e3eb3bf1b646f2d7462838c3b..b0e90f6ff81f6b3aa4d73983dab5411af091aa4d 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-storage-dom-access.php
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-storage-dom-access.php
|
| @@ -4,25 +4,28 @@ header("Suborigin: foobar");
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| +<meta charset="utf-8">
|
| <title>Verifies that localStorage and sessionStorage are not accessible from within a suborigin</title>
|
| <script src="/resources/testharness.js"></script>
|
| <script src="/resources/testharnessreport.js"></script>
|
| </head>
|
| <body>
|
| <script>
|
| -var expectedError = new DOMException("TEST EXCEPTION", "SecurityError");
|
| -var localStorageTest = async_test("localStorage must not be accessible from a suborigin");
|
| -var sessionStorageTest = async_test("sessionStorage must not be accessible from a suborigin");
|
| +var expected_error = new DOMException('TEST EXCEPTION', 'SecurityError');
|
|
|
| -function mustThrowSecurityException() {
|
| - assert_throws(expectedError, function() {
|
| - window.localStorage;
|
| - });
|
| - this.done();
|
| +function must_throw_security_exception(storage) {
|
| + return function(t) {
|
| + assert_throws(expected_error, function() {
|
| + window[storage];
|
| + });
|
| + t.done();
|
| + };
|
| }
|
|
|
| -localStorageTest.step(mustThrowSecurityException);
|
| -sessionStorageTest.step(mustThrowSecurityException);
|
| +async_test(must_throw_security_exception('localStorage'),
|
| + 'localStorage must not be accessible from a suborigin');
|
| +async_test(must_throw_security_exception('sessionStorage'),
|
| + 'sessionStorage must not be accessible from a suborigin');
|
| </script>
|
| </body>
|
| </html>
|
|
|