| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 #include "FrameTestHelpers.h" | 33 #include "FrameTestHelpers.h" |
| 34 #include "PopupContainer.h" | 34 #include "PopupContainer.h" |
| 35 #include "PopupMenuChromium.h" | 35 #include "PopupMenuChromium.h" |
| 36 #include "RuntimeEnabledFeatures.h" | 36 #include "RuntimeEnabledFeatures.h" |
| 37 #include "URLTestHelpers.h" | 37 #include "URLTestHelpers.h" |
| 38 #include "WebDocument.h" | 38 #include "WebDocument.h" |
| 39 #include "WebElement.h" | 39 #include "WebElement.h" |
| 40 #include "WebFrame.h" | 40 #include "WebFrame.h" |
| 41 #include "WebFrameClient.h" | 41 #include "WebFrameClient.h" |
| 42 #include "WebFrameImpl.h" | |
| 43 #include "WebInputEvent.h" | 42 #include "WebInputEvent.h" |
| 43 #include "WebLocalFrameImpl.h" |
| 44 #include "WebPopupMenuImpl.h" | 44 #include "WebPopupMenuImpl.h" |
| 45 #include "WebSettings.h" | 45 #include "WebSettings.h" |
| 46 #include "WebView.h" | 46 #include "WebView.h" |
| 47 #include "WebViewClient.h" | 47 #include "WebViewClient.h" |
| 48 #include "WebViewImpl.h" | 48 #include "WebViewImpl.h" |
| 49 #include "core/dom/Element.h" | 49 #include "core/dom/Element.h" |
| 50 #include "core/frame/FrameView.h" | 50 #include "core/frame/FrameView.h" |
| 51 #include "core/html/HTMLSelectElement.h" | 51 #include "core/html/HTMLSelectElement.h" |
| 52 #include "core/page/EventHandler.h" | 52 #include "core/page/EventHandler.h" |
| 53 #include "platform/KeyboardCodes.h" | 53 #include "platform/KeyboardCodes.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 void loadFrame(WebFrame* frame, const std::string& fileName) | 258 void loadFrame(WebFrame* frame, const std::string& fileName) |
| 259 { | 259 { |
| 260 WebURLRequest urlRequest; | 260 WebURLRequest urlRequest; |
| 261 urlRequest.initialize(); | 261 urlRequest.initialize(); |
| 262 urlRequest.setURL(WebURL(toKURL(baseURL + fileName))); | 262 urlRequest.setURL(WebURL(toKURL(baseURL + fileName))); |
| 263 frame->loadRequest(urlRequest); | 263 frame->loadRequest(urlRequest); |
| 264 } | 264 } |
| 265 | 265 |
| 266 WebViewImpl* webView() const { return m_helper.webViewImpl(); } | 266 WebViewImpl* webView() const { return m_helper.webViewImpl(); } |
| 267 WebFrameImpl* mainFrame() const { return m_helper.webViewImpl()->mainFrameIm
pl(); } | 267 WebLocalFrameImpl* mainFrame() const { return m_helper.webViewImpl()->mainFr
ameImpl(); } |
| 268 | 268 |
| 269 protected: | 269 protected: |
| 270 TestWebViewClient m_webviewClient; | 270 TestWebViewClient m_webviewClient; |
| 271 TestPopupMenuClient m_popupMenuClient; | 271 TestPopupMenuClient m_popupMenuClient; |
| 272 RefPtr<PopupMenu> m_popupMenu; | 272 RefPtr<PopupMenu> m_popupMenu; |
| 273 std::string baseURL; | 273 std::string baseURL; |
| 274 | 274 |
| 275 private: | 275 private: |
| 276 FrameTestHelpers::WebViewHelper m_helper; | 276 FrameTestHelpers::WebViewHelper m_helper; |
| 277 }; | 277 }; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // menuItemHeight * 1.5 means the Y position on the item at index 1. | 504 // menuItemHeight * 1.5 means the Y position on the item at index 1. |
| 505 IntPoint row1Point(2, menuItemHeight * 1.5); | 505 IntPoint row1Point(2, menuItemHeight * 1.5); |
| 506 simulateLeftMouseDownEvent(row1Point); | 506 simulateLeftMouseDownEvent(row1Point); |
| 507 simulateLeftMouseUpEvent(row1Point); | 507 simulateLeftMouseUpEvent(row1Point); |
| 508 | 508 |
| 509 WebElement element = webView()->mainFrame()->document().getElementById("mess
age"); | 509 WebElement element = webView()->mainFrame()->document().getElementById("mess
age"); |
| 510 EXPECT_STREQ("click", element.innerText().utf8().data()); | 510 EXPECT_STREQ("click", element.innerText().utf8().data()); |
| 511 } | 511 } |
| 512 | 512 |
| 513 } // namespace | 513 } // namespace |
| OLD | NEW |