Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: content/shell/tools/plugin/Tests/EvaluateJSWithinNPP_New.cpp

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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) 2012 Apple Inc. All rights reserved. 6 * Copyright (C) 2012 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
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 // Executing JS within NPP_New when initializing asynchronously should not be ab le to deadlock with the WebProcess 38 // Executing JS within NPP_New when initializing asynchronously should not be ab le to deadlock with the WebProcess
37 39
38 class EvaluteJSWithinNPP_New : public PluginTest { 40 class EvaluteJSWithinNPP_New : public PluginTest {
39 public: 41 public:
40 EvaluteJSWithinNPP_New(NPP, const string& identifier); 42 EvaluteJSWithinNPP_New(NPP, const string& identifier);
41 43
42 private: 44 private:
43 virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData *); 45 virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData *);
44 46
45 }; 47 };
46 48
47 EvaluteJSWithinNPP_New::EvaluteJSWithinNPP_New(NPP npp, const string& identifier ) 49 EvaluteJSWithinNPP_New::EvaluteJSWithinNPP_New(NPP npp, const string& identifier )
48 : PluginTest(npp, identifier) 50 : PluginTest(npp, identifier)
49 { 51 {
50 } 52 }
51 53
52 NPError EvaluteJSWithinNPP_New::NPP_New(NPMIMEType pluginType, uint16_t mode, in t16_t argc, char* argn[], char* argv[], NPSavedData *saved) 54 NPError EvaluteJSWithinNPP_New::NPP_New(NPMIMEType pluginType, uint16_t mode, in t16_t argc, char* argn[], char* argv[], NPSavedData *saved)
53 { 55 {
54 // Give the WebProcess enough time to be deadlocked waiting for the PluginPr ocess. 56 // Give the WebProcess enough time to be deadlocked waiting for the PluginPr ocess.
55 usleep(15000); 57 usleep(15000);
56 executeScript("var theLocation = window.location;"); 58 executeScript("var theLocation = window.location;");
57 return NPERR_NO_ERROR; 59 return NPERR_NO_ERROR;
58 } 60 }
59 61
60 static PluginTest::Register<EvaluteJSWithinNPP_New> registrar("evalute-js-within -npp-new"); 62 static PluginTest::Register<EvaluteJSWithinNPP_New> registrar("evalute-js-within -npp-new");
OLDNEW
« no previous file with comments | « content/shell/tools/plugin/TestObject.cpp ('k') | content/shell/tools/plugin/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698