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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 354 |
355 // Verify there are no pending history items after the dialog is cancelled. | 355 // Verify there are no pending history items after the dialog is cancelled. |
356 // (see crbug.com/93858) | 356 // (see crbug.com/93858) |
357 NavigationEntry* entry = chrome::GetActiveWebContents(browser())-> | 357 NavigationEntry* entry = chrome::GetActiveWebContents(browser())-> |
358 GetController().GetPendingEntry(); | 358 GetController().GetPendingEntry(); |
359 EXPECT_EQ(NULL, entry); | 359 EXPECT_EQ(NULL, entry); |
360 | 360 |
361 // Wait for the ShouldClose_ACK to arrive. We can detect it by waiting for | 361 // Wait for the ShouldClose_ACK to arrive. We can detect it by waiting for |
362 // the pending RVH to be destroyed. | 362 // the pending RVH to be destroyed. |
363 host_destroyed_observer.Wait(); | 363 host_destroyed_observer.Wait(); |
364 EXPECT_EQ(url.spec(), UTF16ToUTF8(browser()->toolbar_model()->GetText())); | 364 EXPECT_EQ(url, browser()->toolbar_model()->GetURL()); |
365 | 365 |
366 // Clear the beforeunload handler so the test can easily exit. | 366 // Clear the beforeunload handler so the test can easily exit. |
367 chrome::GetActiveWebContents(browser())->GetRenderViewHost()-> | 367 chrome::GetActiveWebContents(browser())->GetRenderViewHost()-> |
368 ExecuteJavascriptInWebFrame(string16(), | 368 ExecuteJavascriptInWebFrame(string16(), |
369 ASCIIToUTF16("onbeforeunload=null;")); | 369 ASCIIToUTF16("onbeforeunload=null;")); |
370 } | 370 } |
371 | 371 |
372 // Crashy on mac. http://crbug.com/38522 | 372 // Crashy on mac. http://crbug.com/38522 |
373 #if defined(OS_MACOSX) | 373 #if defined(OS_MACOSX) |
374 #define MAYBE_SingleBeforeUnloadAfterWindowClose \ | 374 #define MAYBE_SingleBeforeUnloadAfterWindowClose \ |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 command_line->AppendSwitchASCII(switches::kApp, url.spec()); | 1590 command_line->AppendSwitchASCII(switches::kApp, url.spec()); |
1591 } | 1591 } |
1592 }; | 1592 }; |
1593 | 1593 |
1594 IN_PROC_BROWSER_TEST_F(AppModeTest, EnableAppModeTest) { | 1594 IN_PROC_BROWSER_TEST_F(AppModeTest, EnableAppModeTest) { |
1595 // Test that an application browser window loads correctly. | 1595 // Test that an application browser window loads correctly. |
1596 | 1596 |
1597 // Verify the browser is in application mode. | 1597 // Verify the browser is in application mode. |
1598 EXPECT_TRUE(browser()->IsApplication()); | 1598 EXPECT_TRUE(browser()->IsApplication()); |
1599 } | 1599 } |
OLD | NEW |