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

Side by Side Diff: tools/json_schema_compiler/test/features_generation_unittest.cc

Issue 2542163002: Fix invalid casts from ComplexFeature to SimpleFeature. (Closed)
Patch Set: Remove unnecessary casts 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "extensions/common/features/api_feature.h" 5 #include "extensions/common/features/api_feature.h"
6 #include "extensions/common/features/complex_feature.h" 6 #include "extensions/common/features/complex_feature.h"
7 #include "extensions/common/features/feature.h" 7 #include "extensions/common/features/feature.h"
8 #include "extensions/common/features/simple_feature.h" 8 #include "extensions/common/features/simple_feature.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "tools/json_schema_compiler/test/features_compiler_test.h" 10 #include "tools/json_schema_compiler/test/features_compiler_test.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 { 280 {
281 APIFeature* feature = GetAPIFeature("alias_source"); 281 APIFeature* feature = GetAPIFeature("alias_source");
282 FeatureComparator comparator("alias_source"); 282 FeatureComparator comparator("alias_source");
283 comparator.contexts = {Feature::BLESSED_EXTENSION_CONTEXT}; 283 comparator.contexts = {Feature::BLESSED_EXTENSION_CONTEXT};
284 comparator.channel.reset( 284 comparator.channel.reset(
285 new version_info::Channel(version_info::Channel::STABLE)); 285 new version_info::Channel(version_info::Channel::STABLE));
286 comparator.alias = "alias"; 286 comparator.alias = "alias";
287 comparator.CompareFeature(feature); 287 comparator.CompareFeature(feature);
288 } 288 }
289 { 289 {
290 Feature* feature = GetAPIFeature("complex_alias"); 290 Feature* feature = provider.GetFeature("complex_alias");
291 ASSERT_EQ("", feature->alias()); 291 ASSERT_EQ("", feature->alias());
292 ASSERT_EQ("complex_alias_source", feature->source()); 292 ASSERT_EQ("complex_alias_source", feature->source());
293 } 293 }
294 { 294 {
295 Feature* feature = GetAPIFeature("complex_alias_source"); 295 Feature* feature = provider.GetFeature("complex_alias_source");
296 ASSERT_EQ("complex_alias", feature->alias()); 296 ASSERT_EQ("complex_alias", feature->alias());
297 ASSERT_EQ("", feature->source()); 297 ASSERT_EQ("", feature->source());
298 } 298 }
299 { 299 {
300 Feature* feature = GetAPIFeature("parent_source"); 300 Feature* feature = GetAPIFeature("parent_source");
301 ASSERT_EQ("parent_source_alias", feature->alias()); 301 ASSERT_EQ("parent_source_alias", feature->alias());
302 ASSERT_EQ("", feature->source()); 302 ASSERT_EQ("", feature->source());
303 } 303 }
304 { 304 {
305 Feature* feature = GetAPIFeature("parent_source.child"); 305 Feature* feature = GetAPIFeature("parent_source.child");
(...skipping 11 matching lines...) Expand all
317 ASSERT_EQ("", feature->source()); 317 ASSERT_EQ("", feature->source());
318 } 318 }
319 { 319 {
320 Feature* feature = GetAPIFeature("alias_parent.child"); 320 Feature* feature = GetAPIFeature("alias_parent.child");
321 ASSERT_EQ("", feature->alias()); 321 ASSERT_EQ("", feature->alias());
322 ASSERT_EQ("child_source", feature->source()); 322 ASSERT_EQ("child_source", feature->source());
323 } 323 }
324 } 324 }
325 325
326 } // namespace extensions 326 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698