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

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

Issue 1073003: Added a test for pepper3d. It ensures that we can successfully load a pepper ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 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 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 #include "webkit/glue/plugins/test/plugin_geturl_test.h" 5 #include "webkit/glue/plugins/test/plugin_geturl_test.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const char* referrer_target_url = GetArgValue("ref_target", argc, 57 const char* referrer_target_url = GetArgValue("ref_target", argc,
58 argn, argv); 58 argn, argv);
59 if (referrer_target_url) { 59 if (referrer_target_url) {
60 referrer_target_url_ = referrer_target_url; 60 referrer_target_url_ = referrer_target_url;
61 } 61 }
62 62
63 return PluginTest::New(mode, argc, argn, argv, saved); 63 return PluginTest::New(mode, argc, argn, argv, saved);
64 } 64 }
65 65
66 NPError PluginGetURLTest::SetWindow(NPWindow* pNPWindow) { 66 NPError PluginGetURLTest::SetWindow(NPWindow* pNPWindow) {
67 if (pNPWindow->window == NULL)
68 return NPERR_NO_ERROR;
69
67 if (!tests_started_) { 70 if (!tests_started_) {
68 tests_started_ = true; 71 tests_started_ = true;
69 72
70 tests_in_progress_++; 73 tests_in_progress_++;
71 74
72 if (expect_404_response_) { 75 if (expect_404_response_) {
73 HostFunctions()->geturl(id(), page_not_found_url_.c_str(), NULL); 76 HostFunctions()->geturl(id(), page_not_found_url_.c_str(), NULL);
74 return NPERR_NO_ERROR; 77 return NPERR_NO_ERROR;
75 } else if (!fail_write_url_.empty()) { 78 } else if (!fail_write_url_.empty()) {
76 HostFunctions()->geturl(id(), fail_write_url_.c_str(), NULL); 79 HostFunctions()->geturl(id(), fail_write_url_.c_str(), NULL);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 default: 358 default:
356 SetError("Unexpected NewStream callback"); 359 SetError("Unexpected NewStream callback");
357 break; 360 break;
358 } 361 }
359 362
360 if (tests_in_progress_ == 0) 363 if (tests_in_progress_ == 0)
361 SignalTestCompleted(); 364 SignalTestCompleted();
362 } 365 }
363 366
364 } // namespace NPAPIClient 367 } // namespace NPAPIClient
OLDNEW
« no previous file with comments | « webkit/glue/plugins/test/plugin_get_javascript_url_test.cc ('k') | webkit/glue/plugins/test/plugin_javascript_open_popup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698