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

Side by Side Diff: chrome/browser/extensions/extension_messages_apitest.cc

Issue 16844020: app_mode: Add runtime.onRestartRequired event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/event_router.h" 10 #include "chrome/browser/extensions/event_router.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 "onStartup", 168 "onStartup",
169 "onInstalled", 169 "onInstalled",
170 "onSuspend", 170 "onSuspend",
171 "onSuspendCanceled", 171 "onSuspendCanceled",
172 "onUpdateAvailable", 172 "onUpdateAvailable",
173 "onBrowserUpdateAvailable", 173 "onBrowserUpdateAvailable",
174 "onConnect", 174 "onConnect",
175 "onConnectExternal", 175 "onConnectExternal",
176 "onMessage", 176 "onMessage",
177 "onMessageExternal", 177 "onMessageExternal",
178 "onRestartRequired",
178 "id", 179 "id",
179 }; 180 };
180 181
181 // Turn the array into a JS array, which effectively gets eval()ed. 182 // Turn the array into a JS array, which effectively gets eval()ed.
182 std::string as_js_array; 183 std::string as_js_array;
183 for (size_t i = 0; i < arraysize(non_messaging_apis); ++i) { 184 for (size_t i = 0; i < arraysize(non_messaging_apis); ++i) {
184 as_js_array += as_js_array.empty() ? "[" : ","; 185 as_js_array += as_js_array.empty() ? "[" : ",";
185 as_js_array += base::StringPrintf("'%s'", non_messaging_apis[i]); 186 as_js_array += base::StringPrintf("'%s'", non_messaging_apis[i]);
186 } 187 }
187 as_js_array += "]"; 188 as_js_array += "]";
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // will no longer exist. 307 // will no longer exist.
307 DisableExtension(web_connectable->id()); 308 DisableExtension(web_connectable->id());
308 EXPECT_EQ(NAMESPACE_NOT_DEFINED, 309 EXPECT_EQ(NAMESPACE_NOT_DEFINED,
309 CanConnectAndSendMessages(web_connectable->id())); 310 CanConnectAndSendMessages(web_connectable->id()));
310 311
311 EnableExtension(web_connectable->id()); 312 EnableExtension(web_connectable->id());
312 EXPECT_EQ(OK, CanConnectAndSendMessages(web_connectable->id())); 313 EXPECT_EQ(OK, CanConnectAndSendMessages(web_connectable->id()));
313 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR, 314 EXPECT_EQ(COULD_NOT_ESTABLISH_CONNECTION_ERROR,
314 CanConnectAndSendMessages(not_connectable->id())); 315 CanConnectAndSendMessages(not_connectable->id()));
315 } 316 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/runtime/runtime_api.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698