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

Side by Side Diff: chrome/browser/extensions/api/omnibox/omnibox_unittest.cc

Issue 10265022: Moving extensions inside chrome/browser/extensions/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-synced with the current trunk Created 8 years, 7 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/values.h" 5 #include "base/values.h"
6 #include "chrome/browser/extensions/extension_omnibox_api.h" 6 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "testing/platform_test.h" 8 #include "testing/platform_test.h"
9 9
10 namespace extensions {
11
10 namespace { 12 namespace {
11 13
12 const int kNone = ACMatchClassification::NONE; 14 const int kNone = ACMatchClassification::NONE;
13 const int kUrl = ACMatchClassification::URL; 15 const int kUrl = ACMatchClassification::URL;
14 const int kMatch = ACMatchClassification::MATCH; 16 const int kMatch = ACMatchClassification::MATCH;
15 const int kDim = ACMatchClassification::DIM; 17 const int kDim = ACMatchClassification::DIM;
16 18
17 void AppendStyle(const std::string& type, 19 void AppendStyle(const std::string& type,
18 int offset, int length, 20 int offset, int length,
19 ListValue* styles) { 21 ListValue* styles) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 126
125 ACMatchClassifications styles_expected; 127 ACMatchClassifications styles_expected;
126 styles_expected.push_back(ACMatchClassification(0, kUrl | kMatch | kDim)); 128 styles_expected.push_back(ACMatchClassification(0, kUrl | kMatch | kDim));
127 styles_expected.push_back(ACMatchClassification(5, kNone)); 129 styles_expected.push_back(ACMatchClassification(5, kNone));
128 130
129 ExtensionOmniboxSuggestion suggestions; 131 ExtensionOmniboxSuggestion suggestions;
130 suggestions.description.resize(10); 132 suggestions.description.resize(10);
131 EXPECT_TRUE(suggestions.ReadStylesFromValue(styles_value)); 133 EXPECT_TRUE(suggestions.ReadStylesFromValue(styles_value));
132 CompareClassification(styles_expected, suggestions.description_styles); 134 CompareClassification(styles_expected, suggestions.description_styles);
133 } 135 }
136
137 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_apitest.cc ('k') | chrome/browser/extensions/extension_function_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698