| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 EXPECT_TRUE(tab->GetTabTitle(&title)); | 38 EXPECT_TRUE(tab->GetTabTitle(&title)); |
| 39 EXPECT_EQ(L"Layout Test Plugin Test", title); | 39 EXPECT_EQ(L"Layout Test Plugin Test", title); |
| 40 | 40 |
| 41 ASSERT_TRUE(tab->GoBack()); | 41 ASSERT_TRUE(tab->GoBack()); |
| 42 EXPECT_TRUE(tab->GetTabTitle(&title)); | 42 EXPECT_TRUE(tab->GetTabTitle(&title)); |
| 43 EXPECT_EQ(L"", title); | 43 EXPECT_EQ(L"", title); |
| 44 } | 44 } |
| 45 | 45 |
| 46 // Tests if a plugin executing a self deleting script using NPN_GetURL | 46 // Tests if a plugin executing a self deleting script using NPN_GetURL |
| 47 // works without crashing or hanging | 47 // works without crashing or hanging |
| 48 // Flaky: http://crbug.com/59327 |
| 48 TEST_F(LayoutPluginTester, FLAKY_SelfDeletePluginGetUrl) { | 49 TEST_F(LayoutPluginTester, FLAKY_SelfDeletePluginGetUrl) { |
| 49 const FilePath test_case(FILE_PATH_LITERAL("self_delete_plugin_geturl.html")); | 50 const FilePath test_case(FILE_PATH_LITERAL("self_delete_plugin_geturl.html")); |
| 50 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 51 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 51 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 52 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 52 WaitForFinish("self_delete_plugin_geturl", "1", url, | 53 WaitForFinish("self_delete_plugin_geturl", "1", url, |
| 53 kTestCompleteCookie, kTestCompleteSuccess, | 54 kTestCompleteCookie, kTestCompleteSuccess, |
| 54 action_max_timeout_ms()); | 55 action_max_timeout_ms()); |
| 55 } | 56 } |
| 56 | 57 |
| 57 // Tests if a plugin executing a self deleting script using Invoke | 58 // Tests if a plugin executing a self deleting script using Invoke |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // the more interesting case is out of process, where we must route | 90 // the more interesting case is out of process, where we must route |
| 90 // the exception to the correct renderer. | 91 // the exception to the correct renderer. |
| 91 TEST_F(LayoutPluginTester, NPObjectSetException) { | 92 TEST_F(LayoutPluginTester, NPObjectSetException) { |
| 92 const FilePath test_case(FILE_PATH_LITERAL("npobject_set_exception.html")); | 93 const FilePath test_case(FILE_PATH_LITERAL("npobject_set_exception.html")); |
| 93 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 94 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 94 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 95 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 95 WaitForFinish("npobject_set_exception", "1", url, | 96 WaitForFinish("npobject_set_exception", "1", url, |
| 96 kTestCompleteCookie, kTestCompleteSuccess, | 97 kTestCompleteCookie, kTestCompleteSuccess, |
| 97 action_max_timeout_ms()); | 98 action_max_timeout_ms()); |
| 98 } | 99 } |
| OLD | NEW |