Changeset 109041 in webkit
- Timestamp:
- Feb 27, 2012 4:48:53 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109039 r109041 1 2012-02-27 Greg Billock <gbillock@google.com> 2 3 Add more tests for web intents 4 https://bugs.webkit.org/show_bug.cgi?id=79527 5 6 Reviewed by Adam Barth. 7 8 * webintents/resources/web-intents-testing.js: Added. 9 * webintents/web-intents-failure-expected.txt: Added. 10 * webintents/web-intents-failure.html: Added. 11 * webintents/web-intents-invoke-expected.txt: Added. 12 * webintents/web-intents-invoke.html: Added. 13 * webintents/web-intents-reply-expected.txt: Added. 14 * webintents/web-intents-reply.html: Added. 15 1 16 2012-02-27 ChangSeok Oh <shivamidow@gmail.com> 2 17 -
trunk/LayoutTests/webintents/web-intents-reload.html
r108724 r109041 2 2 <head> 3 3 <script src="../fast/js/resources/js-test-pre.js"></script> 4 <script src="resources/web-intents-testing.js"></script> 4 5 <script> 5 6 var latch = true; … … 27 28 window.layoutTestController.waitUntilDone(); 28 29 window.layoutTestController.dumpChildFramesAsText(); 30 } else { 31 alert('This test needs to run in DRT'); 29 32 } 30 33 31 34 debug("* loaded"); 32 35 33 // We must simulate a button press with eventSender because intents 34 // require a user gesture. 35 var button = document.getElementById("button"); 36 if (eventSender) { 37 eventSender.mouseMoveTo(button.getBoundingClientRect().left + 2, button.getBoundingClientRect().top + 12); 38 eventSender.mouseDown(); 39 eventSender.mouseUp(); 40 debug("* sent mouseup"); 41 } 36 simulateButtonPress(); 37 debug("* sent mouseup"); 42 38 } 43 39 </script> -
trunk/Tools/ChangeLog
r109017 r109041 1 2012-02-27 Greg Billock <gbillock@google.com> 2 3 Add more tests for web intents 4 https://bugs.webkit.org/show_bug.cgi?id=79527 5 6 Reviewed by Adam Barth. 7 8 * DumpRenderTree/chromium/LayoutTestController.cpp: 9 (LayoutTestController::LayoutTestController): 10 (LayoutTestController::sendWebIntentResponse): 11 * DumpRenderTree/chromium/LayoutTestController.h: 12 (LayoutTestController): 13 * DumpRenderTree/chromium/WebViewHost.h: 14 (WebViewHost): 15 (WebViewHost::currentIntentRequest): 16 1 17 2012-02-27 Xianzhu Wang <wangxianzhu@chromium.org> 2 18 -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
r108821 r109041 50 50 #include "WebIDBFactory.h" 51 51 #include "WebInputElement.h" 52 #include "WebIntentRequest.h" 52 53 #include "WebKit.h" 53 54 #include "WebNotificationPresenter.h" … … 55 56 #include "WebScriptSource.h" 56 57 #include "WebSecurityPolicy.h" 58 #include "platform/WebSerializedScriptValue.h" 57 59 #include "WebSettings.h" 58 60 #include "platform/WebSize.h" … … 60 62 #include "WebView.h" 61 63 #include "WebViewHost.h" 64 #include "v8/include/v8.h" 62 65 #include "webkit/support/webkit_support.h" 63 66 #include <algorithm> … … 263 266 bindProperty("interceptPostMessage", &m_interceptPostMessage); 264 267 bindProperty("workerThreadCount", &LayoutTestController::workerThreadCount); 268 bindMethod("sendWebIntentResponse", &LayoutTestController::sendWebIntentResponse); 265 269 } 266 270 … … 2127 2131 } 2128 2132 2133 void LayoutTestController::sendWebIntentResponse(const CppArgumentList& arguments, CppVariant* result) 2134 { 2135 v8::HandleScope scope; 2136 v8::Local<v8::Context> ctx = m_shell->webView()->mainFrame()->mainWorldScriptContext(); 2137 result->set(m_shell->webView()->mainFrame()->selectionAsMarkup().utf8()); 2138 v8::Context::Scope cscope(ctx); 2139 2140 WebKit::WebIntentRequest* request = m_shell->webViewHost()->currentIntentRequest(); 2141 if (request->isNull()) 2142 return; 2143 2144 if (arguments.size() == 1) { 2145 WebKit::WebString reply = cppVariantToWebString(arguments[0]); 2146 v8::Handle<v8::Value> v8value = v8::String::New(reply.data(), reply.length()); 2147 request->postResult(WebKit::WebSerializedScriptValue::serialize(v8value)); 2148 } else { 2149 v8::Handle<v8::Value> v8value = v8::String::New("ERROR"); 2150 request->postFailure(WebKit::WebSerializedScriptValue::serialize(v8value)); 2151 } 2152 result->setNull(); 2153 } 2154 2129 2155 void LayoutTestController::setPluginsEnabled(const CppArgumentList& arguments, CppVariant* result) 2130 2156 { -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h
r108821 r109041 437 437 438 438 void workerThreadCount(CppVariant*); 439 440 // Expects one string argument for sending successful result, zero 441 // for sending a failure result. 442 void sendWebIntentResponse(const CppArgumentList&, CppVariant*); 439 443 440 444 public: -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.h
r108724 r109041 253 253 TaskList* taskList() { return &m_taskList; } 254 254 255 // The current web intents request. 256 WebKit::WebIntentRequest* currentIntentRequest() { return &m_currentRequest; } 257 255 258 private: 256 259
Note: See TracChangeset
for help on using the changeset viewer.