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

Side by Side Diff: webkit/glue/plugins/test/plugin_geturl_test.h

Issue 6012002: Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_GETURL_TEST_H__
6 #define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_GETURL_TEST_H__
7
8 #include <stdio.h>
9
10 #include "webkit/glue/plugins/test/plugin_test.h"
11
12 namespace NPAPIClient {
13
14 // The PluginGetURLTest test functionality of the NPN_GetURL
15 // and NPN_GetURLNotify methods.
16 //
17 // This test first discovers it's URL by sending a GetURL request
18 // for 'javascript:top.location'. After receiving that, the
19 // test will request the url itself (again via GetURL).
20 class PluginGetURLTest : public PluginTest {
21 public:
22 // Constructor.
23 PluginGetURLTest(NPP id, NPNetscapeFuncs *host_functions);
24
25 //
26 // NPAPI functions
27 //
28 virtual NPError New(uint16 mode, int16 argc, const char* argn[],
29 const char* argv[], NPSavedData* saved);
30 virtual NPError SetWindow(NPWindow* pNPWindow);
31 virtual NPError NewStream(NPMIMEType type, NPStream* stream,
32 NPBool seekable, uint16* stype);
33 virtual int32 WriteReady(NPStream *stream);
34 virtual int32 Write(NPStream *stream, int32 offset, int32 len,
35 void *buffer);
36 virtual NPError DestroyStream(NPStream *stream, NPError reason);
37 virtual void StreamAsFile(NPStream* stream, const char* fname);
38 virtual void URLNotify(const char* url, NPReason reason, void* data);
39 virtual void URLRedirectNotify(const char* url, int32_t status,
40 void* notify_data);
41
42 private:
43 bool tests_started_;
44 int tests_in_progress_;
45 std::string self_url_;
46 FILE* test_file_;
47 bool expect_404_response_;
48 // This flag is set to true in the context of the NPN_Evaluate call.
49 bool npn_evaluate_context_;
50 // The following two flags handle URL redirect notifications received by
51 // plugins.
52 bool handle_url_redirects_;
53 bool received_url_redirect_notification_;
54 std::string page_not_found_url_;
55 std::string fail_write_url_;
56 std::string referrer_target_url_;
57 };
58
59 } // namespace NPAPIClient
60
61 #endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_GETURL_TEST_H__
OLDNEW
« no previous file with comments | « webkit/glue/plugins/test/plugin_get_javascript_url_test.cc ('k') | webkit/glue/plugins/test/plugin_geturl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698