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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html

Issue 2741513002: [Merge M-57] Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 <script> 1 <script>
2 if (window.testRunner) { 2 if (window.testRunner) {
3 testRunner.dumpAsText(); 3 testRunner.dumpAsText();
4 testRunner.waitUntilDone(); 4 testRunner.waitUntilDone();
5 } 5 }
6 window.onload = function() {
7 window.location = 'data:text/html,' +
8 '%3Cscript%3E' +
9 'try{' +
10 'history.pushState({},"","data:");' +
11 'document.write("FAIL data URL was manipula via pushState.");' +
12 '} catch(e) {' +
13 'document.write("PASS: data URLs cannot be manipulated via pushState."); ' +
14 '}' +
15 'if (window.testRunner)' +
16 'testRunner.notifyDone();' +
17 '%3C/script%3E';
18 }
19 </script> 6 </script>
7 <iframe src="data:text/html,
8 <script>
9 try{
10 history.pushState({}, '', 'data:');
11 alert('FAIL data URL was manipulated via pushState.');
12 } catch(e) {
13 alert('PASS: data URLs cannot be manipulated via pushState.');
14 }
15 if (window.testRunner)
16 testRunner.notifyDone();
17 </script>"></iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698