Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text-autosizing / removing-clusters-while-disabled.html
blob740f563988c671e637ce3c0707890ace9f12bacb
1 <!DOCTYPE html>
2 <html>
3 <head>
5 <meta name="viewport" content="width=800">
6 <style>
7 html { font-size: 16px; }
8 body { width: 800px; margin: 0; overflow-y: hidden; }
9 </style>
11 <script src="resources/autosizingTest.js"></script>
13 </head>
14 <body>
15 <script>
17 function enableAutosizing(enabled) {
18 if (window.internals)
19 window.internals.settings.setTextAutosizingEnabled(enabled);
22 function addCluster() {
23 var cluster = '<table><tr><td>' +
24 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut' +
25 'labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco' +
26 'laboris ni si ut aliquip ex ea commodo consequat.' +
27 '</td></tr></table>';
28 document.body.innerHTML += cluster;
31 function removeCluster() {
32 var tables = document.getElementsByTagName('table');
33 if (tables.length)
34 tables[tables.length - 1].parentElement.removeChild(tables[tables.length - 1]);
37 addCluster();
38 addCluster();
39 var forceLayout1 = document.body.offsetTop;
40 enableAutosizing(false);
41 removeCluster();
42 removeCluster();
43 var forceLayout2 = document.body.offsetTop;
44 enableAutosizing(true);
45 addCluster();
46 var forceLayout3 = document.body.offsetTop;
47 document.body.innerHTML = "PASS";
49 if (window.testRunner)
50 testRunner.dumpAsText();
51 </script>
52 </body>
53 </html>