OLD | NEW |
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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/app/chrome_command_ids.h" | 6 #include "chrome/app/chrome_command_ids.h" |
7 #include "chrome/browser/extensions/extension_browsertest.h" | 7 #include "chrome/browser/extensions/extension_browsertest.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
10 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
11 #include "chrome/browser/extensions/lazy_background_page_test_util.h" | 11 #include "chrome/browser/extensions/lazy_background_page_test_util.h" |
12 #include "chrome/browser/extensions/test_management_policy.h" | 12 #include "chrome/browser/extensions/test_management_policy.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 14 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
19 #include "content/public/common/context_menu_params.h" | 19 #include "content/public/common/context_menu_params.h" |
20 #include "net/base/mock_host_resolver.h" | 20 #include "net/dns/mock_host_resolver.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" |
22 #include "ui/base/models/menu_model.h" | 22 #include "ui/base/models/menu_model.h" |
23 | 23 |
24 using WebKit::WebContextMenuData; | 24 using WebKit::WebContextMenuData; |
25 using content::WebContents; | 25 using content::WebContents; |
26 using extensions::MenuItem; | 26 using extensions::MenuItem; |
27 using ui::MenuModel; | 27 using ui::MenuModel; |
28 | 28 |
29 namespace { | 29 namespace { |
30 // This test class helps us sidestep platform-specific issues with popping up a | 30 // This test class helps us sidestep platform-specific issues with popping up a |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 ASSERT_TRUE(LoadContextMenuExtensionIncognito("incognito")); | 580 ASSERT_TRUE(LoadContextMenuExtensionIncognito("incognito")); |
581 | 581 |
582 // Wait for the extension's processes to tell us they've created an item. | 582 // Wait for the extension's processes to tell us they've created an item. |
583 ASSERT_TRUE(created.WaitUntilSatisfied()); | 583 ASSERT_TRUE(created.WaitUntilSatisfied()); |
584 ASSERT_TRUE(created_incognito.WaitUntilSatisfied()); | 584 ASSERT_TRUE(created_incognito.WaitUntilSatisfied()); |
585 ASSERT_EQ(2u, GetItems().size()); | 585 ASSERT_EQ(2u, GetItems().size()); |
586 | 586 |
587 browser()->profile()->DestroyOffTheRecordProfile(); | 587 browser()->profile()->DestroyOffTheRecordProfile(); |
588 ASSERT_EQ(1u, GetItems().size()); | 588 ASSERT_EQ(1u, GetItems().size()); |
589 } | 589 } |
OLD | NEW |