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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Indentation fixes and comment. Created 8 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
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 <vector> 5 #include <vector>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "chrome/browser/extensions/bundle_installer.h" 10 #include "chrome/browser/extensions/bundle_installer.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 command_line, gfx::kGLImplementationOSMesaName)) << 238 command_line, gfx::kGLImplementationOSMesaName)) <<
239 "kUseGL must not be set multiple times!"; 239 "kUseGL must not be set multiple times!";
240 #endif 240 #endif
241 } 241 }
242 242
243 protected: 243 protected:
244 void RunTest(bool webgl_allowed) { 244 void RunTest(bool webgl_allowed) {
245 static const char kEmptyArgs[] = "[]"; 245 static const char kEmptyArgs[] = "[]";
246 static const char kWebGLStatusAllowed[] = "webgl_allowed"; 246 static const char kWebGLStatusAllowed[] = "webgl_allowed";
247 static const char kWebGLStatusBlocked[] = "webgl_blocked"; 247 static const char kWebGLStatusBlocked[] = "webgl_blocked";
248 scoped_ptr<base::Value> result(utils::RunFunctionAndReturnResult( 248 scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult(
249 new GetWebGLStatusFunction(), kEmptyArgs, browser())); 249 new GetWebGLStatusFunction(), kEmptyArgs, browser()));
250 EXPECT_EQ(base::Value::TYPE_STRING, result->GetType()); 250 EXPECT_EQ(base::Value::TYPE_STRING, result->GetType());
251 StringValue* value = static_cast<StringValue*>(result.get()); 251 StringValue* value = static_cast<StringValue*>(result.get());
252 std::string webgl_status = ""; 252 std::string webgl_status = "";
253 EXPECT_TRUE(value && value->GetAsString(&webgl_status)); 253 EXPECT_TRUE(value && value->GetAsString(&webgl_status));
254 EXPECT_STREQ(webgl_allowed ? kWebGLStatusAllowed : kWebGLStatusBlocked, 254 EXPECT_STREQ(webgl_allowed ? kWebGLStatusAllowed : kWebGLStatusBlocked,
255 webgl_status.c_str()); 255 webgl_status.c_str());
256 } 256 }
257 }; 257 };
258 258
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 blacklist->UpdateGpuDataManager(); 453 blacklist->UpdateGpuDataManager();
454 GpuFeatureType type = 454 GpuFeatureType type =
455 content::GpuDataManager::GetInstance()->GetGpuFeatureType(); 455 content::GpuDataManager::GetInstance()->GetGpuFeatureType();
456 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL); 456 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL);
457 457
458 bool webgl_allowed = false; 458 bool webgl_allowed = false;
459 RunTest(webgl_allowed); 459 RunTest(webgl_allowed);
460 } 460 }
461 461
462 } // namespace extensions 462 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698