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

Side by Side Diff: chrome/browser/extensions/api/test/test_api.cc

Issue 16174003: Make all tests use GetActiveDesktop() instead of hardcoding HOST_DESKTOP_TYPE_NATIVE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/test/test_api.h" 5 #include "chrome/browser/extensions/api/test/test_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 TestCreateIncognitoTabFunction:: 93 TestCreateIncognitoTabFunction::
94 ~TestCreateIncognitoTabFunction() {} 94 ~TestCreateIncognitoTabFunction() {}
95 95
96 bool TestCreateIncognitoTabFunction::RunImpl() { 96 bool TestCreateIncognitoTabFunction::RunImpl() {
97 scoped_ptr<CreateIncognitoTab::Params> params( 97 scoped_ptr<CreateIncognitoTab::Params> params(
98 CreateIncognitoTab::Params::Create(*args_)); 98 CreateIncognitoTab::Params::Create(*args_));
99 EXTENSION_FUNCTION_VALIDATE(params.get()); 99 EXTENSION_FUNCTION_VALIDATE(params.get());
100 chrome::OpenURLOffTheRecord(profile(), GURL(params->url), 100 chrome::OpenURLOffTheRecord(profile(), GURL(params->url),
101 chrome::HOST_DESKTOP_TYPE_NATIVE); 101 chrome::GetActiveDesktop());
102 return true; 102 return true;
103 } 103 }
104 104
105 bool TestSendMessageFunction::RunImpl() { 105 bool TestSendMessageFunction::RunImpl() {
106 scoped_ptr<PassMessage::Params> params( 106 scoped_ptr<PassMessage::Params> params(
107 PassMessage::Params::Create(*args_)); 107 PassMessage::Params::Create(*args_));
108 EXTENSION_FUNCTION_VALIDATE(params.get()); 108 EXTENSION_FUNCTION_VALIDATE(params.get());
109 AddRef(); // balanced in Reply 109 AddRef(); // balanced in Reply
110 content::NotificationService::current()->Notify( 110 content::NotificationService::current()->Notify(
111 chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE, 111 chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (!test_config_state->config_state()) { 146 if (!test_config_state->config_state()) {
147 error_ = kNoTestConfigDataError; 147 error_ = kNoTestConfigDataError;
148 return false; 148 return false;
149 } 149 }
150 150
151 SetResult(test_config_state->config_state()->DeepCopy()); 151 SetResult(test_config_state->config_state()->DeepCopy());
152 return true; 152 return true;
153 } 153 }
154 154
155 } // namespace extensions 155 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/extensions/extension_context_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698