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

Side by Side Diff: LayoutTests/fast/storage/storage-disallowed-in-data-url.html

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 </head> 4 </head>
5 <body> 5 <body>
6 <script src="../../resources/js-test.js"></script> 6 <script src="../../resources/js-test.js"></script>
7 <script> 7 <script>
8 description("This tests that storage methods throw exceptions with reaso nable messages inside 'data:' URLs."); 8 description("This tests that storage methods throw exceptions with reaso nable messages inside 'data:' URLs.");
9 9
10 var errorsSeen = 0; 10 var errorsSeen = 0;
11 11
12 window.jsTestIsAsync = true; 12 window.jsTestIsAsync = true;
13 13
14 window.addEventListener('message', function (e) { 14 window.addEventListener('message', function (e) {
15 errorsSeen++; 15 errorsSeen++;
16 window.exceptionMessage = e.data; 16 window.exceptionMessage = e.data;
17 if (errorsSeen == 1) { 17 if (errorsSeen == 1) {
18 shouldBeEqualToString('exceptionMessage', "Access to 'localStora ge' is denied for this document. Storage is disabled inside 'data:' URLs."); 18 shouldBeEqualToString('exceptionMessage', "Failed to read the 'l ocalStorage' property from 'Window': Storage is disabled inside 'data:' URLs.");
19 } else { 19 } else {
20 shouldBeEqualToString('exceptionMessage', "Access to 'sessionSto rage' is denied for this document. Storage is disabled inside 'data:' URLs."); 20 shouldBeEqualToString('exceptionMessage', "Failed to read the 's essionStorage' property from 'Window': Storage is disabled inside 'data:' URLs." );
21 finishJSTest(); 21 finishJSTest();
22 } 22 }
23 }); 23 });
24 24
25 </script> 25 </script>
26 <iframe src="data:text/html,<script>try { window.localStorage; } catch(e) { window.top.postMessage(e.message, '*'); }; try { window.sessionStorage; } catch( e) { window.top.postMessage(e.message, '*'); }</script>"></iframe> 26 <iframe src="data:text/html,<script>try { window.localStorage; } catch(e) { window.top.postMessage(e.message, '*'); }; try { window.sessionStorage; } catch( e) { window.top.postMessage(e.message, '*'); }</script>"></iframe>
27 </body> 27 </body>
28 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698