Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / misc / cached-scripts.html
blobec57b89f91067290b885885d3d620264ca3af99a
1 <html>
2 <script>
3 if (window.testRunner) {
4 testRunner.dumpAsText();
5 testRunner.waitUntilDone();
8 t = 0;
10 function runTest(f) {
11 var result = document.getElementById('result');
13 switch (t++) {
14 case 0:
15 if (f.contentWindow.ranScript != true) {
16 result.innerHTML = 'FAILURE - did not run script first time'
18 if (window.testRunner)
19 testRunner.notifyDone();
20 return;
22 f.contentWindow.location.href='about:blank';
23 break;
24 case 1:
25 if (f.contentWindow.ranScript != undefined) {
26 result.innerHTML = 'FAILURE - ranScript variable is not undefined'
28 if (window.testRunner)
29 testRunner.notifyDone();
30 return;
32 f.contentWindow.location.href='resources/cached-scripts-subframe.html';
33 break;
34 case 2:
35 if (f.contentWindow.ranScript != true)
36 result.innerHTML = 'FAILURE - did not run script second time';
37 else
38 result.innerHTML = 'SUCCESS';
40 if (window.testRunner)
41 testRunner.notifyDone();
43 break;
46 </script>
47 <div>This tests that when script that calls document.write to write out two new script tags while being parsed causes both scripts to be executed, even if the first one is cached.</div>
48 <div id="result">FAILURE</div>
49 <iframe src="resources/cached-scripts-subframe.html" onload="runTest(this)">
50 </iframe>
51 </html>