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/utf_string_conversions.h" | 8 #include "base/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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 void LoadAndWait(const GURL& url) { | 95 void LoadAndWait(const GURL& url) { |
96 LoadAndWaitInWindow(shell(), url); | 96 LoadAndWaitInWindow(shell(), url); |
97 } | 97 } |
98 | 98 |
99 GURL GetURL(const char* filename) { | 99 GURL GetURL(const char* filename) { |
100 return GetTestUrl("npapi", filename); | 100 return GetTestUrl("npapi", filename); |
101 } | 101 } |
102 | 102 |
103 void NavigateAway() { | 103 void NavigateAway() { |
104 GURL url = GetTestUrl(".", "simple_page.html"); | 104 GURL url = GetTestUrl("", "simple_page.html"); |
105 LoadAndWait(url); | 105 LoadAndWait(url); |
106 } | 106 } |
107 | 107 |
108 void TestPlugin(const char* filename) { | 108 void TestPlugin(const char* filename) { |
109 FilePath path = GetTestFilePath("plugin", filename); | 109 FilePath path = GetTestFilePath("plugin", filename); |
110 if (!file_util::PathExists(path)) { | 110 if (!file_util::PathExists(path)) { |
111 const testing::TestInfo* const test_info = | 111 const testing::TestInfo* const test_info = |
112 testing::UnitTest::GetInstance()->current_test_info(); | 112 testing::UnitTest::GetInstance()->current_test_info(); |
113 LOG(INFO) << "PluginTest." << test_info->name() << | 113 LOG(INFO) << "PluginTest." << test_info->name() << |
114 " not running because test data wasn't found."; | 114 " not running because test data wasn't found."; |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 IN_PROC_BROWSER_TEST_F(PluginTest, DISABLED_Java) { | 448 IN_PROC_BROWSER_TEST_F(PluginTest, DISABLED_Java) { |
449 TestPlugin("Java.html"); | 449 TestPlugin("Java.html"); |
450 } | 450 } |
451 | 451 |
452 IN_PROC_BROWSER_TEST_F(PluginTest, Silverlight) { | 452 IN_PROC_BROWSER_TEST_F(PluginTest, Silverlight) { |
453 TestPlugin("silverlight.html"); | 453 TestPlugin("silverlight.html"); |
454 } | 454 } |
455 #endif // defined(OS_WIN) | 455 #endif // defined(OS_WIN) |
456 | 456 |
457 } // namespace content | 457 } // namespace content |
OLD | NEW |