| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 public: | 67 public: |
| 68 GetNavigationPolicyTest() | 68 GetNavigationPolicyTest() |
| 69 : m_result(WebNavigationPolicyIgnore) | 69 : m_result(WebNavigationPolicyIgnore) |
| 70 , m_webViewClient(&m_result) | 70 , m_webViewClient(&m_result) |
| 71 { | 71 { |
| 72 } | 72 } |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 void SetUp() override | 75 void SetUp() override |
| 76 { | 76 { |
| 77 m_webView = toWebViewImpl(WebView::create(&m_webViewClient)); | 77 m_webView = toWebViewImpl(WebView::create(&m_webViewClient, WebPageVisib
ilityStateVisible)); |
| 78 m_mainFrame = WebLocalFrame::create(WebTreeScopeType::Document, &m_webFr
ameClient); | 78 m_mainFrame = WebLocalFrame::create(WebTreeScopeType::Document, &m_webFr
ameClient); |
| 79 m_webView->setMainFrame(m_mainFrame); | 79 m_webView->setMainFrame(m_mainFrame); |
| 80 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chromeClient
()); | 80 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chromeClient
()); |
| 81 m_result = WebNavigationPolicyIgnore; | 81 m_result = WebNavigationPolicyIgnore; |
| 82 } | 82 } |
| 83 | 83 |
| 84 void TearDown() override | 84 void TearDown() override |
| 85 { | 85 { |
| 86 m_webView->close(); | 86 m_webView->close(); |
| 87 m_mainFrame->close(); | 87 m_mainFrame->close(); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) | 250 TEST_F(GetNavigationPolicyTest, NotResizableForcesPopup) |
| 251 { | 251 { |
| 252 m_chromeClientImpl->setResizable(false); | 252 m_chromeClientImpl->setResizable(false); |
| 253 EXPECT_TRUE(isNavigationPolicyPopup()); | 253 EXPECT_TRUE(isNavigationPolicyPopup()); |
| 254 m_chromeClientImpl->setResizable(true); | 254 m_chromeClientImpl->setResizable(true); |
| 255 EXPECT_FALSE(isNavigationPolicyPopup()); | 255 EXPECT_FALSE(isNavigationPolicyPopup()); |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace blink | 258 } // namespace blink |
| OLD | NEW |