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

Side by Side Diff: chrome/browser/extensions/api/context_menus/context_menu_apitest.cc

Issue 11826048: Revert 176015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/extension_action.h"
6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/test/base/ui_test_utils.h"
11
12 namespace extensions {
13
14 // Times out on win asan, http://crbug.com/166026
15 #if defined(OS_WIN) && defined(ADDRESS_SANITIZER)
16 #define MAYBE_ContextMenus DISABLED_ContextMenus
17 #else
18 #define MAYBE_ContextMenus ContextMenus
19 #endif
20 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_ContextMenus) {
21 ASSERT_TRUE(RunExtensionTest("context_menus/basics")) << message_;
22 ASSERT_TRUE(RunExtensionTest("context_menus/no_perms")) << message_;
23 ASSERT_TRUE(RunExtensionTest("context_menus/item_ids")) << message_;
24 ASSERT_TRUE(RunExtensionTest("context_menus/event_page")) << message_;
25 }
26
27 // crbug.com/51436 -- creating context menus from multiple script contexts
28 // should work.
29 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContextMenusFromMultipleContexts) {
30 ASSERT_TRUE(test_server()->Start());
31 ASSERT_TRUE(RunExtensionTest("context_menus/add_from_multiple_contexts"))
32 << message_;
33 const extensions::Extension* extension = GetSingleLoadedExtension();
34 ASSERT_TRUE(extension) << message_;
35
36 {
37 // Tell the extension to update the page action state.
38 ResultCatcher catcher;
39 ui_test_utils::NavigateToURL(browser(),
40 extension->GetResourceURL("popup.html"));
41 ASSERT_TRUE(catcher.GetNextResult());
42 }
43
44 {
45 // Tell the extension to update the page action state again.
46 ResultCatcher catcher;
47 ui_test_utils::NavigateToURL(browser(),
48 extension->GetResourceURL("popup2.html"));
49 ASSERT_TRUE(catcher.GetNextResult());
50 }
51 }
52
53 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698