Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / pageshow-pagehide.html
blob3a2c04f9199af598fb6d5dad6e1b9b652807b3d3
1 <p>Test pageshow/pagehide event behavior in subframes.</p>
2 <iframe src="resources/pageshow-pagehide-subframe.html"></iframe>
3 <pre id="log"></pre>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
10 function log(message)
12 var log = document.getElementById("log");
13 log.innerHTML += message + "\n";
16 var state = 0;
18 log("***Original load - onload and pageshow events should fire for subframes, and then for main frame***");
20 window.onload = function(evt) {
21 log("Main frame window.onload");
24 window.addEventListener("pageshow", function(evt) {
25 log("Main frame window.onpageshow" + ", target = " + evt.target + ", persisted = " + evt.persisted);
27 log("***Navigating bottom-level subframe, onpagehide events should fire for subsubframe***");
28 frames[0].frames[0].location = "resources/pageshow-pagehide-subsubframe-2.html";
29 }, true);
31 window.onpagehide = function(evt) {
32 log("Main frame window.onpagehide" + ", target = " + evt.target + ", persisted = " + evt.persisted);
35 window.addEventListener("message", function(evt) {
36 if (evt.data == "subframe-loaded") {
37 if (state == 1) {
38 log("***Done***");
39 if (window.testRunner)
40 testRunner.notifyDone();
42 } else if (evt.data == "subsubframe-loaded") {
43 if (state == 0) {
44 log("***Navigating mid-level subframe, onpagehide events should fire for both subframes***");
45 frames[0].location = "resources/pageshow-pagehide-subframe-2.html";
46 state = 1;
49 }, true);
51 </script>