| 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) 2010 Apple Inc. All rights reserved. | 6 * Copyright (C) 2010 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 // Trying to get the user agent with a null instance from NPP_New. | 38 // Trying to get the user agent with a null instance from NPP_New. |
| 37 | 39 |
| 38 class GetUserAgentWithNullNPPFromNPPNew : public PluginTest { | 40 class GetUserAgentWithNullNPPFromNPPNew : public PluginTest { |
| 39 public: | 41 public: |
| 40 GetUserAgentWithNullNPPFromNPPNew(NPP npp, const string& identifier) | 42 GetUserAgentWithNullNPPFromNPPNew(NPP npp, const string& identifier) |
| 41 : PluginTest(npp, identifier) | 43 : PluginTest(npp, identifier) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 53 pluginLog(m_npp, "FAILURE: Null user agent returned."); | 55 pluginLog(m_npp, "FAILURE: Null user agent returned."); |
| 54 else | 56 else |
| 55 pluginLog(m_npp, "SUCCESS!"); | 57 pluginLog(m_npp, "SUCCESS!"); |
| 56 | 58 |
| 57 return NPERR_NO_ERROR; | 59 return NPERR_NO_ERROR; |
| 58 } | 60 } |
| 59 | 61 |
| 60 }; | 62 }; |
| 61 | 63 |
| 62 static PluginTest::Register<GetUserAgentWithNullNPPFromNPPNew> getUserAgentWithN
ullNPPFromNPPNew("get-user-agent-with-null-npp-from-npp-new"); | 64 static PluginTest::Register<GetUserAgentWithNullNPPFromNPPNew> getUserAgentWithN
ullNPPFromNPPNew("get-user-agent-with-null-npp-from-npp-new"); |
| OLD | NEW |