| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
| 8 #include "chrome/browser/extensions/extension_process_manager.h" | 8 #include "chrome/browser/extensions/extension_process_manager.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 L"window.location = '" + UTF8ToWide(url.spec()) + L"';", | 54 L"window.location = '" + UTF8ToWide(url.spec()) + L"';", |
| 55 &result)); | 55 &result)); |
| 56 ASSERT_TRUE(result); | 56 ASSERT_TRUE(result); |
| 57 | 57 |
| 58 if (!contents->controller().GetLastCommittedEntry() || | 58 if (!contents->controller().GetLastCommittedEntry() || |
| 59 contents->controller().GetLastCommittedEntry()->url() != url) | 59 contents->controller().GetLastCommittedEntry()->url() != url) |
| 60 ui_test_utils::WaitForNavigation(&contents->controller()); | 60 ui_test_utils::WaitForNavigation(&contents->controller()); |
| 61 EXPECT_EQ(url, contents->controller().GetLastCommittedEntry()->url()); | 61 EXPECT_EQ(url, contents->controller().GetLastCommittedEntry()->url()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) { | 64 // Disabled for http://code.google.com/p/chromium/issues/detail?id=86346 |
| 65 IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_AppProcess) { |
| 65 CommandLine::ForCurrentProcess()->AppendSwitch( | 66 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 66 switches::kDisablePopupBlocking); | 67 switches::kDisablePopupBlocking); |
| 67 | 68 |
| 68 host_resolver()->AddRule("*", "127.0.0.1"); | 69 host_resolver()->AddRule("*", "127.0.0.1"); |
| 69 ASSERT_TRUE(test_server()->Start()); | 70 ASSERT_TRUE(test_server()->Start()); |
| 70 | 71 |
| 71 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app_process"))); | 72 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app_process"))); |
| 72 | 73 |
| 73 // Open two tabs in the app, one outside it. | 74 // Open two tabs in the app, one outside it. |
| 74 GURL base_url = test_server()->GetURL( | 75 GURL base_url = test_server()->GetURL( |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 ui_test_utils::WaitForNavigation(&contents->controller()); | 233 ui_test_utils::WaitForNavigation(&contents->controller()); |
| 233 EXPECT_TRUE(contents->render_view_host()->process()->is_extension_process()); | 234 EXPECT_TRUE(contents->render_view_host()->process()->is_extension_process()); |
| 234 | 235 |
| 235 // Disable app and reload via JavaScript. | 236 // Disable app and reload via JavaScript. |
| 236 DisableExtension(app->id()); | 237 DisableExtension(app->id()); |
| 237 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->render_view_host(), | 238 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->render_view_host(), |
| 238 L"", L"location.reload();")); | 239 L"", L"location.reload();")); |
| 239 ui_test_utils::WaitForNavigation(&contents->controller()); | 240 ui_test_utils::WaitForNavigation(&contents->controller()); |
| 240 EXPECT_FALSE(contents->render_view_host()->process()->is_extension_process()); | 241 EXPECT_FALSE(contents->render_view_host()->process()->is_extension_process()); |
| 241 } | 242 } |
| OLD | NEW |