Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: LayoutTests/fast/text/international/listbox-width-rtl.html

Issue 347773002: Implement select listbox using shadow DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/text/international/listbox-width-rtl.html
diff --git a/LayoutTests/fast/text/international/listbox-width-rtl.html b/LayoutTests/fast/text/international/listbox-width-rtl.html
index f1f1e86aefaf2711d575154ca743d272b68f5610..59417c2b926aa8046e84bc7b242be356c5c0a452 100644
--- a/LayoutTests/fast/text/international/listbox-width-rtl.html
+++ b/LayoutTests/fast/text/international/listbox-width-rtl.html
@@ -37,18 +37,21 @@
document.body.removeChild(textElement);
return textWidth;
}
-
+
+ var optionPaddingStart = 3;
+ var optionPaddingEnd = 2;
+
function testListbox(id)
{
var element = document.getElementById(id);
var emptyWidth = widthForEmptySelect(element.size);
var textWidth = widthForText(element.firstElementChild.textContent);
var dropdownWidth = element.getBoundingClientRect().width;
-
- if (Math.abs(dropdownWidth - (emptyWidth + textWidth)) <= 1)
+ var expectedWidth = emptyWidth + textWidth + optionPaddingStart + optionPaddingEnd;
+ if (Math.abs(dropdownWidth - expectedWidth) <= 1)
testPassed('Width of ' + id + ' matches width of text plus width of empty ' + id + '.');
else
- testFailed('Width ' + id + ' was ' + dropdownWidth + 'px wide, expected ' + (emptyWidth + textWidth) + 'px (' + emptyWidth + 'px for empty ' + id + ' and ' + textWidth + 'px for text).');
+ testFailed('Width ' + id + ' was ' + dropdownWidth + 'px wide, expected ' + expectedWidth + 'px (' + emptyWidth + 'px for empty ' + id + ' and ' + textWidth + 'px for text).');
}
testListbox('list');
« no previous file with comments | « LayoutTests/fast/scroll-behavior/resources/scroll-behavior-test.js ('k') | LayoutTests/fast/text/updateNewFont-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698