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

Side by Side Diff: chrome/test/ui/npapi_uitest.cc

Issue 332013: Add a regression test for the PluginChannel::CleanUp. My earlier speculative... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // windows headers 5 // windows headers
6 #include <windows.h> 6 #include <windows.h>
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <comutil.h> 9 #include <comutil.h>
10 10
11 // runtime headers 11 // runtime headers
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <string.h> 13 #include <string.h>
14 #include <memory.h> 14 #include <memory.h>
15 15
16 #include <ostream> 16 #include <ostream>
17 17
18 #include "base/file_util.h" 18 #include "base/file_util.h"
19 #include "base/keyboard_codes.h" 19 #include "base/keyboard_codes.h"
20 #include "chrome/browser/net/url_request_mock_http_job.h" 20 #include "chrome/browser/net/url_request_mock_http_job.h"
21 #include "chrome/common/chrome_paths.h" 21 #include "chrome/common/chrome_paths.h"
22 #include "chrome/common/url_constants.h"
23 #include "chrome/test/automation/browser_proxy.h"
22 #include "chrome/test/automation/tab_proxy.h" 24 #include "chrome/test/automation/tab_proxy.h"
23 #include "chrome/test/automation/window_proxy.h" 25 #include "chrome/test/automation/window_proxy.h"
24 #include "chrome/test/ui/npapi_test_helper.h" 26 #include "chrome/test/ui/npapi_test_helper.h"
25 #include "net/base/net_util.h" 27 #include "net/base/net_util.h"
26 28
27 const char kTestCompleteCookie[] = "status"; 29 const char kTestCompleteCookie[] = "status";
28 const char kTestCompleteSuccess[] = "OK"; 30 const char kTestCompleteSuccess[] = "OK";
29 const int kLongWaitTimeout = 30 * 1000; 31 const int kLongWaitTimeout = 30 * 1000;
30 const int kShortWaitTimeout = 5 * 1000; 32 const int kShortWaitTimeout = 5 * 1000;
31 33
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 SetEvent(crash_event); 358 SetEvent(crash_event);
357 GURL url = GetTestUrl(L"npapi", L"no_hang_if_init_crashes.html"); 359 GURL url = GetTestUrl(L"npapi", L"no_hang_if_init_crashes.html");
358 NavigateToURL(url); 360 NavigateToURL(url);
359 WaitForFinish("no_hang_if_init_crashes", "1", url, 361 WaitForFinish("no_hang_if_init_crashes", "1", url,
360 kTestCompleteCookie, kTestCompleteSuccess, 362 kTestCompleteCookie, kTestCompleteSuccess,
361 kShortWaitTimeout); 363 kShortWaitTimeout);
362 CloseHandle(crash_event); 364 CloseHandle(crash_event);
363 } 365 }
364 366
365 #endif 367 #endif
368
369 TEST_F(NPAPITester, NPObjectReleasedOnDestruction) {
370 if (UITest::in_process_renderer())
371 return;
372
373 GURL url = GetTestUrl(L"npapi", L"npobject_released_on_destruction.html");
374 NavigateToURL(url);
375
376 scoped_refptr<BrowserProxy> window_proxy(automation()->GetBrowserWindow(0));
377 window_proxy->AppendTab(GURL(chrome::kAboutBlankURL));
378
379 scoped_refptr<TabProxy> tab_proxy(window_proxy->GetTab(0));
380 tab_proxy->Close(true);
381 }
OLDNEW
« no previous file with comments | « chrome/test/data/npapi/npobject_released_on_destruction.html ('k') | webkit/tools/npapi_layout_test_plugin/TestObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698