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

Side by Side Diff: Source/web/PopupMenuTest.cpp

Issue 952973003: Remove dead code from unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/web/tests/PageSerializerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 virtual bool itemIsEnabled(unsigned listIndex) const { return m_disabledInde xSet.find(listIndex) == m_disabledIndexSet.end(); } 106 virtual bool itemIsEnabled(unsigned listIndex) const { return m_disabledInde xSet.find(listIndex) == m_disabledIndexSet.end(); }
107 virtual PopupMenuStyle itemStyle(unsigned listIndex) const 107 virtual PopupMenuStyle itemStyle(unsigned listIndex) const
108 { 108 {
109 FontDescription fontDescription; 109 FontDescription fontDescription;
110 fontDescription.setComputedSize(12.0); 110 fontDescription.setComputedSize(12.0);
111 Font font(fontDescription); 111 Font font(fontDescription);
112 font.update(nullptr); 112 font.update(nullptr);
113 return PopupMenuStyle(Color::black, Color::white, font, true, false, Len gth(), TextDirection(), false /* has text direction override */); 113 return PopupMenuStyle(Color::black, Color::white, font, true, false, Len gth(), TextDirection(), false /* has text direction override */);
114 } 114 }
115 virtual PopupMenuStyle menuStyle() const { return itemStyle(0); } 115 virtual PopupMenuStyle menuStyle() const { return itemStyle(0); }
116 virtual int clientInsetLeft() const { return 0; }
117 virtual int clientInsetRight() const { return 0; }
118 virtual LayoutUnit clientPaddingLeft() const { return 0; } 116 virtual LayoutUnit clientPaddingLeft() const { return 0; }
119 virtual LayoutUnit clientPaddingRight() const { return 0; } 117 virtual LayoutUnit clientPaddingRight() const { return 0; }
120 virtual int listSize() const { return m_listSize; } 118 virtual int listSize() const { return m_listSize; }
121 virtual int selectedIndex() const { return m_selectIndex; } 119 virtual int selectedIndex() const { return m_selectIndex; }
122 virtual void popupDidHide() { } 120 virtual void popupDidHide() { }
123 virtual bool itemIsSeparator(unsigned listIndex) const { return false; } 121 virtual bool itemIsSeparator(unsigned listIndex) const { return false; }
124 virtual bool itemIsLabel(unsigned listIndex) const { return false; } 122 virtual bool itemIsLabel(unsigned listIndex) const { return false; }
125 virtual bool itemIsSelected(unsigned listIndex) const { return listIndex == m_selectIndex; } 123 virtual bool itemIsSelected(unsigned listIndex) const { return listIndex == m_selectIndex; }
126 virtual bool valueShouldChangeOnHotTrack() const { return false; }
127 virtual void setTextFromItem(unsigned listIndex) { } 124 virtual void setTextFromItem(unsigned listIndex) { }
128 virtual IntRect elementRectRelativeToViewport() const override { return IntR ect(); } 125 virtual IntRect elementRectRelativeToViewport() const override { return IntR ect(); }
129 virtual Element& ownerElement() const override { return *toElement(m_node); } 126 virtual Element& ownerElement() const override { return *toElement(m_node); }
130 virtual LayoutStyle* layoutStyleForItem(Element& element) const override { r eturn nullptr; } 127 virtual LayoutStyle* layoutStyleForItem(Element& element) const override { r eturn nullptr; }
131 128
132 virtual FontSelector* fontSelector() const { return 0; } 129 virtual FontSelector* fontSelector() const { return 0; }
133 virtual HostWindow* hostWindow() const { return 0; } 130 virtual HostWindow* hostWindow() const { return 0; }
134 131
135 virtual PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollableArea*, S crollbarOrientation, ScrollbarControlSize) { return nullptr; } 132 virtual PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollableArea*, S crollbarOrientation, ScrollbarControlSize) { return nullptr; }
136 133
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 ASSERT(menuList); 632 ASSERT(menuList);
636 menuList->showPopup(); 633 menuList->showPopup();
637 ASSERT(popupOpen()); 634 ASSERT(popupOpen());
638 PopupListBox* listBox = webView()->selectPopup()->listBox(); 635 PopupListBox* listBox = webView()->selectPopup()->listBox();
639 int ltrWidth = listBox->getRowBaseWidth(0); 636 int ltrWidth = listBox->getRowBaseWidth(0);
640 int rtlWidth = listBox->getRowBaseWidth(1); 637 int rtlWidth = listBox->getRowBaseWidth(1);
641 EXPECT_LT(rtlWidth, ltrWidth); 638 EXPECT_LT(rtlWidth, ltrWidth);
642 } 639 }
643 640
644 } // namespace 641 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/web/tests/PageSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698