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

Side by Side Diff: LayoutTests/http/tests/navigation/resources/back-send-referrer-helper.php

Issue 615033002: Refactor of various layout tests to use RAF (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix use-detatch.svg Created 6 years, 2 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 <?php 1 <?php
2 // Prevent from being cached. 2 // Prevent from being cached.
3 header("Cache-Control: no-cache, private, max-age=0"); 3 header("Cache-Control: no-cache, private, max-age=0");
4 header("Content-Type: text/html"); 4 header("Content-Type: text/html");
5 ?> 5 ?>
6 6
7 <html> 7 <html>
8 8
9 <script> 9 <script>
10 window.name = parseInt(window.name) + 1; 10 window.name = parseInt(window.name) + 1;
11 </script> 11 </script>
12 12
13 Referrer: <?php echo $_SERVER['HTTP_REFERER']; ?> 13 Referrer: <?php echo $_SERVER['HTTP_REFERER']; ?>
14 <br/> 14 <br/>
15 window.name: <script>document.write(window.name)</script> 15 window.name: <script>document.write(window.name)</script>
16 16
17 <form name=loopback action="" method=GET></form> 17 <form name=loopback action="" method=GET></form>
18 18
19 <script> 19 <script>
20 if (window.name == 1) { 20 if (window.name == 1) {
21 // Navigate once more (in a timeout) to add a history entry. 21 // Navigate once more (in a RAF) to add a history entry.
22 setTimeout(function() {document.loopback.submit();}, 0); 22 requestAnimationFrame(function() {document.loopback.submit();});
23 } else if (window.name == 2) { 23 } else if (window.name == 2) {
24 history.go(-1); 24 history.go(-1);
25 } else { 25 } else {
26 if (window.testRunner) 26 if (window.testRunner)
27 window.testRunner.notifyDone(); 27 window.testRunner.notifyDone();
28 } 28 }
29 </script> 29 </script>
30 30
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698