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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/devtools/devtools_window.h" | 10 #include "chrome/browser/devtools/devtools_window.h" |
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 std::string extension_domain_url(extensions::kExtensionScheme); | 1393 std::string extension_domain_url(extensions::kExtensionScheme); |
1394 extension_domain_url += "://"; | 1394 extension_domain_url += "://"; |
1395 extension_domain_url += extension->id(); | 1395 extension_domain_url += extension->id(); |
1396 extension_domain_url += "/hello.html"; | 1396 extension_domain_url += "/hello.html"; |
1397 params.url = GURL(extension_domain_url); | 1397 params.url = GURL(extension_domain_url); |
1398 Panel* panel = CreatePanelWithParams(params); | 1398 Panel* panel = CreatePanelWithParams(params); |
1399 EXPECT_EQ(1, panel_manager->num_panels()); | 1399 EXPECT_EQ(1, panel_manager->num_panels()); |
1400 | 1400 |
1401 // Create a panel with a non-extension host. | 1401 // Create a panel with a non-extension host. |
1402 CreatePanelParams params1(extension_app_name, gfx::Rect(), SHOW_AS_ACTIVE); | 1402 CreatePanelParams params1(extension_app_name, gfx::Rect(), SHOW_AS_ACTIVE); |
1403 params1.url = GURL(content::kAboutBlankURL); | 1403 params1.url = GURL(url::kAboutBlankURL); |
1404 Panel* panel1 = CreatePanelWithParams(params1); | 1404 Panel* panel1 = CreatePanelWithParams(params1); |
1405 EXPECT_EQ(2, panel_manager->num_panels()); | 1405 EXPECT_EQ(2, panel_manager->num_panels()); |
1406 | 1406 |
1407 // Create another extension and a panel from that extension. | 1407 // Create another extension and a panel from that extension. |
1408 scoped_refptr<extensions::Extension> extension_other = | 1408 scoped_refptr<extensions::Extension> extension_other = |
1409 CreateExtension(FILE_PATH_LITERAL("TestExtensionOther"), | 1409 CreateExtension(FILE_PATH_LITERAL("TestExtensionOther"), |
1410 extensions::Manifest::INTERNAL, empty_value); | 1410 extensions::Manifest::INTERNAL, empty_value); |
1411 std::string extension_app_name_other = | 1411 std::string extension_app_name_other = |
1412 web_app::GenerateApplicationNameFromExtensionId(extension_other->id()); | 1412 web_app::GenerateApplicationNameFromExtensionId(extension_other->id()); |
1413 Panel* panel_other = CreatePanel(extension_app_name_other); | 1413 Panel* panel_other = CreatePanel(extension_app_name_other); |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1781 #else | 1781 #else |
1782 #define MAYBE_FocusChangeEventOnMinimize FocusChangeEventOnMinimize | 1782 #define MAYBE_FocusChangeEventOnMinimize FocusChangeEventOnMinimize |
1783 #endif | 1783 #endif |
1784 IN_PROC_BROWSER_TEST_F(PanelExtensionApiTest, | 1784 IN_PROC_BROWSER_TEST_F(PanelExtensionApiTest, |
1785 MAYBE_FocusChangeEventOnMinimize) { | 1785 MAYBE_FocusChangeEventOnMinimize) { |
1786 // This is needed so the subsequently created panels can be activated. | 1786 // This is needed so the subsequently created panels can be activated. |
1787 // On a Mac, it transforms background-only test process into foreground one. | 1787 // On a Mac, it transforms background-only test process into foreground one. |
1788 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 1788 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
1789 ASSERT_TRUE(RunExtensionTest("panels/focus_change_on_minimize")) << message_; | 1789 ASSERT_TRUE(RunExtensionTest("panels/focus_change_on_minimize")) << message_; |
1790 } | 1790 } |
OLD | NEW |