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

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu_unittest.cc

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hate Created 8 years, 1 month 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) 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 "chrome/browser/tab_contents/render_view_context_menu.h" 5 #include "chrome/browser/tab_contents/render_view_context_menu.h"
6 6
7 #include "chrome/browser/extensions/extension_prefs.h" 7 #include "chrome/browser/extensions/extension_prefs.h"
8 #include "extensions/common/url_pattern.h" 8 #include "extensions/common/url_pattern.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
12 12
13 using extensions::MenuItem; 13 using extensions::MenuItem;
14 using extensions::URLPatternSet;
14 15
15 class RenderViewContextMenuTest : public testing::Test { 16 class RenderViewContextMenuTest : public testing::Test {
16 public: 17 public:
17 RenderViewContextMenuTest() { } 18 RenderViewContextMenuTest() { }
18 19
19 protected: 20 protected:
20 // Proxy defined here to minimize friend classes in RenderViewContextMenu 21 // Proxy defined here to minimize friend classes in RenderViewContextMenu
21 static bool ExtensionContextAndPatternMatch( 22 static bool ExtensionContextAndPatternMatch(
22 const content::ContextMenuParams& params, 23 const content::ContextMenuParams& params,
23 MenuItem::ContextList contexts, 24 MenuItem::ContextList contexts,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 MenuItem::SELECTION | MenuItem::IMAGE); 230 MenuItem::SELECTION | MenuItem::IMAGE);
230 231
231 MenuItem::ContextList contexts; 232 MenuItem::ContextList contexts;
232 contexts.Add(MenuItem::SELECTION); 233 contexts.Add(MenuItem::SELECTION);
233 contexts.Add(MenuItem::IMAGE); 234 contexts.Add(MenuItem::IMAGE);
234 235
235 URLPatternSet patterns = CreatePatternSet("*://test.none/*"); 236 URLPatternSet patterns = CreatePatternSet("*://test.none/*");
236 237
237 EXPECT_TRUE(ExtensionContextAndPatternMatch(params, contexts, patterns)); 238 EXPECT_TRUE(ExtensionContextAndPatternMatch(params, contexts, patterns));
238 } 239 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/browser/ui/webui/options/content_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698