| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/test/automation/tab_proxy.h" | 9 #include "chrome/test/automation/tab_proxy.h" |
| 10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
| 11 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 // Platform-specific filename relative to the chrome executable. |
| 15 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
| 16 const wchar_t library_name[] = L"ppapi_tests.dll"; | 17 const wchar_t library_name[] = L"ppapi_tests.dll"; |
| 17 #elif defined(OS_MACOSX) | 18 #elif defined(OS_MACOSX) |
| 18 const char library_name[] = "ppapi_tests.plugin"; | 19 const char library_name[] = "ppapi_tests.plugin"; |
| 19 #elif defined(OS_POSIX) | 20 #elif defined(OS_POSIX) |
| 20 const char library_name[] = "ppapi_tests.so"; | 21 const char library_name[] = "libppapi_tests.so"; |
| 21 #endif | 22 #endif |
| 22 | 23 |
| 23 } // namespace | 24 } // namespace |
| 24 | 25 |
| 25 class PPAPITest : public UITest { | 26 class PPAPITest : public UITest { |
| 26 public: | 27 public: |
| 27 PPAPITest() { | 28 PPAPITest() { |
| 28 // Append the switch to register the pepper plugin. | 29 // Append the switch to register the pepper plugin. |
| 29 // library name = <out dir>/<test_name>.<library_extension> | 30 // library name = <out dir>/<test_name>.<library_extension> |
| 30 // MIME type = application/x-ppapi-<test_name> | 31 // MIME type = application/x-ppapi-<test_name> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 scoped_refptr<TabProxy> tab(GetActiveTab()); | 63 scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 63 ASSERT_TRUE(tab.get()); | 64 ASSERT_TRUE(tab.get()); |
| 64 ASSERT_TRUE(tab->NavigateToURL(test_url)); | 65 ASSERT_TRUE(tab->NavigateToURL(test_url)); |
| 65 std::string escaped_value = | 66 std::string escaped_value = |
| 66 WaitUntilCookieNonEmpty(tab.get(), test_url, | 67 WaitUntilCookieNonEmpty(tab.get(), test_url, |
| 67 "COMPLETION_COOKIE", action_max_timeout_ms()); | 68 "COMPLETION_COOKIE", action_max_timeout_ms()); |
| 68 EXPECT_STREQ("PASS", escaped_value.c_str()); | 69 EXPECT_STREQ("PASS", escaped_value.c_str()); |
| 69 } | 70 } |
| 70 }; | 71 }; |
| 71 | 72 |
| 73 /*#if defined(OS_MACOSX) |
| 72 TEST_F(PPAPITest, DISABLED_DeviceContext2D) { | 74 TEST_F(PPAPITest, DISABLED_DeviceContext2D) { |
| 75 #else*/ |
| 76 TEST_F(PPAPITest, DeviceContext2D) { |
| 77 //#endif |
| 73 RunTest(FILE_PATH_LITERAL("test_device_context_2d.html")); | 78 RunTest(FILE_PATH_LITERAL("test_device_context_2d.html")); |
| 74 } | 79 } |
| 75 | 80 |
| 81 /*#if defined(OS_MACOSX) |
| 76 TEST_F(PPAPITest, DISABLED_ImageData) { | 82 TEST_F(PPAPITest, DISABLED_ImageData) { |
| 83 #else*/ |
| 84 TEST_F(PPAPITest, ImageData) { |
| 85 //#endif |
| 77 RunTest(FILE_PATH_LITERAL("test_image_data.html")); | 86 RunTest(FILE_PATH_LITERAL("test_image_data.html")); |
| 78 } | 87 } |
| OLD | NEW |