OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 TEST_F(WebViewTest, ClientTapHandlingNullWebViewClient) | 1581 TEST_F(WebViewTest, ClientTapHandlingNullWebViewClient) |
1582 { | 1582 { |
1583 WebViewImpl* webView = WebViewImpl::create(nullptr); | 1583 WebViewImpl* webView = WebViewImpl::create(nullptr); |
1584 WebLocalFrame* localFrame = WebLocalFrame::create(WebTreeScopeType::Document
, nullptr); | 1584 WebLocalFrame* localFrame = WebLocalFrame::create(WebTreeScopeType::Document
, nullptr); |
1585 webView->setMainFrame(localFrame); | 1585 webView->setMainFrame(localFrame); |
1586 WebGestureEvent event; | 1586 WebGestureEvent event; |
1587 event.type = WebInputEvent::GestureTap; | 1587 event.type = WebInputEvent::GestureTap; |
1588 event.sourceDevice = WebGestureDeviceTouchscreen; | 1588 event.sourceDevice = WebGestureDeviceTouchscreen; |
1589 event.x = 3; | 1589 event.x = 3; |
1590 event.y = 8; | 1590 event.y = 8; |
1591 EXPECT_FALSE(webView->handleInputEvent(event)); | 1591 EXPECT_EQ(WebInputEventResult::NotHandled, webView->handleInputEvent(event))
; |
1592 webView->close(); | 1592 webView->close(); |
1593 // Explicitly close as the frame as no frame client to do so on frameDetache
d(). | 1593 // Explicitly close as the frame as no frame client to do so on frameDetache
d(). |
1594 localFrame->close(); | 1594 localFrame->close(); |
1595 } | 1595 } |
1596 | 1596 |
1597 #if OS(ANDROID) | 1597 #if OS(ANDROID) |
1598 TEST_F(WebViewTest, LongPressSelection) | 1598 TEST_F(WebViewTest, LongPressSelection) |
1599 { | 1599 { |
1600 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("longpress_selection.html")); | 1600 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("longpress_selection.html")); |
1601 | 1601 |
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3141 WebFrame* frame = mainWebView.webView()->mainFrame(); | 3141 WebFrame* frame = mainWebView.webView()->mainFrame(); |
3142 v8::HandleScope scope(v8::Isolate::GetCurrent()); | 3142 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
3143 v8::Local<v8::Value> v8Value = frame->executeScriptAndReturnValue(WebScriptS
ource("var win = window.open('javascript:false'); win.document")); | 3143 v8::Local<v8::Value> v8Value = frame->executeScriptAndReturnValue(WebScriptS
ource("var win = window.open('javascript:false'); win.document")); |
3144 ASSERT_TRUE(v8Value->IsObject()); | 3144 ASSERT_TRUE(v8Value->IsObject()); |
3145 Document* document = V8Document::toImplWithTypeCheck(v8::Isolate::GetCurrent
(), v8Value); | 3145 Document* document = V8Document::toImplWithTypeCheck(v8::Isolate::GetCurrent
(), v8Value); |
3146 ASSERT_TRUE(document); | 3146 ASSERT_TRUE(document); |
3147 EXPECT_FALSE(document->frame()->isLoading()); | 3147 EXPECT_FALSE(document->frame()->isLoading()); |
3148 } | 3148 } |
3149 | 3149 |
3150 } // namespace blink | 3150 } // namespace blink |
OLD | NEW |