tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / http / tests / inspector / appcache / appcache-iframe-manifests.html
1 <html>
2 <head>
3 <script src="../inspector-test.js"></script>
4 <script src="appcache-test.js"></script>
5 <script>
6 function test()
7 {
8     var frameId1;
9     var frameId2;
10     var frameId3;
11
12     WebInspector.showPanel("resources");
13     InspectorTest.dumpApplicationCache();
14     InspectorTest.createAndNavigateIFrame("resources/page-with-manifest.php?manifestId=1", step1);
15
16     function step1(frameId)
17     {
18         frameId1 = frameId;
19         InspectorTest.waitForFrameManifestURLAndStatus(frameId1, "manifest.php?manifestId=1", applicationCache.IDLE, step2);
20     }
21
22     function step2()
23     {
24         InspectorTest.dumpApplicationCache();
25         InspectorTest.navigateIFrame(frameId1, "resources/page-with-manifest.php?manifestId=2", step3);
26     }
27
28     function step3()
29     {
30         InspectorTest.waitForFrameManifestURLAndStatus(frameId1, "manifest.php?manifestId=2", applicationCache.IDLE, step4);
31     }
32
33     function step4()
34     {
35         InspectorTest.dumpApplicationCache();
36         InspectorTest.createAndNavigateIFrame("resources/page-with-manifest.php?manifestId=1", step5);
37     }
38
39     function step5(frameId)
40     {
41         frameId2 = frameId;
42         InspectorTest.waitForFrameManifestURLAndStatus(frameId2, "manifest.php?manifestId=1", applicationCache.IDLE, step6);
43     }
44
45     function step6()
46     {
47         InspectorTest.dumpApplicationCache();
48         InspectorTest.createAndNavigateIFrame("resources/page-with-manifest.php?manifestId=1", step7);
49     }
50
51     function step7(frameId)
52     {
53         frameId3 = frameId;
54         InspectorTest.waitForFrameManifestURLAndStatus(frameId3, "manifest.php?manifestId=1", applicationCache.IDLE, step8);
55     }
56
57     function step8()
58     {
59         InspectorTest.waitForFrameManifestURLAndStatus(frameId2, "manifest.php?manifestId=1", applicationCache.IDLE, step9);
60     }
61
62     function step9()
63     {
64         InspectorTest.dumpApplicationCache();
65         InspectorTest.removeIFrame(frameId3, step10);
66     }
67
68     function step10()
69     {
70         InspectorTest.waitForFrameManifestURLAndStatus(frameId3, "", applicationCache.UNCACHED, step11);
71     }
72
73     function step11()
74     {
75         InspectorTest.dumpApplicationCache();
76         InspectorTest.removeIFrame(frameId2, step12);
77     }
78
79     function step12()
80     {
81         InspectorTest.waitForFrameManifestURLAndStatus(frameId2, "", applicationCache.UNCACHED, step13);
82     }
83
84     function step13()
85     {
86         InspectorTest.dumpApplicationCache();
87         InspectorTest.removeIFrame(frameId1, step14);
88     }
89
90     function step14()
91     {
92         InspectorTest.waitForFrameManifestURLAndStatus(frameId1, "", applicationCache.UNCACHED, step15);
93     }
94
95     function step15()
96     {
97         InspectorTest.dumpApplicationCache();
98         InspectorTest.completeTest();
99     }
100 }
101 </script>
102 </head>
103 <body onload="runTest()">
104 <p>Tests that application cache model keeps track of manifest urls and statuses correctly.</p>
105 <a href="https://bugs.webkit.org/show_bug.cgi?id=64581">Bug 64581</a>
106 </body>
107 </html>