OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 * Copyright (C) 2011 Apple Inc. All rights reserved. | 6 * Copyright (C) 2011 Apple Inc. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 11 matching lines...) Expand all Loading... |
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
27 * THE POSSIBILITY OF SUCH DAMAGE. | 27 * THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #include "PluginTest.h" | 30 #include "PluginTest.h" |
31 | 31 |
| 32 #include <stdint.h> |
| 33 |
32 #include "PluginObject.h" | 34 #include "PluginObject.h" |
33 | 35 |
34 using namespace std; | 36 using namespace std; |
35 | 37 |
36 // NPP_SetWindow should be called with a null window handle as destruction begin
s on non-Mac platforms. | 38 // NPP_SetWindow should be called with a null window handle as destruction begin
s on non-Mac platforms. |
37 | 39 |
38 class NPPSetWindowCalledDuringDestruction : public PluginTest { | 40 class NPPSetWindowCalledDuringDestruction : public PluginTest { |
39 public: | 41 public: |
40 NPPSetWindowCalledDuringDestruction(NPP, const string& identifier); | 42 NPPSetWindowCalledDuringDestruction(NPP, const string& identifier); |
41 | 43 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 { | 122 { |
121 return methodName == pluginTest()->NPN_GetStringIdentifier("setWillBeDestroy
ed"); | 123 return methodName == pluginTest()->NPN_GetStringIdentifier("setWillBeDestroy
ed"); |
122 } | 124 } |
123 | 125 |
124 bool NPPSetWindowCalledDuringDestruction::ScriptObject::invoke(NPIdentifier iden
tifier, const NPVariant*, uint32_t, NPVariant*) | 126 bool NPPSetWindowCalledDuringDestruction::ScriptObject::invoke(NPIdentifier iden
tifier, const NPVariant*, uint32_t, NPVariant*) |
125 { | 127 { |
126 assert(identifier == pluginTest()->NPN_GetStringIdentifier("setWillBeDestroy
ed")); | 128 assert(identifier == pluginTest()->NPN_GetStringIdentifier("setWillBeDestroy
ed")); |
127 static_cast<NPPSetWindowCalledDuringDestruction*>(pluginTest())->setWillBeDe
stroyed(); | 129 static_cast<NPPSetWindowCalledDuringDestruction*>(pluginTest())->setWillBeDe
stroyed(); |
128 return true; | 130 return true; |
129 } | 131 } |
OLD | NEW |