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

Side by Side Diff: content/browser/plugin_service_browsertest.cc

Issue 7230052: Make kClearSiteDataOnExit work correctly for Flash in multi-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/plugin_service.h" 5 #include "content/browser/plugin_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/test/in_process_browser_test.h" 9 #include "chrome/test/in_process_browser_test.h"
10 #include "chrome/test/ui_test_utils.h" 10 #include "chrome/test/ui_test_utils.h"
(...skipping 16 matching lines...) Expand all
27 set_plugin_info_called_(false) { 27 set_plugin_info_called_(false) {
28 } 28 }
29 29
30 virtual ~MockPluginProcessHostClient() { 30 virtual ~MockPluginProcessHostClient() {
31 if (channel_) 31 if (channel_)
32 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, channel_); 32 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, channel_);
33 } 33 }
34 34
35 // Client implementation. 35 // Client implementation.
36 int ID() { return 42; } 36 int ID() { return 42; }
37 bool SaveLocalState() { return true; }
37 bool OffTheRecord() { return false; } 38 bool OffTheRecord() { return false; }
38 39
39 void OnChannelOpened(const IPC::ChannelHandle& handle) { 40 void OnChannelOpened(const IPC::ChannelHandle& handle) {
40 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); 41 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
41 ASSERT_TRUE(set_plugin_info_called_); 42 ASSERT_TRUE(set_plugin_info_called_);
42 ASSERT_TRUE(!channel_); 43 ASSERT_TRUE(!channel_);
43 channel_ = new IPC::Channel(handle, IPC::Channel::MODE_CLIENT, this); 44 channel_ = new IPC::Channel(handle, IPC::Channel::MODE_CLIENT, this);
44 ASSERT_TRUE(channel_->Connect()); 45 ASSERT_TRUE(channel_->Connect());
45 } 46 }
46 47
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 }; 86 };
86 87
87 // Try to open a channel to the test plugin. Minimal plugin process spawning 88 // Try to open a channel to the test plugin. Minimal plugin process spawning
88 // test for the PluginService interface. 89 // test for the PluginService interface.
89 IN_PROC_BROWSER_TEST_F(PluginServiceTest, OpenChannelToPlugin) { 90 IN_PROC_BROWSER_TEST_F(PluginServiceTest, OpenChannelToPlugin) {
90 MockPluginProcessHostClient mock_client; 91 MockPluginProcessHostClient mock_client;
91 PluginService::GetInstance()->OpenChannelToNpapiPlugin( 92 PluginService::GetInstance()->OpenChannelToNpapiPlugin(
92 0, 0, GURL(), kNPAPITestPluginMimeType, &mock_client); 93 0, 0, GURL(), kNPAPITestPluginMimeType, &mock_client);
93 ui_test_utils::RunMessageLoop(); 94 ui_test_utils::RunMessageLoop();
94 } 95 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698