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 "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 return GetTestUrl("npapi", filename); | 106 return GetTestUrl("npapi", filename); |
107 } | 107 } |
108 | 108 |
109 void NavigateAway() { | 109 void NavigateAway() { |
110 GURL url = GetTestUrl("", "simple_page.html"); | 110 GURL url = GetTestUrl("", "simple_page.html"); |
111 LoadAndWait(url); | 111 LoadAndWait(url); |
112 } | 112 } |
113 | 113 |
114 void TestPlugin(const char* filename) { | 114 void TestPlugin(const char* filename) { |
115 base::FilePath path = GetTestFilePath("plugin", filename); | 115 base::FilePath path = GetTestFilePath("plugin", filename); |
116 if (!file_util::PathExists(path)) { | 116 if (!base::PathExists(path)) { |
117 const testing::TestInfo* const test_info = | 117 const testing::TestInfo* const test_info = |
118 testing::UnitTest::GetInstance()->current_test_info(); | 118 testing::UnitTest::GetInstance()->current_test_info(); |
119 LOG(INFO) << "PluginTest." << test_info->name() << | 119 LOG(INFO) << "PluginTest." << test_info->name() << |
120 " not running because test data wasn't found."; | 120 " not running because test data wasn't found."; |
121 return; | 121 return; |
122 } | 122 } |
123 | 123 |
124 GURL url = GetTestUrl("plugin", filename); | 124 GURL url = GetTestUrl("plugin", filename); |
125 LoadAndWait(url); | 125 LoadAndWait(url); |
126 } | 126 } |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 IN_PROC_BROWSER_TEST_F(PluginTest, DISABLED_Java) { | 459 IN_PROC_BROWSER_TEST_F(PluginTest, DISABLED_Java) { |
460 TestPlugin("Java.html"); | 460 TestPlugin("Java.html"); |
461 } | 461 } |
462 | 462 |
463 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(Silverlight)) { | 463 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(Silverlight)) { |
464 TestPlugin("silverlight.html"); | 464 TestPlugin("silverlight.html"); |
465 } | 465 } |
466 #endif // defined(OS_WIN) | 466 #endif // defined(OS_WIN) |
467 | 467 |
468 } // namespace content | 468 } // namespace content |
OLD | NEW |