OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/strings/stringprintf.h" | 5 #include "base/strings/stringprintf.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "base/win/windows_version.h" | 7 #include "base/win/windows_version.h" |
8 #include "chrome/browser/apps/app_browsertest_util.h" | 8 #include "chrome/browser/apps/app_browsertest_util.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
13 #include "content/public/test/browser_test_base.h" | 13 #include "content/public/test/browser_test_base.h" |
14 #include "content/public/test/browser_test_utils.h" | 14 #include "content/public/test/browser_test_utils.h" |
15 #include "extensions/test/extension_test_message_listener.h" | 15 #include "extensions/test/extension_test_message_listener.h" |
16 #include "net/test/embedded_test_server/embedded_test_server.h" | 16 #include "net/test/embedded_test_server/embedded_test_server.h" |
17 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" |
18 | 18 |
19 namespace extensions { | 19 namespace extensions { |
20 | 20 |
21 class PlatformAppUrlRedirectorBrowserTest : public PlatformAppBrowserTest { | 21 class PlatformAppUrlRedirectorBrowserTest : public PlatformAppBrowserTest { |
22 public: | 22 public: |
23 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 23 virtual void SetUpCommandLine(CommandLine* command_line) override; |
24 | 24 |
25 protected: | 25 protected: |
26 // Performs the following sequence: | 26 // Performs the following sequence: |
27 // - installs the app |handler| (a relative path under the platform_apps | 27 // - installs the app |handler| (a relative path under the platform_apps |
28 // subdirectory); | 28 // subdirectory); |
29 // - navigates the current tab to the HTML page |lancher_page| (ditto); | 29 // - navigates the current tab to the HTML page |lancher_page| (ditto); |
30 // - then waits for |handler| to launch and send back a |handler_ack_message|; | 30 // - then waits for |handler| to launch and send back a |handler_ack_message|; |
31 // - finally checks that the resulting app window count is as expected. | 31 // - finally checks that the resulting app window count is as expected. |
32 // The |launcher_page| is supposed to trigger a navigation matching one of the | 32 // The |launcher_page| is supposed to trigger a navigation matching one of the |
33 // url_handlers in the |handler|'s manifest, and thereby launch the |handler|. | 33 // url_handlers in the |handler|'s manifest, and thereby launch the |handler|. |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 #if defined (OS_WIN) | 506 #if defined (OS_WIN) |
507 if (base::win::GetVersion() < base::win::VERSION_VISTA) return; // Bug 301638 | 507 if (base::win::GetVersion() < base::win::VERSION_VISTA) return; // Bug 301638 |
508 #endif | 508 #endif |
509 TestNavigationInTab( | 509 TestNavigationInTab( |
510 "url_handlers/launching_pages/prerender_link.html", | 510 "url_handlers/launching_pages/prerender_link.html", |
511 "url_handlers/handlers/simple", | 511 "url_handlers/handlers/simple", |
512 "Handler launched"); | 512 "Handler launched"); |
513 } | 513 } |
514 | 514 |
515 } // namespace extensions | 515 } // namespace extensions |
OLD | NEW |