| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 m_chromeClientImpl->show(NavigationPolicyIgnore); | 110 m_chromeClientImpl->show(NavigationPolicyIgnore); |
| 111 return m_result == WebNavigationPolicyNewPopup; | 111 return m_result == WebNavigationPolicyNewPopup; |
| 112 } | 112 } |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 WebNavigationPolicy m_result; | 115 WebNavigationPolicy m_result; |
| 116 TestWebViewClient m_webViewClient; | 116 TestWebViewClient m_webViewClient; |
| 117 WebViewImpl* m_webView; | 117 WebViewImpl* m_webView; |
| 118 WebFrame* m_mainFrame; | 118 WebFrame* m_mainFrame; |
| 119 TestWebFrameClient m_webFrameClient; | 119 TestWebFrameClient m_webFrameClient; |
| 120 RawPtrWillBePersistent<ChromeClientImpl> m_chromeClientImpl; | 120 Persistent<ChromeClientImpl> m_chromeClientImpl; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 TEST_F(GetNavigationPolicyTest, LeftClick) | 123 TEST_F(GetNavigationPolicyTest, LeftClick) |
| 124 { | 124 { |
| 125 int modifiers = 0; | 125 int modifiers = 0; |
| 126 WebMouseEvent::Button button = WebMouseEvent::ButtonLeft; | 126 WebMouseEvent::Button button = WebMouseEvent::ButtonLeft; |
| 127 bool asPopup = false; | 127 bool asPopup = false; |
| 128 EXPECT_EQ(WebNavigationPolicyNewForegroundTab, | 128 EXPECT_EQ(WebNavigationPolicyNewForegroundTab, |
| 129 getNavigationPolicyWithMouseEvent(modifiers, button, asPopup)); | 129 getNavigationPolicyWithMouseEvent(modifiers, button, asPopup)); |
| 130 } | 130 } |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) | 255 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) |
| 256 { | 256 { |
| 257 m_chromeClientImpl->setResizable(false); | 257 m_chromeClientImpl->setResizable(false); |
| 258 EXPECT_TRUE(isNavigationPolicyPopup()); | 258 EXPECT_TRUE(isNavigationPolicyPopup()); |
| 259 m_chromeClientImpl->setResizable(true); | 259 m_chromeClientImpl->setResizable(true); |
| 260 EXPECT_FALSE(isNavigationPolicyPopup()); | 260 EXPECT_FALSE(isNavigationPolicyPopup()); |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace blink | 263 } // namespace blink |
| OLD | NEW |