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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/files/null-origin-string.html

Issue 2694903007: Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Fix layout tests that do top-level navigations to data: URLs 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script> /* This script will be executed in a subframe. */ 4 <script> /* This script will be executed in a subframe. */
5 function runTest() 5 function runTest()
6 { 6 {
7 eventSender.beginDragWithFiles(['resources/UTF8.txt']); 7 eventSender.beginDragWithFiles(['resources/UTF8.txt']);
8 eventSender.mouseMoveTo(20, 20); 8 eventSender.mouseMoveTo(20, 20);
9 eventSender.mouseUp(); 9 eventSender.mouseUp();
10 } 10 }
11 11
12 function onInputFileChange() 12 function onInputFileChange()
13 { 13 {
14 var file = document.getElementById('file').files[0]; 14 var file = document.getElementById('file').files[0];
15 var reader = new FileReader(); 15 var reader = new FileReader();
16 reader.readAsText(file); 16 reader.readAsText(file);
17 console.log('Started reading...'); 17 console.log('Started reading...');
18 18 console.log('PASS if no crash.');
Charlie Reis 2017/02/23 18:39:11 This isn't an equivalent test. Not sure if it mat
meacer 2017/02/23 20:47:25 Done. This was a bit frustrating as I can't seem t
19 top.location = 'data:text/html,<p>PASS if no crash.</p><script>testRunner.no tifyDone()</scr' + 'ipt>'; 19 testRunner.notifyDone();
20 } 20 }
21 </script> 21 </script>
22 22
23 <script> 23 <script>
24 if (window.eventSender) { 24 if (window.eventSender) {
25 testRunner.dumpAsText(); 25 testRunner.dumpAsText();
26 testRunner.waitUntilDone(); 26 testRunner.waitUntilDone();
27 } 27 }
28 document.write('<iframe src="data:text/html,<input type=file id=file onchange=\' onInputFileChange()\'><script>' + document.getElementsByTagName("script")[0].inn erText + 'runTest()</scr' + 'ipt>" style="left:0px;top:0px"></iframe>'); 28 document.write('<iframe src="data:text/html,<input type=file id=file onchange=\' onInputFileChange()\'><script>' + document.getElementsByTagName("script")[0].inn erText + 'runTest()</scr' + 'ipt>" style="left:0px;top:0px"></iframe>');
29 </script> 29 </script>
30 30
31 <p>Test that using FileReader from a document with unique origin doesn't cause a crash.</p> 31 <p>Test that using FileReader from a document with unique origin doesn't cause a crash.</p>
32 <p>If testing manually, please drop a file on an input above.</p> 32 <p>If testing manually, please drop a file on an input above.</p>
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698