| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 WebNavigationPolicy getNavigationPolicyWithMouseEvent(int modifiers, WebMous
eEvent::Button button, bool asPopup) | 100 WebNavigationPolicy getNavigationPolicyWithMouseEvent(int modifiers, WebMous
eEvent::Button button, bool asPopup) |
| 101 { | 101 { |
| 102 WebMouseEvent event; | 102 WebMouseEvent event; |
| 103 event.modifiers = modifiers; | 103 event.modifiers = modifiers; |
| 104 event.type = WebInputEvent::MouseUp; | 104 event.type = WebInputEvent::MouseUp; |
| 105 event.button = button; | 105 event.button = button; |
| 106 setCurrentInputEventForTest(&event); | 106 setCurrentInputEventForTest(&event); |
| 107 m_chromeClientImpl->setScrollbarsVisible(!asPopup); | 107 m_chromeClientImpl->setScrollbarsVisible(!asPopup); |
| 108 m_chromeClientImpl->show(WebCore::NavigationPolicyIgnore); | 108 m_chromeClientImpl->show(blink::NavigationPolicyIgnore); |
| 109 setCurrentInputEventForTest(0); | 109 setCurrentInputEventForTest(0); |
| 110 return m_result; | 110 return m_result; |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool isNavigationPolicyPopup() | 113 bool isNavigationPolicyPopup() |
| 114 { | 114 { |
| 115 m_chromeClientImpl->show(WebCore::NavigationPolicyIgnore); | 115 m_chromeClientImpl->show(blink::NavigationPolicyIgnore); |
| 116 return m_result == WebNavigationPolicyNewPopup; | 116 return m_result == WebNavigationPolicyNewPopup; |
| 117 } | 117 } |
| 118 | 118 |
| 119 protected: | 119 protected: |
| 120 WebNavigationPolicy m_result; | 120 WebNavigationPolicy m_result; |
| 121 TestWebViewClient m_webViewClient; | 121 TestWebViewClient m_webViewClient; |
| 122 WebViewImpl* m_webView; | 122 WebViewImpl* m_webView; |
| 123 WebFrame* m_mainFrame; | 123 WebFrame* m_mainFrame; |
| 124 TestWebFrameClient m_webFrameClient; | 124 TestWebFrameClient m_webFrameClient; |
| 125 ChromeClientImpl* m_chromeClientImpl; | 125 ChromeClientImpl* m_chromeClientImpl; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) | 260 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) |
| 261 { | 261 { |
| 262 m_chromeClientImpl->setResizable(false); | 262 m_chromeClientImpl->setResizable(false); |
| 263 EXPECT_TRUE(isNavigationPolicyPopup()); | 263 EXPECT_TRUE(isNavigationPolicyPopup()); |
| 264 m_chromeClientImpl->setResizable(true); | 264 m_chromeClientImpl->setResizable(true); |
| 265 EXPECT_FALSE(isNavigationPolicyPopup()); | 265 EXPECT_FALSE(isNavigationPolicyPopup()); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace | 268 } // namespace |
| OLD | NEW |