OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 | 32 |
33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
34 #include "bindings/core/v8/ScriptController.h" | 34 #include "bindings/core/v8/ScriptController.h" |
35 #include "bindings/core/v8/SerializedScriptValue.h" | 35 #include "bindings/core/v8/SerializedScriptValue.h" |
36 #include "bindings/core/v8/V8AbstractEventListener.h" | 36 #include "bindings/core/v8/V8AbstractEventListener.h" |
37 #include "bindings/core/v8/V8Event.h" | 37 #include "bindings/core/v8/V8Event.h" |
| 38 #include "bindings/core/v8/V8TestingScope.h" |
38 #include "core/testing/URLTestHelpers.h" | 39 #include "core/testing/URLTestHelpers.h" |
39 #include "public/platform/Platform.h" | 40 #include "public/platform/Platform.h" |
40 #include "public/platform/WebUnitTestSupport.h" | 41 #include "public/platform/WebUnitTestSupport.h" |
41 #include "public/web/WebDOMCustomEvent.h" | 42 #include "public/web/WebDOMCustomEvent.h" |
42 #include "public/web/WebFrame.h" | 43 #include "public/web/WebFrame.h" |
43 #include "public/web/WebView.h" | 44 #include "public/web/WebView.h" |
44 #include "v8.h" | 45 #include "v8.h" |
45 #include "web/WebLocalFrameImpl.h" | 46 #include "web/WebLocalFrameImpl.h" |
46 #include "web/WebViewImpl.h" | 47 #include "web/WebViewImpl.h" |
47 #include "web/tests/FrameTestHelpers.h" | 48 #include "web/tests/FrameTestHelpers.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 V8TestingScope scope(isolate); | 109 V8TestingScope scope(isolate); |
109 customEvent.initCustomEvent("blah", false, false, WebSerializedScriptValue::
serialize(v8::Boolean::New(isolate, true))); | 110 customEvent.initCustomEvent("blah", false, false, WebSerializedScriptValue::
serialize(v8::Boolean::New(isolate, true))); |
110 RefPtr<EventListener> listener = TestListener::create(scope.scriptState()); | 111 RefPtr<EventListener> listener = TestListener::create(scope.scriptState()); |
111 frame->frame()->document()->addEventListener("blah", listener, false); | 112 frame->frame()->document()->addEventListener("blah", listener, false); |
112 frame->frame()->document()->dispatchEvent(event); | 113 frame->frame()->document()->dispatchEvent(event); |
113 | 114 |
114 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 115 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
115 } | 116 } |
116 | 117 |
117 } | 118 } |
OLD | NEW |