Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/command_line.h" | |
| 6 #include "base/file_path.h" | |
| 7 #include "base/file_util.h" | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "base/scoped_temp_dir.h" | |
| 10 #include "base/test/thread_test_helper.h" | |
| 11 #include "base/utf_string_conversions.h" | |
| 12 #include "chrome/browser/ui/browser.h" | |
| 13 #include "chrome/test/base/in_process_browser_test.h" | |
| 14 #include "chrome/test/base/testing_profile.h" | |
| 15 #include "chrome/test/base/ui_test_utils.h" | |
| 16 #include "content/browser/tab_contents/tab_contents.h" | |
| 17 #include "content/common/content_switches.h" | |
| 18 | |
| 19 class MagicIframeBrowserTest : public InProcessBrowserTest { | |
| 20 public: | |
| 21 MagicIframeBrowserTest() { | |
| 22 EnableDOMAutomation(); | |
| 23 } | |
| 24 | |
| 25 GURL GetTestURL(const std::string& path) { | |
|
levin
2011/08/04 22:27:36
Seems like it shoudn't be in class as there isn't
| |
| 26 std::string url_path = "files/magic_iframe/"; | |
| 27 url_path.append(path); | |
| 28 return test_server()->GetURL(url_path); | |
| 29 } | |
| 30 }; | |
| 31 | |
| 32 // This browser test is verifying that reparenting of iframe between different | |
|
levin
2011/08/04 22:27:36
Recommend removing "This browser test is" and star
| |
| 33 // pages works as expected, including smooth transfer of resources that are | |
| 34 // still being loaded. | |
| 35 // The test failure manifests as the ongoing XHR request is not finishing | |
| 36 // (silently aborted) when the test iframe is transferred between pages (and | |
| 37 // the original page closes). This causes the final navigation not complete and | |
|
levin
2011/08/04 22:27:36
s/not/to not/
| |
| 38 // test terminated by timeout. | |
|
levin
2011/08/04 22:27:36
s/terminated by/is terminated due to a/
| |
| 39 | |
| 40 // Currently disabled (http://crbug.com/55200, work in progress). | |
| 41 IN_PROC_BROWSER_TEST_F(MagicIframeBrowserTest, | |
| 42 DISABLED_TransferIframeCloseWindow) { | |
| 43 ASSERT_TRUE(test_server()->Start()); | |
| 44 GURL url(GetTestURL("iframe-reparenting-close-window.html")); | |
| 45 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 3); | |
| 46 std::string result; | |
| 47 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString( | |
| 48 browser()->GetSelectedTabContents()->render_view_host(), L"", | |
| 49 L"window.domAutomationController.send(getLog())", &result)); | |
| 50 ASSERT_NE(result.find("DONE"), std::string::npos) << result; | |
| 51 } | |
| 52 | |
| OLD | NEW |