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

Side by Side Diff: LayoutTests/media/restore-from-page-cache.html

Issue 14195011: Removed WONTFIX tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src=media-file.js></script>
4 <script src=video-test.js></script>
5 <script>
6 var mediaFile = findMediaFile("video", "content/test");
7 var loadCount = 0;
8
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.waitUntilDone();
12 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey" , 1);
13 }
14
15 function pageshow(evt)
16 {
17 if (!evt.persisted) {
18 // this is the first time the page has been loaded, setup th e video element
19 setup();
20 } else {
21 consoleWrite("*** Page returned from cache");
22
23 testExpected("loadCount", 1);
24
25 // schedule the test to end shortly, but wait long enough fo r the element to fire loading events
26 // if that is going to happen
27 setTimeout(function() { if (window.testRunner) testRunner.no tifyDone(); }, 200);
28 }
29 }
30
31 function canplaythrough()
32 {
33 testExpected("loadCount", 0);
34 if (!loadCount) {
35 consoleWrite("*** Page going into cache");
36 setTimeout('window.location = "data:text/html,<script>histor y.back()<" + "/script>"', 0);
37 }
38 ++loadCount;
39 }
40
41 function setup()
42 {
43 video = mediaElement = document.getElementsByTagName('video')[0] ;
44
45 waitForEvent('loadstart');
46 waitForEvent('canplaythrough', canplaythrough);
47
48 video.src = mediaFile;
49 }
50
51 window.onpageshow = pageshow;
52 </script>
53 </head>
54 <body>
55
56 <video controls > </video>
57 <p>Make sure we don't reload a &lt;video&gt; element when navigating bac k to an uncached page.</p>
58 </body>
59 </html>
60
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698