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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 | 1363 |
1364 WebDragData::Item item; | 1364 WebDragData::Item item; |
1365 item.storageType = WebDragData::Item::StorageTypeString; | 1365 item.storageType = WebDragData::Item::StorageTypeString; |
1366 item.stringType = "text/uri-list"; | 1366 item.stringType = "text/uri-list"; |
1367 item.stringData = WebString::fromUTF8(url); | 1367 item.stringData = WebString::fromUTF8(url); |
1368 dragData.addItem(item); | 1368 dragData.addItem(item); |
1369 | 1369 |
1370 const WebPoint clientPoint(0, 0); | 1370 const WebPoint clientPoint(0, 0); |
1371 const WebPoint screenPoint(0, 0); | 1371 const WebPoint screenPoint(0, 0); |
1372 webView->dragTargetDragEnter(dragData, clientPoint, screenPoint, WebDragOper
ationCopy, 0); | 1372 webView->dragTargetDragEnter(dragData, clientPoint, screenPoint, WebDragOper
ationCopy, 0); |
1373 Platform::current()->currentThread()->taskRunner()->postTask(FROM_HERE, new
DropTask(webView)); | 1373 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE
, new DropTask(webView)); |
1374 FrameTestHelpers::pumpPendingRequestsDoNotUse(webView->mainFrame()); | 1374 FrameTestHelpers::pumpPendingRequestsDoNotUse(webView->mainFrame()); |
1375 } | 1375 } |
1376 | 1376 |
1377 TEST_F(WebViewTest, DragDropURL) | 1377 TEST_F(WebViewTest, DragDropURL) |
1378 { | 1378 { |
1379 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), "foo.html"); | 1379 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), "foo.html"); |
1380 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), "bar.html"); | 1380 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), "bar.html"); |
1381 | 1381 |
1382 const std::string fooUrl = m_baseURL + "foo.html"; | 1382 const std::string fooUrl = m_baseURL + "foo.html"; |
1383 const std::string barUrl = m_baseURL + "bar.html"; | 1383 const std::string barUrl = m_baseURL + "bar.html"; |
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3101 WebFrame* frame = mainWebView.webView()->mainFrame(); | 3101 WebFrame* frame = mainWebView.webView()->mainFrame(); |
3102 v8::HandleScope scope(v8::Isolate::GetCurrent()); | 3102 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
3103 v8::Local<v8::Value> v8Value = frame->executeScriptAndReturnValue(WebScriptS
ource("var win = window.open('javascript:false'); win.document")); | 3103 v8::Local<v8::Value> v8Value = frame->executeScriptAndReturnValue(WebScriptS
ource("var win = window.open('javascript:false'); win.document")); |
3104 ASSERT_TRUE(v8Value->IsObject()); | 3104 ASSERT_TRUE(v8Value->IsObject()); |
3105 Document* document = V8Document::toImplWithTypeCheck(v8::Isolate::GetCurrent
(), v8Value); | 3105 Document* document = V8Document::toImplWithTypeCheck(v8::Isolate::GetCurrent
(), v8Value); |
3106 ASSERT_TRUE(document); | 3106 ASSERT_TRUE(document); |
3107 EXPECT_FALSE(document->frame()->isLoading()); | 3107 EXPECT_FALSE(document->frame()->isLoading()); |
3108 } | 3108 } |
3109 | 3109 |
3110 } // namespace blink | 3110 } // namespace blink |
OLD | NEW |