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 #undef LOG | 5 #undef LOG |
6 | 6 |
7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const int kTestWindowHeight = 600; | 79 const int kTestWindowHeight = 600; |
80 | 80 |
81 // The W3C SVG layout tests use a different size than the other layout | 81 // The W3C SVG layout tests use a different size than the other layout |
82 // tests. | 82 // tests. |
83 const int kSVGTestWindowWidth = 480; | 83 const int kSVGTestWindowWidth = 480; |
84 const int kSVGTestWindowHeight = 360; | 84 const int kSVGTestWindowHeight = 360; |
85 | 85 |
86 // URLRequestTestShellFileJob is used to serve the inspector | 86 // URLRequestTestShellFileJob is used to serve the inspector |
87 class URLRequestTestShellFileJob : public URLRequestFileJob { | 87 class URLRequestTestShellFileJob : public URLRequestFileJob { |
88 public: | 88 public: |
89 static URLRequestJob* InspectorFactory(URLRequest* request, | 89 static URLRequestJob* InspectorFactory(net::URLRequest* request, |
90 const std::string& scheme) { | 90 const std::string& scheme) { |
91 FilePath path; | 91 FilePath path; |
92 PathService::Get(base::DIR_EXE, &path); | 92 PathService::Get(base::DIR_EXE, &path); |
93 path = path.AppendASCII("resources"); | 93 path = path.AppendASCII("resources"); |
94 path = path.AppendASCII("inspector"); | 94 path = path.AppendASCII("inspector"); |
95 path = path.AppendASCII(request->url().path().substr(1)); | 95 path = path.AppendASCII(request->url().path().substr(1)); |
96 return new URLRequestTestShellFileJob(request, path); | 96 return new URLRequestTestShellFileJob(request, path); |
97 } | 97 } |
98 | 98 |
99 private: | 99 private: |
100 URLRequestTestShellFileJob(URLRequest* request, const FilePath& path) | 100 URLRequestTestShellFileJob(net::URLRequest* request, const FilePath& path) |
101 : URLRequestFileJob(request, path) { | 101 : URLRequestFileJob(request, path) { |
102 } | 102 } |
103 virtual ~URLRequestTestShellFileJob() { } | 103 virtual ~URLRequestTestShellFileJob() { } |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob); | 105 DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob); |
106 }; | 106 }; |
107 | 107 |
108 | 108 |
109 } // namespace | 109 } // namespace |
110 | 110 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 889 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
890 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 890 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
891 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 891 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
892 plugins->erase(plugins->begin() + i); | 892 plugins->erase(plugins->begin() + i); |
893 } | 893 } |
894 } | 894 } |
895 } | 895 } |
896 } | 896 } |
897 | 897 |
898 } // namespace webkit_glue | 898 } // namespace webkit_glue |
OLD | NEW |