| 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 12 matching lines...) Expand all Loading... |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 | 32 |
| 33 #include "WebFrame.h" | |
| 34 #include "WebFrameClient.h" | 33 #include "WebFrameClient.h" |
| 35 #include "WebInputEvent.h" | 34 #include "WebInputEvent.h" |
| 35 #include "WebLocalFrame.h" |
| 36 #include "WebView.h" | 36 #include "WebView.h" |
| 37 #include "WebViewClient.h" | 37 #include "WebViewClient.h" |
| 38 #include "WebViewImpl.h" | 38 #include "WebViewImpl.h" |
| 39 #include "core/page/Chrome.h" | 39 #include "core/page/Chrome.h" |
| 40 #include <gtest/gtest.h> | 40 #include <gtest/gtest.h> |
| 41 | 41 |
| 42 using namespace blink; | 42 using namespace blink; |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 GetNavigationPolicyTest() | 81 GetNavigationPolicyTest() |
| 82 : m_result(WebNavigationPolicyIgnore) | 82 : m_result(WebNavigationPolicyIgnore) |
| 83 , m_webViewClient(&m_result) | 83 , m_webViewClient(&m_result) |
| 84 { | 84 { |
| 85 } | 85 } |
| 86 | 86 |
| 87 protected: | 87 protected: |
| 88 virtual void SetUp() | 88 virtual void SetUp() |
| 89 { | 89 { |
| 90 m_webView = toWebViewImpl(WebView::create(&m_webViewClient)); | 90 m_webView = toWebViewImpl(WebView::create(&m_webViewClient)); |
| 91 m_mainFrame = WebFrame::create(&m_webFrameClient); | 91 m_mainFrame = WebLocalFrame::create(&m_webFrameClient); |
| 92 m_webView->setMainFrame(m_mainFrame); | 92 m_webView->setMainFrame(m_mainFrame); |
| 93 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chrome().cli
ent()); | 93 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chrome().cli
ent()); |
| 94 m_result = WebNavigationPolicyIgnore; | 94 m_result = WebNavigationPolicyIgnore; |
| 95 } | 95 } |
| 96 | 96 |
| 97 virtual void TearDown() | 97 virtual void TearDown() |
| 98 { | 98 { |
| 99 m_webView->close(); | 99 m_webView->close(); |
| 100 m_mainFrame->close(); | 100 m_mainFrame->close(); |
| 101 } | 101 } |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) | 263 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) |
| 264 { | 264 { |
| 265 m_chromeClientImpl->setResizable(false); | 265 m_chromeClientImpl->setResizable(false); |
| 266 EXPECT_TRUE(isNavigationPolicyPopup()); | 266 EXPECT_TRUE(isNavigationPolicyPopup()); |
| 267 m_chromeClientImpl->setResizable(true); | 267 m_chromeClientImpl->setResizable(true); |
| 268 EXPECT_FALSE(isNavigationPolicyPopup()); | 268 EXPECT_FALSE(isNavigationPolicyPopup()); |
| 269 } | 269 } |
| 270 | 270 |
| 271 } // namespace | 271 } // namespace |
| OLD | NEW |