| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chromeClient()); | 75 m_chromeClientImpl = toChromeClientImpl(&m_webView->page()->chromeClient()); |
| 76 m_result = WebNavigationPolicyIgnore; | 76 m_result = WebNavigationPolicyIgnore; |
| 77 } | 77 } |
| 78 | 78 |
| 79 void TearDown() override { m_webView->close(); } | 79 void TearDown() override { m_webView->close(); } |
| 80 | 80 |
| 81 WebNavigationPolicy getNavigationPolicyWithMouseEvent( | 81 WebNavigationPolicy getNavigationPolicyWithMouseEvent( |
| 82 int modifiers, | 82 int modifiers, |
| 83 WebMouseEvent::Button button, | 83 WebMouseEvent::Button button, |
| 84 bool asPopup) { | 84 bool asPopup) { |
| 85 WebMouseEvent event; | 85 WebMouseEvent event(WebInputEvent::MouseUp, modifiers, |
| 86 event.modifiers = modifiers; | 86 WebInputEvent::TimeStampForTesting); |
| 87 event.type = WebInputEvent::MouseUp; | |
| 88 event.button = button; | 87 event.button = button; |
| 89 setCurrentInputEventForTest(&event); | 88 setCurrentInputEventForTest(&event); |
| 90 m_chromeClientImpl->setScrollbarsVisible(!asPopup); | 89 m_chromeClientImpl->setScrollbarsVisible(!asPopup); |
| 91 m_chromeClientImpl->show(NavigationPolicyIgnore); | 90 m_chromeClientImpl->show(NavigationPolicyIgnore); |
| 92 setCurrentInputEventForTest(0); | 91 setCurrentInputEventForTest(0); |
| 93 return m_result; | 92 return m_result; |
| 94 } | 93 } |
| 95 | 94 |
| 96 bool isNavigationPolicyPopup() { | 95 bool isNavigationPolicyPopup() { |
| 97 m_chromeClientImpl->show(NavigationPolicyIgnore); | 96 m_chromeClientImpl->show(NavigationPolicyIgnore); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 LocalFrame* frame = toWebLocalFrameImpl(m_mainFrame)->frame(); | 271 LocalFrame* frame = toWebLocalFrameImpl(m_mainFrame)->frame(); |
| 273 FrameLoadRequest request(frame->document()); | 272 FrameLoadRequest request(frame->document()); |
| 274 WindowFeatures features; | 273 WindowFeatures features; |
| 275 EXPECT_EQ(nullptr, | 274 EXPECT_EQ(nullptr, |
| 276 m_chromeClientImpl->createWindow(frame, request, features, | 275 m_chromeClientImpl->createWindow(frame, request, features, |
| 277 NavigationPolicyNewForegroundTab)); | 276 NavigationPolicyNewForegroundTab)); |
| 278 m_webView->page()->setSuspended(false); | 277 m_webView->page()->setSuspended(false); |
| 279 } | 278 } |
| 280 | 279 |
| 281 } // namespace blink | 280 } // namespace blink |
| OLD | NEW |