| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 548 } |
| 549 | 549 |
| 550 class SelectPopupMenuStyleTest : public testing::Test { | 550 class SelectPopupMenuStyleTest : public testing::Test { |
| 551 public: | 551 public: |
| 552 SelectPopupMenuStyleTest() | 552 SelectPopupMenuStyleTest() |
| 553 : baseURL("http://www.test.com/") | 553 : baseURL("http://www.test.com/") |
| 554 { | 554 { |
| 555 } | 555 } |
| 556 | 556 |
| 557 protected: | 557 protected: |
| 558 virtual void SetUp() OVERRIDE | 558 virtual void SetUp() override |
| 559 { | 559 { |
| 560 m_helper.initialize(false, 0, &m_webviewClient); | 560 m_helper.initialize(false, 0, &m_webviewClient); |
| 561 } | 561 } |
| 562 | 562 |
| 563 virtual void TearDown() OVERRIDE | 563 virtual void TearDown() override |
| 564 { | 564 { |
| 565 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 565 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
| 566 } | 566 } |
| 567 | 567 |
| 568 // Returns true if there currently is a select popup in the WebView. | 568 // Returns true if there currently is a select popup in the WebView. |
| 569 bool popupOpen() const { return webView()->selectPopup(); } | 569 bool popupOpen() const { return webView()->selectPopup(); } |
| 570 | 570 |
| 571 void registerMockedURLLoad(const std::string& fileName) | 571 void registerMockedURLLoad(const std::string& fileName) |
| 572 { | 572 { |
| 573 URLTestHelpers::registerMockedURLLoad(toKURL(baseURL + fileName), WebStr
ing::fromUTF8(fileName.c_str()), WebString::fromUTF8("popup/"), WebString::fromU
TF8("text/html")); | 573 URLTestHelpers::registerMockedURLLoad(toKURL(baseURL + fileName), WebStr
ing::fromUTF8(fileName.c_str()), WebString::fromUTF8("popup/"), WebString::fromU
TF8("text/html")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 602 ASSERT(menuList); | 602 ASSERT(menuList); |
| 603 menuList->showPopup(); | 603 menuList->showPopup(); |
| 604 ASSERT(popupOpen()); | 604 ASSERT(popupOpen()); |
| 605 PopupListBox* listBox = webView()->selectPopup()->listBox(); | 605 PopupListBox* listBox = webView()->selectPopup()->listBox(); |
| 606 int ltrWidth = listBox->getRowBaseWidth(0); | 606 int ltrWidth = listBox->getRowBaseWidth(0); |
| 607 int rtlWidth = listBox->getRowBaseWidth(1); | 607 int rtlWidth = listBox->getRowBaseWidth(1); |
| 608 EXPECT_LT(rtlWidth, ltrWidth); | 608 EXPECT_LT(rtlWidth, ltrWidth); |
| 609 } | 609 } |
| 610 | 610 |
| 611 } // namespace | 611 } // namespace |
| OLD | NEW |