OLD | NEW |
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 "app/menus/menu_model.h" | 5 #include "app/menus/menu_model.h" |
| 6 #include "base/utf_string_conversions.h" |
6 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
7 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
8 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
9 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
10 #include "chrome/browser/extensions/extensions_service.h" | 11 #include "chrome/browser/extensions/extensions_service.h" |
11 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 13 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
13 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
14 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 // Wait for the extension's script to tell us its onclick fired. Ensure | 421 // Wait for the extension's script to tell us its onclick fired. Ensure |
421 // that the incognito version doesn't fire until we explicitly click the | 422 // that the incognito version doesn't fire until we explicitly click the |
422 // incognito menu item. | 423 // incognito menu item. |
423 ASSERT_TRUE(onclick.WaitUntilSatisfied()); | 424 ASSERT_TRUE(onclick.WaitUntilSatisfied()); |
424 EXPECT_FALSE(onclick_incognito.was_satisfied()); | 425 EXPECT_FALSE(onclick_incognito.was_satisfied()); |
425 | 426 |
426 ASSERT_TRUE(menu_incognito->IsCommandIdEnabled(command_id)); | 427 ASSERT_TRUE(menu_incognito->IsCommandIdEnabled(command_id)); |
427 menu_incognito->ExecuteCommand(command_id); | 428 menu_incognito->ExecuteCommand(command_id); |
428 ASSERT_TRUE(onclick_incognito.WaitUntilSatisfied()); | 429 ASSERT_TRUE(onclick_incognito.WaitUntilSatisfied()); |
429 } | 430 } |
OLD | NEW |