| OLD | NEW |
| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "web/PopupContainer.h" | 63 #include "web/PopupContainer.h" |
| 64 #include "web/PopupListBox.h" | 64 #include "web/PopupListBox.h" |
| 65 #include "web/PopupMenuChromium.h" | 65 #include "web/PopupMenuChromium.h" |
| 66 #include "web/WebLocalFrameImpl.h" | 66 #include "web/WebLocalFrameImpl.h" |
| 67 #include "web/WebPopupMenuImpl.h" | 67 #include "web/WebPopupMenuImpl.h" |
| 68 #include "web/WebViewImpl.h" | 68 #include "web/WebViewImpl.h" |
| 69 #include "web/tests/FrameTestHelpers.h" | 69 #include "web/tests/FrameTestHelpers.h" |
| 70 #include <gtest/gtest.h> | 70 #include <gtest/gtest.h> |
| 71 | 71 |
| 72 using namespace blink; | 72 using namespace blink; |
| 73 using namespace blink; | |
| 74 using blink::URLTestHelpers::toKURL; | 73 using blink::URLTestHelpers::toKURL; |
| 75 | 74 |
| 76 namespace { | 75 namespace { |
| 77 | 76 |
| 78 class TestPopupMenuClient : public PopupMenuClient { | 77 class TestPopupMenuClient : public PopupMenuClient { |
| 79 public: | 78 public: |
| 80 // Item at index 0 is selected by default. | 79 // Item at index 0 is selected by default. |
| 81 TestPopupMenuClient() : m_selectIndex(0), m_node(0), m_listSize(10) { } | 80 TestPopupMenuClient() : m_selectIndex(0), m_node(0), m_listSize(10) { } |
| 82 virtual ~TestPopupMenuClient() { } | 81 virtual ~TestPopupMenuClient() { } |
| 83 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) | 82 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 ASSERT(menuList); | 604 ASSERT(menuList); |
| 606 menuList->showPopup(); | 605 menuList->showPopup(); |
| 607 ASSERT(popupOpen()); | 606 ASSERT(popupOpen()); |
| 608 PopupListBox* listBox = webView()->selectPopup()->listBox(); | 607 PopupListBox* listBox = webView()->selectPopup()->listBox(); |
| 609 int ltrWidth = listBox->getRowBaseWidth(0); | 608 int ltrWidth = listBox->getRowBaseWidth(0); |
| 610 int rtlWidth = listBox->getRowBaseWidth(1); | 609 int rtlWidth = listBox->getRowBaseWidth(1); |
| 611 EXPECT_LT(rtlWidth, ltrWidth); | 610 EXPECT_LT(rtlWidth, ltrWidth); |
| 612 } | 611 } |
| 613 | 612 |
| 614 } // namespace | 613 } // namespace |
| OLD | NEW |