| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #include "web/PopupContainer.h" | 61 #include "web/PopupContainer.h" |
| 62 #include "web/PopupListBox.h" | 62 #include "web/PopupListBox.h" |
| 63 #include "web/PopupMenuChromium.h" | 63 #include "web/PopupMenuChromium.h" |
| 64 #include "web/WebLocalFrameImpl.h" | 64 #include "web/WebLocalFrameImpl.h" |
| 65 #include "web/WebPopupMenuImpl.h" | 65 #include "web/WebPopupMenuImpl.h" |
| 66 #include "web/WebViewImpl.h" | 66 #include "web/WebViewImpl.h" |
| 67 #include "web/tests/FrameTestHelpers.h" | 67 #include "web/tests/FrameTestHelpers.h" |
| 68 #include "web/tests/URLTestHelpers.h" | 68 #include "web/tests/URLTestHelpers.h" |
| 69 #include <gtest/gtest.h> | 69 #include <gtest/gtest.h> |
| 70 | 70 |
| 71 using namespace WebCore; | 71 using namespace blink; |
| 72 using namespace blink; | 72 using namespace blink; |
| 73 using blink::URLTestHelpers::toKURL; | 73 using blink::URLTestHelpers::toKURL; |
| 74 | 74 |
| 75 namespace { | 75 namespace { |
| 76 | 76 |
| 77 class TestPopupMenuClient : public PopupMenuClient { | 77 class TestPopupMenuClient : public PopupMenuClient { |
| 78 public: | 78 public: |
| 79 // Item at index 0 is selected by default. | 79 // Item at index 0 is selected by default. |
| 80 TestPopupMenuClient() : m_selectIndex(0), m_node(0), m_listSize(10) { } | 80 TestPopupMenuClient() : m_selectIndex(0), m_node(0), m_listSize(10) { } |
| 81 virtual ~TestPopupMenuClient() {} | 81 virtual ~TestPopupMenuClient() {} |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 m_popupMenuClient.setListSize(30); | 542 m_popupMenuClient.setListSize(30); |
| 543 | 543 |
| 544 showPopup(); | 544 showPopup(); |
| 545 PopupContainer* container = webView()->selectPopup(); | 545 PopupContainer* container = webView()->selectPopup(); |
| 546 PopupListBox* listBox = container->listBox(); | 546 PopupListBox* listBox = container->listBox(); |
| 547 | 547 |
| 548 EXPECT_EQ(container->width(), listBox->contentsSize().width() + ScrollbarThe
me::theme()->scrollbarThickness() + 2); | 548 EXPECT_EQ(container->width(), listBox->contentsSize().width() + ScrollbarThe
me::theme()->scrollbarThickness() + 2); |
| 549 } | 549 } |
| 550 | 550 |
| 551 } // namespace | 551 } // namespace |
| OLD | NEW |