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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "chrome/browser/browser_process.h" | 69 #include "chrome/browser/browser_process.h" |
70 #endif | 70 #endif |
71 | 71 |
72 using content::InterstitialPage; | 72 using content::InterstitialPage; |
73 using content::NavigationController; | 73 using content::NavigationController; |
74 using content::NavigationEntry; | 74 using content::NavigationEntry; |
75 using content::OpenURLParams; | 75 using content::OpenURLParams; |
76 using content::Referrer; | 76 using content::Referrer; |
77 using content::WebContents; | 77 using content::WebContents; |
78 using content::WebContentsObserver; | 78 using content::WebContentsObserver; |
| 79 using extensions::Extension; |
79 | 80 |
80 namespace { | 81 namespace { |
81 | 82 |
82 const char* kBeforeUnloadHTML = | 83 const char* kBeforeUnloadHTML = |
83 "<html><head><title>beforeunload</title></head><body>" | 84 "<html><head><title>beforeunload</title></head><body>" |
84 "<script>window.onbeforeunload=function(e){return 'foo'}</script>" | 85 "<script>window.onbeforeunload=function(e){return 'foo'}</script>" |
85 "</body></html>"; | 86 "</body></html>"; |
86 | 87 |
87 const char* kOpenNewBeforeUnloadPage = | 88 const char* kOpenNewBeforeUnloadPage = |
88 "w=window.open(); w.onbeforeunload=function(e){return 'foo'};"; | 89 "w=window.open(); w.onbeforeunload=function(e){return 'foo'};"; |
(...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 command_line->AppendSwitchASCII(switches::kApp, url.spec()); | 1903 command_line->AppendSwitchASCII(switches::kApp, url.spec()); |
1903 } | 1904 } |
1904 }; | 1905 }; |
1905 | 1906 |
1906 IN_PROC_BROWSER_TEST_F(AppModeTest, EnableAppModeTest) { | 1907 IN_PROC_BROWSER_TEST_F(AppModeTest, EnableAppModeTest) { |
1907 // Test that an application browser window loads correctly. | 1908 // Test that an application browser window loads correctly. |
1908 | 1909 |
1909 // Verify the browser is in application mode. | 1910 // Verify the browser is in application mode. |
1910 EXPECT_TRUE(browser()->IsApplication()); | 1911 EXPECT_TRUE(browser()->IsApplication()); |
1911 } | 1912 } |
OLD | NEW |