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

Side by Side Diff: gpu/config/gpu_control_list_unittest.cc

Issue 1247093006: Allow WebGL on Android if the GPU has it's own process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back in EXT_robustness exceptions Created 5 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
« no previous file with comments | « gpu/config/gpu_control_list.cc ('k') | gpu/config/gpu_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "gpu/config/gpu_control_list.h" 8 #include "gpu/config/gpu_control_list.h"
9 #include "gpu/config/gpu_info.h" 9 #include "gpu/config/gpu_info.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 std::vector<std::string> disabled_extensions = 621 std::vector<std::string> disabled_extensions =
622 control_list->GetDisabledExtensions(); 622 control_list->GetDisabledExtensions();
623 623
624 ASSERT_EQ(3u, disabled_extensions.size()); 624 ASSERT_EQ(3u, disabled_extensions.size());
625 ASSERT_STREQ("test_extension1", disabled_extensions[0].c_str()); 625 ASSERT_STREQ("test_extension1", disabled_extensions[0].c_str());
626 ASSERT_STREQ("test_extension2", disabled_extensions[1].c_str()); 626 ASSERT_STREQ("test_extension2", disabled_extensions[1].c_str());
627 ASSERT_STREQ("test_extension3", disabled_extensions[2].c_str()); 627 ASSERT_STREQ("test_extension3", disabled_extensions[2].c_str());
628 } 628 }
629 629
630 TEST_F(GpuControlListTest, DisabledInProcessGPUTest) {
631 const std::string exact_list_json = LONG_STRING_CONST(
632 {
633 "name": "gpu control list",
634 "version": "0.1",
635 "entries": [
636 {
637 "id": 1,
638 "os": {
639 "type": "win"
640 },
641 "in_process_gpu": true,
642 "features": [
643 "test_feature_0"
644 ]
645 }
646 ]
647 }
648 );
649 scoped_ptr<GpuControlList> control_list(Create());
650
651 EXPECT_TRUE(control_list->LoadList(exact_list_json, GpuControlList::kAllOs));
652 GPUInfo gpu_info;
653
654 gpu_info.in_process_gpu = true;
655 std::set<int> features = control_list->MakeDecision(
656 GpuControlList::kOsWin, kOsVersion, gpu_info);
657 EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0);
658
659 gpu_info.in_process_gpu = false;
660 features = control_list->MakeDecision(
661 GpuControlList::kOsWin, kOsVersion, gpu_info);
662 EXPECT_EMPTY_SET(features);
663 }
664
630 } // namespace gpu 665 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_control_list.cc ('k') | gpu/config/gpu_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698