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/command_line.h" |
6 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
7 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
8 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/automation/automation_util.h" | 11 #include "chrome/browser/automation/automation_util.h" |
11 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 12 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
12 #include "chrome/browser/extensions/extension_browsertest.h" | 13 #include "chrome/browser/extensions/extension_browsertest.h" |
13 #include "chrome/browser/extensions/extension_test_message_listener.h" | 14 #include "chrome/browser/extensions/extension_test_message_listener.h" |
14 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 15 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
15 #include "chrome/browser/extensions/platform_app_launcher.h" | 16 #include "chrome/browser/extensions/platform_app_launcher.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 // function to get the native file system path of a file they are launched with. | 482 // function to get the native file system path of a file they are launched with. |
482 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, GetDisplayPath) { | 483 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, GetDisplayPath) { |
483 SetCommandLineArg(kTestFilePath); | 484 SetCommandLineArg(kTestFilePath); |
484 ASSERT_TRUE(RunPlatformAppTest("platform_apps/get_display_path")) | 485 ASSERT_TRUE(RunPlatformAppTest("platform_apps/get_display_path")) |
485 << message_; | 486 << message_; |
486 } | 487 } |
487 | 488 |
488 #endif // defined(OS_CHROMEOS) | 489 #endif // defined(OS_CHROMEOS) |
489 | 490 |
490 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, OpenLink) { | 491 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, OpenLink) { |
| 492 ClearCommandLineArgs(); |
| 493 CommandLine::ForCurrentProcess()->AppendSwitch("OpenLinkTest"); |
491 ASSERT_TRUE(StartTestServer()); | 494 ASSERT_TRUE(StartTestServer()); |
492 content::WindowedNotificationObserver observer( | 495 content::WindowedNotificationObserver observer( |
493 chrome::NOTIFICATION_TAB_ADDED, | 496 chrome::NOTIFICATION_TAB_ADDED, |
494 content::Source<content::WebContentsDelegate>(browser())); | 497 content::Source<content::WebContentsDelegate>(browser())); |
495 LoadAndLaunchPlatformApp("open_link"); | 498 LoadAndLaunchPlatformApp("open_link"); |
496 observer.Wait(); | 499 observer.Wait(); |
497 ASSERT_EQ(2, browser()->tab_count()); | 500 ASSERT_EQ(2, browser()->tab_count()); |
498 } | 501 } |
499 | 502 |
500 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MutationEventsDisabled) { | 503 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MutationEventsDisabled) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 | 566 |
564 // Tell javascript to open a third window. | 567 // Tell javascript to open a third window. |
565 page3_listener.Reply("continue"); | 568 page3_listener.Reply("continue"); |
566 | 569 |
567 // Wait for javascript to verify that the third window got the restored size | 570 // Wait for javascript to verify that the third window got the restored size |
568 // and explicitly specified coordinates. | 571 // and explicitly specified coordinates. |
569 ASSERT_TRUE(done3_listener.WaitUntilSatisfied()); | 572 ASSERT_TRUE(done3_listener.WaitUntilSatisfied()); |
570 } | 573 } |
571 | 574 |
572 } // namespace extensions | 575 } // namespace extensions |
OLD | NEW |