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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 webgl_allowed = false; 395 webgl_allowed = false;
396 396
397 static const char kEmptyArgs[] = "[]"; 397 static const char kEmptyArgs[] = "[]";
398 static const char kWebGLStatusAllowed[] = "webgl_allowed"; 398 static const char kWebGLStatusAllowed[] = "webgl_allowed";
399 static const char kWebGLStatusBlocked[] = "webgl_blocked"; 399 static const char kWebGLStatusBlocked[] = "webgl_blocked";
400 scoped_refptr<WebstorePrivateGetWebGLStatusFunction> function = 400 scoped_refptr<WebstorePrivateGetWebGLStatusFunction> function =
401 new WebstorePrivateGetWebGLStatusFunction(); 401 new WebstorePrivateGetWebGLStatusFunction();
402 std::unique_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( 402 std::unique_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult(
403 function.get(), kEmptyArgs, browser())); 403 function.get(), kEmptyArgs, browser()));
404 ASSERT_TRUE(result); 404 ASSERT_TRUE(result);
405 EXPECT_EQ(base::Value::TYPE_STRING, result->GetType()); 405 EXPECT_EQ(base::Value::Type::STRING, result->GetType());
406 std::string webgl_status; 406 std::string webgl_status;
407 EXPECT_TRUE(result->GetAsString(&webgl_status)); 407 EXPECT_TRUE(result->GetAsString(&webgl_status));
408 EXPECT_STREQ(webgl_allowed ? kWebGLStatusAllowed : kWebGLStatusBlocked, 408 EXPECT_STREQ(webgl_allowed ? kWebGLStatusAllowed : kWebGLStatusBlocked,
409 webgl_status.c_str()); 409 webgl_status.c_str());
410 } 410 }
411 }; 411 };
412 412
413 // Tests getWebGLStatus function when WebGL is allowed. 413 // Tests getWebGLStatus function when WebGL is allowed.
414 IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Allowed) { 414 IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Allowed) {
415 bool webgl_allowed = true; 415 bool webgl_allowed = true;
(...skipping 19 matching lines...) Expand all
435 content::GpuDataManager::GetInstance()->InitializeForTesting( 435 content::GpuDataManager::GetInstance()->InitializeForTesting(
436 json_blacklist, gpu_info); 436 json_blacklist, gpu_info);
437 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( 437 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted(
438 gpu::GPU_FEATURE_TYPE_WEBGL)); 438 gpu::GPU_FEATURE_TYPE_WEBGL));
439 439
440 bool webgl_allowed = false; 440 bool webgl_allowed = false;
441 RunTest(webgl_allowed); 441 RunTest(webgl_allowed);
442 } 442 }
443 443
444 } // namespace extensions 444 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_api_unittest.cc ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698