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