| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 #include "web/PopupContainer.h" | 65 #include "web/PopupContainer.h" |
| 66 #include "web/PopupListBox.h" | 66 #include "web/PopupListBox.h" |
| 67 #include "web/PopupMenuChromium.h" | 67 #include "web/PopupMenuChromium.h" |
| 68 #include "web/WebLocalFrameImpl.h" | 68 #include "web/WebLocalFrameImpl.h" |
| 69 #include "web/WebPopupMenuImpl.h" | 69 #include "web/WebPopupMenuImpl.h" |
| 70 #include "web/WebViewImpl.h" | 70 #include "web/WebViewImpl.h" |
| 71 #include "web/tests/FrameTestHelpers.h" | 71 #include "web/tests/FrameTestHelpers.h" |
| 72 #include <gtest/gtest.h> | 72 #include <gtest/gtest.h> |
| 73 | 73 |
| 74 using namespace blink; | 74 using namespace blink; |
| 75 using blink::URLTestHelpers::toKURL; | 75 using URLTestHelpers::toKURL; |
| 76 | 76 |
| 77 namespace { | 77 namespace { |
| 78 | 78 |
| 79 class TestPopupMenuClient : public PopupMenuClient { | 79 class TestPopupMenuClient : public PopupMenuClient { |
| 80 public: | 80 public: |
| 81 // Item at index 0 is selected by default. | 81 // Item at index 0 is selected by default. |
| 82 TestPopupMenuClient() : m_selectIndex(0), m_node(0), m_listSize(10), m_index
ToSelectOnCancel(-1) { } | 82 TestPopupMenuClient() : m_selectIndex(0), m_node(0), m_listSize(10), m_index
ToSelectOnCancel(-1) { } |
| 83 virtual ~TestPopupMenuClient() { } | 83 virtual ~TestPopupMenuClient() { } |
| 84 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) | 84 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) |
| 85 { | 85 { |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 ASSERT(menuList); | 632 ASSERT(menuList); |
| 633 menuList->showPopup(); | 633 menuList->showPopup(); |
| 634 ASSERT(popupOpen()); | 634 ASSERT(popupOpen()); |
| 635 PopupListBox* listBox = webView()->selectPopup()->listBox(); | 635 PopupListBox* listBox = webView()->selectPopup()->listBox(); |
| 636 int ltrWidth = listBox->getRowBaseWidth(0); | 636 int ltrWidth = listBox->getRowBaseWidth(0); |
| 637 int rtlWidth = listBox->getRowBaseWidth(1); | 637 int rtlWidth = listBox->getRowBaseWidth(1); |
| 638 EXPECT_LT(rtlWidth, ltrWidth); | 638 EXPECT_LT(rtlWidth, ltrWidth); |
| 639 } | 639 } |
| 640 | 640 |
| 641 } // namespace | 641 } // namespace |
| OLD | NEW |