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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/chrome_notification_types.h" | 6 #include "chrome/browser/chrome_notification_types.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 ASSERT_EQ(3, browser()->tab_strip_model()->count()); | 404 ASSERT_EQ(3, browser()->tab_strip_model()->count()); |
405 EXPECT_EQ("/extensions/api_test/app_process/path1/empty.html", | 405 EXPECT_EQ("/extensions/api_test/app_process/path1/empty.html", |
406 browser()->tab_strip_model()->GetWebContentsAt(2)-> | 406 browser()->tab_strip_model()->GetWebContentsAt(2)-> |
407 GetController().GetLastCommittedEntry()->GetURL().path()); | 407 GetController().GetLastCommittedEntry()->GetURL().path()); |
408 EXPECT_EQ(browser()->tab_strip_model()->GetWebContentsAt(1)-> | 408 EXPECT_EQ(browser()->tab_strip_model()->GetWebContentsAt(1)-> |
409 GetRenderProcessHost(), | 409 GetRenderProcessHost(), |
410 browser()->tab_strip_model()->GetWebContentsAt(2)-> | 410 browser()->tab_strip_model()->GetWebContentsAt(2)-> |
411 GetRenderProcessHost()); | 411 GetRenderProcessHost()); |
412 } | 412 } |
413 | 413 |
| 414 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 415 // TODO(erg): linux_aura bringup: http://crbug.com/163931 |
| 416 #define MAYBE_NavigateIntoAppProcess DISABLED_NavigateIntoAppProcess |
| 417 #else |
| 418 #define MAYBE_NavigateIntoAppProcess NavigateIntoAppProcess |
| 419 #endif |
| 420 |
414 // Ensure that re-navigating to a URL after installing or uninstalling it as an | 421 // Ensure that re-navigating to a URL after installing or uninstalling it as an |
415 // app correctly swaps the tab to the app process. (http://crbug.com/80621) | 422 // app correctly swaps the tab to the app process. (http://crbug.com/80621) |
416 // | 423 // |
417 // Fails on Windows. http://crbug.com/238670 | 424 // Fails on Windows. http://crbug.com/238670 |
418 // Added logging to help diagnose the location of the problem. | 425 // Added logging to help diagnose the location of the problem. |
419 IN_PROC_BROWSER_TEST_F(AppApiTest, NavigateIntoAppProcess) { | 426 IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_NavigateIntoAppProcess) { |
420 extensions::ProcessMap* process_map = extensions::ExtensionSystem::Get( | 427 extensions::ProcessMap* process_map = extensions::ExtensionSystem::Get( |
421 browser()->profile())->extension_service()->process_map(); | 428 browser()->profile())->extension_service()->process_map(); |
422 | 429 |
423 host_resolver()->AddRule("*", "127.0.0.1"); | 430 host_resolver()->AddRule("*", "127.0.0.1"); |
424 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 431 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
425 | 432 |
426 // The app under test acts on URLs whose host is "localhost", | 433 // The app under test acts on URLs whose host is "localhost", |
427 // so the URLs we navigate to must have host "localhost". | 434 // so the URLs we navigate to must have host "localhost". |
428 GURL base_url = GetTestBaseURL("app_process"); | 435 GURL base_url = GetTestBaseURL("app_process"); |
429 | 436 |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 &browser()->tab_strip_model()->GetActiveWebContents()-> | 825 &browser()->tab_strip_model()->GetActiveWebContents()-> |
819 GetController())); | 826 GetController())); |
820 chrome::Reload(browser(), CURRENT_TAB); | 827 chrome::Reload(browser(), CURRENT_TAB); |
821 observer.Wait(); | 828 observer.Wait(); |
822 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 829 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
823 contents, | 830 contents, |
824 "window.domAutomationController.send(chrome.app.isInstalled)", | 831 "window.domAutomationController.send(chrome.app.isInstalled)", |
825 &is_installed)); | 832 &is_installed)); |
826 ASSERT_TRUE(is_installed); | 833 ASSERT_TRUE(is_installed); |
827 } | 834 } |
OLD | NEW |