| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 GetNavigationPolicyTest() | 78 GetNavigationPolicyTest() |
| 79 : m_result(WebNavigationPolicyIgnore) | 79 : m_result(WebNavigationPolicyIgnore) |
| 80 , m_webViewClient(&m_result) | 80 , m_webViewClient(&m_result) |
| 81 { | 81 { |
| 82 } | 82 } |
| 83 | 83 |
| 84 protected: | 84 protected: |
| 85 virtual void SetUp() | 85 virtual void SetUp() |
| 86 { | 86 { |
| 87 m_webView = toWebViewImpl(WebView::create(&m_webViewClient)); | 87 m_webView = toWebViewImpl(WebView::create(&m_webViewClient)); |
| 88 m_mainFrame = WebLocalFrame::create(&m_webFrameClient); | 88 m_mainFrame = WebLocalFrame::create(WebTreeScopeType::Document, &m_webFr
ameClient); |
| 89 m_webView->setMainFrame(m_mainFrame); | 89 m_webView->setMainFrame(m_mainFrame); |
| 90 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chrome().cli
ent()); | 90 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chrome().cli
ent()); |
| 91 m_result = WebNavigationPolicyIgnore; | 91 m_result = WebNavigationPolicyIgnore; |
| 92 } | 92 } |
| 93 | 93 |
| 94 virtual void TearDown() | 94 virtual void TearDown() |
| 95 { | 95 { |
| 96 m_webView->close(); | 96 m_webView->close(); |
| 97 m_mainFrame->close(); | 97 m_mainFrame->close(); |
| 98 } | 98 } |
| (...skipping 160 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 |