Index: third_party/WebKit/LayoutTests/fast/text-autosizing/super-cluster-with-inherited-cluster-inside.html |
diff --git a/third_party/WebKit/LayoutTests/fast/text-autosizing/super-cluster-with-inherited-cluster-inside.html b/third_party/WebKit/LayoutTests/fast/text-autosizing/super-cluster-with-inherited-cluster-inside.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1afb04b620a5ddfb9c87f5e5b3c738c734beca73 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/text-autosizing/super-cluster-with-inherited-cluster-inside.html |
@@ -0,0 +1,76 @@ |
+<html> |
+<head> |
+<meta name="viewport" content="width=800"> |
+ <style> |
+ html { font-size: 16px; } |
+ body { width: 800px; margin: 0; overflow-y: hidden; } |
+ </style> |
+ <script src="resources/autosizingTest.js"></script> |
+</head> |
+ <body> |
+ <table> |
+ <tr> |
+ <td> |
+ <table width="800" style="table-layout:fixed;"> |
+ <tr> |
+ <td class="supercluster" style="width:800px"> |
+ <div class="inheritedcluter" id="content" style="width:800px">short content...</div> |
+ </td> |
+ </tr> |
+ </table> |
+ </td> |
+ </tr> |
+ |
+ <tr> |
+ <td> |
+ <table width="800" style="table-layout:fixed;"> |
+ <tr> |
+ <td class="supercluster" style="width:800px"> |
+ <div class="inheritedcluter" style="width:800px">comments:</div> |
+ </td> |
+ </tr> |
+ </table> |
+ </td> |
+ </tr> |
+ |
+ </table> |
+ |
+ <script> |
+ function changeText() { |
+ var inheritedcluter1 = document.createElement("div"); |
+ inheritedcluter1.setAttribute("class", "inheritedcluter"); |
+ inheritedcluter1.style="width:800px"; |
+ inheritedcluter1.innerText="inert short text"; |
+ document.getElementsByClassName("supercluster")[1].appendChild(inheritedcluter1); |
+ |
+ var inheritedcluter2 = document.createElement("div"); |
+ inheritedcluter2.setAttribute("class", "inheritedcluter"); |
+ inheritedcluter2.setAttribute("id", "lastcomment"); |
+ inheritedcluter2.style="width:800px"; |
+ inheritedcluter2.innerText="inert long text...inert long text...inert long text...inert long text...inert long text...inert long text...inert long text...inert long text...inert long text...inert long text...inert long text...inert long text..."; |
+ document.getElementsByClassName("supercluster")[1].appendChild(inheritedcluter2); |
+ } |
+ |
+ function testConsistent() { |
+ var lastcomment = document.getElementById('lastcomment'); |
+ var lastcommentComputedFontSize = parseInt(window.getComputedStyle(lastcomment).fontSize); |
+ |
+ var content = document.getElementById('content'); |
+ var contentComputedFontSize = parseInt(window.getComputedStyle(content).fontSize); |
+ |
+ if (lastcommentComputedFontSize == contentComputedFontSize && contentComputedFontSize > 16) |
+ document.write('PASS'); |
+ else |
+ document.write('FAIL. Expected contentComputedFontSize == lastcommentComputedFontSize.\n ' + contentComputedFontSize + ': ' + lastcommentComputedFontSize); |
+ |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ } |
+ |
+ setTimeout("changeText()", 100); |
+ setTimeout("testConsistent()", 200); |
+ </script> |
+ </body> |
+</html> |
+ |
+ |