Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / bugzilla-48077.html
blob67bb1f1a6b00601e574f6403d9d222ffd09e1ce0
1 <html>
2 <!--
3 This test case is used to prove HTMLParserScheduler should be suspended when page loading is deferred. See https://bugs.webkit.org/show_bug.cgi?id=48077.
4 However, this test case can work only when customHTMLTokenizerChunkSize() is equal to or smaller than 256. To reproduce the problem with other settings, try
5 adding more tags into body.
7 To use the test case, open it in browser, when the alert shows up, wait for a few seconds, and close the alert. If it shows "Error detected", that means the problem exists.
8 -->
9 <script>
10 var showingAlert = false;
12 function log(message, replace)
14 if (replace)
15 document.getElementById("result").innerHTML = message;
16 else
17 document.getElementById("result").innerHTML += "<br>" + message;
20 function showAlert()
22 showingAlert = true;
23 alert("Test");
24 showingAlert = false;
27 // Insert a script element so the script will be executed when the resource is loaded.
28 function insertScript()
30 var head = document.getElementsByTagName("head")[0];
31 var myScript = document.createElement('script');
32 myScript.type = 'text/javascript';
33 myScript.src = 'resources/bugzilla-48077.js';
34 head.appendChild(myScript);
36 function check()
38 // Check JS re-entrancy. If showingAlert is true, we are still in showAlert().
39 if (showingAlert)
40 log("Error detected!", false);
41 else
42 log("No error detected.", false);
45 // Do a time consuming job so we can make HTML parser run over time limit.
46 function logTime()
48 // time consuming job;
49 var startTime = new Date();
50 do {
51 var currentTime = new Date();
52 log(currentTime, true);
53 } while (currentTime - startTime < 1000);
55 </script>
56 <body>
57 <p id="result"></p>
59 <script>
60 insertScript();
61 </script>
63 <!-- Time consuming job to make HTML parser run over chunk time limit -->
64 <script>
65 logTime();
66 </script>
68 <!-- Lots of tags to make HTML parser run over chunk size limit -->
69 <a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a>
71 <!-- Time consuming job to make HTML parser run over chunk time limit -->
72 <script>
73 logTime();
74 </script>
76 <!-- Lots of tags to make HTML parser run over chunk size limit -->
77 <a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a><a>1</a>
80 <script>
81 check();
82 </script>
86 </body>
87 </html>